File tree Expand file tree Collapse file tree 3 files changed +25
-19
lines changed
Expand file tree Collapse file tree 3 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 1919
2020
2121enum 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
3434enum class LowPowerMode {
35- // %continue
35+ // % block=" continue"
3636 Continue = 0 ,
37- // %wait
37+ // % block=" wait"
3838 Wait = 1
3939};
4040
4141enum 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
4952namespace power {
5053
5154#if MICROBIT_CODAL
Original file line number Diff line number Diff line change 55 */
66
77const 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
2121const enum LowPowerMode {
22- //%continue
22+ //% block=" continue"
2323 Continue = 0 ,
24- //%wait
24+ //% block=" wait"
2525 Wait = 1
2626}
2727
2828
2929const 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
3740namespace power {
3841
3942/**
Original file line number Diff line number Diff line change 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" : " *"
You can’t perform that action at this time.
0 commit comments