fix brightness (#1386)
This commit is contained in:
parent
75fb9a6f68
commit
4b2ed73382
@ -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",
|
||||
|
@ -774,9 +774,6 @@ namespace game {
|
||||
_sprites[i]._plot(now);
|
||||
}
|
||||
_img.plotImage(0);
|
||||
// restore previous display mode
|
||||
if (dm != DisplayMode.Greyscale)
|
||||
led.setDisplayMode(dm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
3
libs/core/shims.d.ts
vendored
3
libs/core/shims.d.ts
vendored
@ -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;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user