From 7ca0068f4b3021409f7f2b5bbc9bef69db735898 Mon Sep 17 00:00:00 2001 From: themarkness Date: Fri, 10 Sep 2021 14:35:29 +0100 Subject: [PATCH 1/2] use v2 sim --- power.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/power.ts b/power.ts index 7a245bc..0d5c9d7 100644 --- a/power.ts +++ b/power.ts @@ -47,6 +47,7 @@ namespace power { //% group="micro:bit (V2)" //% weight=700 //% block="request low power||and $mode" +//% parts="v2" //% shim=power::lowPowerRequest export function lowPowerRequest(mode?: LowPowerMode): void { basic.pause(0) @@ -61,6 +62,7 @@ export function lowPowerRequest(mode?: LowPowerMode): void { //% weight=600 //% interval.shadow=longTimePicker //% block="request low power for $interval ms" +//% parts="v2" //% shim=power::lowPowerPause export function lowPowerPause(interval: number): void { basic.pause(interval) @@ -74,6 +76,7 @@ export function lowPowerPause(interval: number): void { //% help=power/low-power-enable //% weight=500 //% block="low power %enable" +//% parts="v2" //% shim=power::lowPowerEnable export function lowPowerEnable(enable: LowPowerEnable): void { return @@ -100,6 +103,7 @@ export function lowPowerIsEnabled(): boolean { //% interval.shadow=longTimePicker //% afterOnStart=true //% block="full power every $interval ms" +//% parts="v2" //% shim=power::fullPowerEvery export function fullPowerEvery(interval: number, code: () => void): void { loops.everyInterval(interval, code) @@ -135,6 +139,7 @@ export function fullPowerSourceIsEnabled(source: FullPowerSource): boolean { //% group="micro:bit (V2)" //% weight=900 //% block="full power on %source" +//% parts="v2" //% shim=power::fullPowerOn export function fullPowerOn(source: FullPowerSource): void { return From adc4676224895a538c687ffb54e487812bb7c7dd Mon Sep 17 00:00:00 2001 From: themarkness Date: Fri, 10 Sep 2021 14:37:26 +0100 Subject: [PATCH 2/2] bump v0.2.2 --- pxt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxt.json b/pxt.json index ee77133..e8ef53b 100644 --- a/pxt.json +++ b/pxt.json @@ -1,6 +1,6 @@ { "name": "power", - "version": "0.2.1", + "version": "0.2.2", "description": "Power saving. micro:bit (V2) only.", "dependencies": { "core": "*"