Remove td, remove field matrix, update radio blocks. Revert image literal changes.
This commit is contained in:
@ -34,13 +34,10 @@ namespace basic {
|
||||
*/
|
||||
//% help=basic/show-leds
|
||||
//% weight=95 blockGap=8
|
||||
//% imageLiteral=0 async
|
||||
//% leds.fieldEditor="matrix"
|
||||
//% leds.fieldOptions.onParentBlock=true
|
||||
//% leds.fieldOptions.decompileLiterals=true
|
||||
//% imageLiteral=1 async
|
||||
//% blockId=device_show_leds
|
||||
//% block="show leds| %leds" icon="\uf00a"
|
||||
//% parts="ledmatrix" blockExternalInputs=1
|
||||
//% block="show leds" icon="\uf00a"
|
||||
//% parts="ledmatrix"
|
||||
void showLeds(ImageLiteral leds, int interval = 400) {
|
||||
uBit.display.print(MicroBitImage(imageBytes(leds)), 0, 0, 0, interval);
|
||||
}
|
||||
@ -87,10 +84,7 @@ namespace basic {
|
||||
* @param leds pattern of LEDs to turn on/off
|
||||
* @param interval time in milliseconds between each redraw
|
||||
*/
|
||||
//% help=basic/show-animation imageLiteral=0 async
|
||||
//% leds.fieldEditor="matrix"
|
||||
//% leds.fieldOptions.onParentBlock=true
|
||||
//% leds.fieldOptions.decompileLiterals=true
|
||||
//% help=basic/show-animation imageLiteral=1 async
|
||||
//% parts="ledmatrix"
|
||||
void showAnimation(ImageLiteral leds, int interval = 400) {
|
||||
uBit.display.animate(MicroBitImage(imageBytes(leds)), interval, 5, 0, 0);
|
||||
@ -137,4 +131,4 @@ namespace basic {
|
||||
void pause(int ms) {
|
||||
fiber_sleep(ms);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user