Merge branch 'master' of github.com:Microsoft/kindscript-microbit
This commit is contained in:
commit
19f40d27ff
@ -420,7 +420,7 @@ namespace ks.rt.micro_bit {
|
|||||||
return lg;
|
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 = []; 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"));
|
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"));
|
||||||
|
@ -9,6 +9,7 @@ namespace ks.rt.micro_bit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum PinMode {
|
export enum PinMode {
|
||||||
|
Unused = 0,
|
||||||
Digital = 0x0001,
|
Digital = 0x0001,
|
||||||
Analog = 0x0002,
|
Analog = 0x0002,
|
||||||
Input = 0x0004,
|
Input = 0x0004,
|
||||||
@ -20,7 +21,7 @@ namespace ks.rt.micro_bit {
|
|||||||
constructor(public id: number) {}
|
constructor(public id: number) {}
|
||||||
touched = false;
|
touched = false;
|
||||||
value = 0;
|
value = 0;
|
||||||
mode = PinMode.Digital | PinMode.Output;
|
mode = PinMode.Unused;
|
||||||
|
|
||||||
isTouched() : boolean {
|
isTouched() : boolean {
|
||||||
this.mode = PinMode.Touch;
|
this.mode = PinMode.Touch;
|
||||||
|
Loading…
Reference in New Issue
Block a user