Remove td, remove field matrix, update radio blocks. Revert image literal changes.

This commit is contained in:
Sam El-Husseini
2018-05-09 10:56:48 -07:00
parent dc5ec79708
commit 8957bf0647
14 changed files with 150 additions and 367 deletions

View File

@ -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);
}
}
}