fix brightness (#1386)

This commit is contained in:
Peli de Halleux 2018-10-11 14:08:46 -07:00 committed by GitHub
parent 75fb9a6f68
commit 4b2ed73382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -300,6 +300,7 @@
"led.plot|block": "plot|x %x|y %y",
"led.point|block": "point|x %x|y %y",
"led.setBrightness|block": "set brightness %value",
"led.setDisplayMode|block": "set display mode $mode",
"led.stopAnimation|block": "stop animation",
"led.toggle|block": "toggle|x %x|y %y",
"led.unplot|block": "unplot|x %x|y %y",

View File

@ -774,9 +774,6 @@ namespace game {
_sprites[i]._plot(now);
}
_img.plotImage(0);
// restore previous display mode
if (dm != DisplayMode.Greyscale)
led.setDisplayMode(dm);
}
/**

View File

@ -110,7 +110,8 @@ namespace led {
* @param mode mode the display mode in which the screen operates
*/
//% weight=1 help=led/set-display-mode
//% parts="ledmatrix" advanced=true
//% parts="ledmatrix" advanced=true weight=1
//% blockId="led_set_display_mode" block="set display mode $mode"
void setDisplayMode(DisplayMode_ mode) {
uBit.display.setDisplayMode((DisplayMode)mode);
}

View File

@ -526,7 +526,8 @@ declare namespace led {
* @param mode mode the display mode in which the screen operates
*/
//% weight=1 help=led/set-display-mode
//% parts="ledmatrix" advanced=true shim=led::setDisplayMode
//% parts="ledmatrix" advanced=true weight=1
//% blockId="led_set_display_mode" block="set display mode $mode" shim=led::setDisplayMode
function setDisplayMode(mode: DisplayMode): void;
/**