diff --git a/libs/base/_locales/base-jsdoc-strings.json b/libs/base/_locales/base-jsdoc-strings.json index 110fe87e..c1e29892 100644 --- a/libs/base/_locales/base-jsdoc-strings.json +++ b/libs/base/_locales/base-jsdoc-strings.json @@ -151,6 +151,6 @@ "serial.writeNumber": "Write a number to the serial port.", "serial.writeString": "Write some text to the serial port.", "serial.writeValue": "Write a name:value pair as a line of text to the serial port.", - "serial.writeValue|param|name": "name of the value stream, eg: x", + "serial.writeValue|param|name": "name of the value stream, eg: \"x\"", "serial.writeValue|param|value": "to write" } \ No newline at end of file diff --git a/libs/base/_locales/base-strings.json b/libs/base/_locales/base-strings.json index 8697e476..6df21f59 100644 --- a/libs/base/_locales/base-strings.json +++ b/libs/base/_locales/base-strings.json @@ -30,7 +30,7 @@ "control.waitMicros|block": "wait (µs)%micros", "control|block": "control", "loops.forever|block": "forever", - "loops.pause|block": "pause %ms=timePicker|ms", + "loops.pause|block": "pause %pause=timePicker|ms", "loops.timePicker|block": "%ms", "loops|block": "loops", "parseInt|block": "parse to integer %text", diff --git a/libs/base/shims.d.ts b/libs/base/shims.d.ts index 1d86fdb2..9de0837e 100644 --- a/libs/base/shims.d.ts +++ b/libs/base/shims.d.ts @@ -79,7 +79,7 @@ declare namespace loops { * @param ms how long to pause for, eg: 100, 200, 500, 1000, 2000 */ //% help=loops/pause weight=99 - //% async block="pause %ms=timePicker|ms" + //% async block="pause %pause=timePicker|ms" //% blockId=device_pause shim=loops::pause function pause(ms: int32): void; } @@ -99,8 +99,8 @@ declare namespace control { */ //% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src|with value %value" //% blockExternalInputs=1 - //% help="control/on-event" shim=control::onEvent - function onEvent(src: int32, value: int32, handler: () => void): void; + //% help="control/on-event" flags.defl=16 shim=control::onEvent + function onEvent(src: int32, value: int32, handler: () => void, flags?: int32): void; /** * Reset the device. @@ -144,14 +144,14 @@ declare namespace serial { * Write some text to the serial port. */ //% help=serial/write-string - //% weight=87 + //% weight=87 blockHidden=true //% blockId=serial_writestring block="serial|write string %text" shim=serial::writeString function writeString(text: string): void; /** * Send a buffer across the serial connection. */ - //% help=serial/write-buffer weight=6 + //% help=serial/write-buffer weight=6 blockHidden=true //% blockId=serial_writebuffer block="serial|write buffer %buffer" shim=serial::writeBuffer function writeBuffer(buffer: Buffer): void; } diff --git a/libs/core/linux.cpp b/libs/core/linux.cpp index ac40c270..52eb0982 100644 --- a/libs/core/linux.cpp +++ b/libs/core/linux.cpp @@ -352,7 +352,8 @@ void raiseEvent(int id, int event) { pthread_mutex_unlock(&eventMutex); } -void registerWithDal(int id, int event, Action a) { +void registerWithDal(int id, int event, Action a, int flags) { + // TODO support flags setBinding(id, event, a); }