diff --git a/libs/microbit/pins.cpp b/libs/microbit/pins.cpp index 3fc32ea7..bf031523 100644 --- a/libs/microbit/pins.cpp +++ b/libs/microbit/pins.cpp @@ -128,7 +128,7 @@ namespace pins { * @param name analog pin to set period to * @param micros period in micro seconds. eg:20000 */ - //% help=pins/analog-set-period weight=23 + //% help=pins/analog-set-period weight=23 blockGap=8 //% blockId=device_set_analog_period block="analog set period|pin %pin|to (µs)%micros" void analogSetPeriod(AnalogPin name, int micros) { PINOP(setAnalogPeriodUs(micros)); @@ -148,10 +148,10 @@ namespace pins { } /** - * Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulse`` handler. + * Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulsed`` handler. */ //% help=pins/pulse-micros - //% blockId=pins_pulse_duration block="pulse duration (us)" + //% blockId=pins_pulse_duration block="pulse duration (µs)" //% weight=21 int pulseDuration() { return pxt::lastEvent.timestamp; diff --git a/libs/microbit/pins.ts b/libs/microbit/pins.ts index 2fb85ad5..3412b8e2 100644 --- a/libs/microbit/pins.ts +++ b/libs/microbit/pins.ts @@ -11,7 +11,7 @@ namespace pins { * @param toLow the lower bound of the value's target range * @param toHigh the upper bound of the value's target range, eg: 4 */ - //% help=pins/map weight=3 + //% help=pins/map weight=22 //% blockId=math_map block="map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh" export function map(value: number, fromLow: number, fromHigh: number, toLow: number, toHigh: number): number { return ((value - fromLow) * (toHigh - toLow)) / (fromHigh - fromLow) + toLow; diff --git a/libs/microbit/shims.d.ts b/libs/microbit/shims.d.ts index e55f5d27..523a9b98 100644 --- a/libs/microbit/shims.d.ts +++ b/libs/microbit/shims.d.ts @@ -483,7 +483,7 @@ declare namespace pins { * @param name analog pin to set period to * @param micros period in micro seconds. eg:20000 */ - //% help=pins/analog-set-period weight=23 + //% help=pins/analog-set-period weight=23 blockGap=8 //% blockId=device_set_analog_period block="analog set period|pin %pin|to (µs)%micros" shim=pins::analogSetPeriod function analogSetPeriod(name: AnalogPin, micros: number): void; @@ -495,10 +495,10 @@ declare namespace pins { function onPulsed(name: DigitalPin, pulse: PulseValue, body: () => void): void; /** - * Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulse`` handler. + * Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulsed`` handler. */ //% help=pins/pulse-micros - //% blockId=pins_pulse_duration block="pulse duration (us)" + //% blockId=pins_pulse_duration block="pulse duration (µs)" //% weight=21 shim=pins::pulseDuration function pulseDuration(): number;