Skip to content

Commit 685405b

Browse files
committed
v0.2.0 - fix colour, icon and drop down labels
1 parent 6e8677f commit 685405b

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

power.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,36 @@
1919

2020

2121
enum class FullPowerSource {
22-
//%button A
22+
//% block="button A"
2323
A = MICROBIT_ID_BUTTON_A,
24-
//%button B
24+
//% block="button B"
2525
B = MICROBIT_ID_BUTTON_B,
26-
//%pin P0
26+
//% block="pin P0"
2727
P0 = MICROBIT_ID_IO_P0,
28-
//%pin P1
28+
//% block="pin P1"
2929
P1 = MICROBIT_ID_IO_P1,
30-
//%pin P2
30+
//% block="pin P2"
3131
P2 = MICROBIT_ID_IO_P2
3232
};
3333

3434
enum class LowPowerMode {
35-
//%continue
35+
//% block="continue"
3636
Continue = 0,
37-
//%wait
37+
//% block="wait"
3838
Wait = 1
3939
};
4040

4141
enum class LowPowerEnable {
42-
//%prevent
42+
//% block="prevent"
4343
Prevent,
44-
//%allow
44+
//% block="allow"
4545
Allow
4646
};
4747

4848

49+
//% block="Power"
50+
//% icon="\uf011"
51+
//% color=#AA278D
4952
namespace power {
5053

5154
#if MICROBIT_CODAL

power.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,38 @@
55
*/
66

77
const enum FullPowerSource {
8-
//%button A
8+
//% block="button A"
99
A = DAL.MICROBIT_ID_BUTTON_A, // 1
10-
//%button B
10+
//% block="button B"
1111
B = DAL.MICROBIT_ID_BUTTON_B, // 2
12-
//%pin P0
12+
//% block="pin P0"
1313
P0 = DAL.MICROBIT_ID_IO_P0, // 100
14-
//%pin P1
14+
//% block="pin P1"
1515
P1 = DAL.MICROBIT_ID_IO_P1, // 101
16-
//%pin P2
16+
//% block="pin P2"
1717
P2 = DAL.MICROBIT_ID_IO_P2 // 102
1818
}
1919

2020

2121
const enum LowPowerMode {
22-
//%continue
22+
//% block="continue"
2323
Continue = 0,
24-
//%wait
24+
//% block="wait"
2525
Wait = 1
2626
}
2727

2828

2929
const enum LowPowerEnable {
30-
//%prevent
30+
//% block="prevent"
3131
Prevent = 0,
32-
//%allow
32+
//% block="allow"
3333
Allow = 1
3434
}
3535

3636

37+
//% block="Power"
38+
//% icon="\uf011"
39+
//% color=#AA278D
3740
namespace power {
3841

3942
/**

pxt.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "power",
3-
"version": "0.1.9",
3+
"version": "0.2.0",
44
"description": "Power saving. micro:bit (V2) only.",
55
"dependencies": {
66
"core": "*"

0 commit comments

Comments
 (0)