From 387ad763f83907e6307bd2fc53047c16cd29e59e Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 9 Nov 2017 10:14:47 -0800 Subject: [PATCH 1/2] bump pxt-core to 2.3.19, bump pxt-common-packages to 0.12.17, --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d3c374c4..dc88f0e3 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "semantic-ui-less": "^2.2.4" }, "dependencies": { - "pxt-common-packages": "0.12.4", - "pxt-core": "2.3.6" + "pxt-common-packages": "0.12.17", + "pxt-core": "2.3.19" }, "scripts": { "test": "node node_modules/pxt-core/built/pxt.js travis" From 170e6b700b92514e3d05b9b328dc7c4f8c125add Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 9 Nov 2017 10:24:12 -0800 Subject: [PATCH 2/2] updating to latest pxt --- libs/base/_locales/base-jsdoc-strings.json | 2 +- libs/base/_locales/base-strings.json | 2 +- libs/base/shims.d.ts | 10 +++++----- libs/core/linux.cpp | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) 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); }