Skip to content

Commit 0b03f84

Browse files
Charly-sketchnedseb
authored andcommitted
Fix : Remove unused enum AllLeds
1 parent 93809f6 commit 0b03f84

3 files changed

Lines changed: 2 additions & 42 deletions

File tree

pxt-steami/libs/core/enums.d.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,6 @@
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,

pxt-steami/libs/core/leds.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
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-
194
enum class AllColors {
205
//% block="Red" color=#ff0000
216
Red,

pxt-steami/libs/leds/sim/leds.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
namespace 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
}

0 commit comments

Comments
 (0)