added led.enable (#294)

* added led.enable

* fixed simulator support for led.enable
This commit is contained in:
Peli de Halleux
2016-10-28 08:34:04 -07:00
committed by GitHub
parent c6e38bd7a9
commit 76adc3c00a
8 changed files with 98 additions and 20 deletions

View File

@ -9,6 +9,7 @@ namespace pxsim {
brigthness = 255;
displayMode = DisplayMode.bw;
font: Image = createFont();
disabled: boolean;
animationQ: AnimationQueue;
@ -284,4 +285,8 @@ namespace pxsim.led {
board().ledMatrixState.image.copyTo(0, 5, img, 0);
return img;
}
export function enable(on: boolean) {
board().ledMatrixState.disabled = !on;
runtime.queueDisplayUpdate();
}
}