File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 }
3838
3939
40- declare const enum AllLeds {
41- //% block="LED_CHG"
42- LED_CHG = 1 ,
43- //% block="LED_STATUS"
44- LED_STATUS = 2 ,
45- //% block="LED_BLE"
46- LED_ble = 3 ,
47- //% block="LED_FLASH"
48- LED_FLASH = 4 ,
49- //% block="LED_DAPLINK"
50- LED_DAPLINK = 5 ,
51- //% block="LED_RGB"
52- LED_RGB = 6 ,
53- }
54-
55-
5640 declare const enum AllColors {
5741 //% block="Red" color=#ff0000
5842 Red = 0 ,
Original file line number Diff line number Diff line change 11#include " pxt.h"
22#include " STeaMi.h"
33
4- enum class AllLeds {
5- // % block="LED_CHG"
6- LED_CHG = 1 ,
7- // % block="LED_STATUS"
8- LED_STATUS = 2 ,
9- // % block="LED_BLE"
10- LED_ble = 3 ,
11- // % block="LED_FLASH"
12- LED_FLASH = 4 ,
13- // % block="LED_DAPLINK"
14- LED_DAPLINK = 5 ,
15- // % block="LED_RGB"
16- LED_RGB = 6
17- };
18-
194enum class AllColors {
205 // % block="Red" color=#ff0000
216 Red,
Original file line number Diff line number Diff line change 11namespace pxsim . leds {
2- enum AllLeds {
3- LED_CHG = 1 ,
4- LED_STATUS = 2 ,
5- LED_BLE = 3 ,
6- LED_FLASH = 4 ,
7- LED_DAPLINK = 5 ,
8- LED_RGB = 6 ,
9- }
10-
112 enum AllColors {
123 RED = 0 ,
134 GREEN = 1 ,
@@ -41,13 +32,13 @@ namespace pxsim.leds {
4132
4233 export function setLedRGBOff ( ) : void {
4334 let ledState = pxsim . ledState ( ) ;
44- ledState . setState ( AllLeds . LED_RGB , false , '#000000' , 0 ) ;
35+ ledState . setState ( 6 , false , '#000000' , 0 ) ;
4536 runtime . queueDisplayUpdate ( ) ;
4637 }
4738
4839 export function setLedRGB ( color : AllColors ) : void {
4940 let ledState = pxsim . ledState ( ) ;
50- ledState . setState ( AllLeds . LED_RGB , true , getHexColor ( color ) , 7 ) ;
41+ ledState . setState ( 6 , true , getHexColor ( color ) , 7 ) ;
5142 runtime . queueDisplayUpdate ( ) ;
5243 }
5344}
You can’t perform that action at this time.
0 commit comments