Merge branch 'master' of github.com:Microsoft/kindscript-microbit

This commit is contained in:
Michal Moskal 2016-03-11 17:17:24 -08:00
commit 19f40d27ff
2 changed files with 3 additions and 2 deletions

View File

@ -420,7 +420,7 @@ namespace ks.rt.micro_bit {
return lg;
})
this.pinTexts = [67,165,275].map(x => <SVGTextElement>Svg.child(this.g, "text", { class:'sim-text-pin', x:x, y:345 }));
this.pinTexts = [67,165,275].map(x => <SVGTextElement>Svg.child(this.g, "text", { class:'sim-text-pin', x:x, y:345}));
this.buttonsOuter = []; this.buttons = [];
this.buttonsOuter.push(Svg.path(this.g, "sim-button-outer", "M82.1,232.6H25.9c-0.5,0-1-0.4-1-1v-56.2c0-0.5,0.4-1,1-1h56.2c0.5,0,1,0.4,1,1v56.2C83,232.2,82.6,232.6,82.1,232.6"));

View File

@ -9,6 +9,7 @@ namespace ks.rt.micro_bit {
}
export enum PinMode {
Unused = 0,
Digital = 0x0001,
Analog = 0x0002,
Input = 0x0004,
@ -20,7 +21,7 @@ namespace ks.rt.micro_bit {
constructor(public id: number) {}
touched = false;
value = 0;
mode = PinMode.Digital | PinMode.Output;
mode = PinMode.Unused;
isTouched() : boolean {
this.mode = PinMode.Touch;