updating to latest pxt
This commit is contained in:
parent
387ad763f8
commit
170e6b700b
@ -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"
|
||||
}
|
@ -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",
|
||||
|
10
libs/base/shims.d.ts
vendored
10
libs/base/shims.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user