upated to 0.1.7. fixing rename issues
This commit is contained in:
parent
9a50050f7c
commit
10e3fdf007
@ -8,10 +8,6 @@ enum class EventCreationMode {
|
|||||||
* MicroBitEvent is initialised, and no further processing takes place.
|
* MicroBitEvent is initialised, and no further processing takes place.
|
||||||
*/
|
*/
|
||||||
CreateOnly = CREATE_ONLY,
|
CreateOnly = CREATE_ONLY,
|
||||||
/**
|
|
||||||
* MicroBitEvent is initialised, and queued on the MicroBitMessageBus.
|
|
||||||
*/
|
|
||||||
CreateAndQueue = CREATE_AND_QUEUE,
|
|
||||||
/**
|
/**
|
||||||
* MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).
|
* MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).
|
||||||
*/
|
*/
|
||||||
@ -143,10 +139,10 @@ namespace control {
|
|||||||
* Raises an event in the event bus.
|
* Raises an event in the event bus.
|
||||||
* @param src ID of the MicroBit Component that generated the event e.g. MICROBIT_ID_BUTTON_A.
|
* @param src ID of the MicroBit Component that generated the event e.g. MICROBIT_ID_BUTTON_A.
|
||||||
* @param value Component specific code indicating the cause of the event.
|
* @param value Component specific code indicating the cause of the event.
|
||||||
* @param mode optional definition of how the event should be processed after construction (default is CREATE_AND_QUEUE).
|
* @param mode optional definition of how the event should be processed after construction (default is CREATE_AND_FIRE).
|
||||||
*/
|
*/
|
||||||
//% weight=21 blockGap=12 blockId="control_raise_event" block="raise event|from source %src=control_event_source|with value %value=control_event_value" blockExternalInputs=1
|
//% weight=21 blockGap=12 blockId="control_raise_event" block="raise event|from source %src=control_event_source|with value %value=control_event_value" blockExternalInputs=1
|
||||||
//% mode.defl=CREATE_AND_QUEUE
|
//% mode.defl=CREATE_AND_FIRE
|
||||||
void raiseEvent(int src, int value, EventCreationMode mode) {
|
void raiseEvent(int src, int value, EventCreationMode mode) {
|
||||||
MicroBitEvent evt(src, value, (MicroBitEventLaunchMode)mode);
|
MicroBitEvent evt(src, value, (MicroBitEventLaunchMode)mode);
|
||||||
}
|
}
|
||||||
|
4
libs/microbit/enums.d.ts
vendored
4
libs/microbit/enums.d.ts
vendored
@ -119,10 +119,6 @@ declare namespace input {
|
|||||||
* MicroBitEvent is initialised, and no further processing takes place.
|
* MicroBitEvent is initialised, and no further processing takes place.
|
||||||
*/
|
*/
|
||||||
CreateOnly = 0, // CREATE_ONLY
|
CreateOnly = 0, // CREATE_ONLY
|
||||||
/**
|
|
||||||
* MicroBitEvent is initialised, and queued on the MicroBitMessageBus.
|
|
||||||
*/
|
|
||||||
CreateAndQueue = 1, // CREATE_AND_QUEUE
|
|
||||||
/**
|
/**
|
||||||
* MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).
|
* MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).
|
||||||
*/
|
*/
|
||||||
|
@ -9,7 +9,7 @@ namespace serial {
|
|||||||
*/
|
*/
|
||||||
//%
|
//%
|
||||||
StringData* readString() {
|
StringData* readString() {
|
||||||
return uBit.serial.readString().leakData();
|
return uBit.serial.readUntil(ManagedString("\r\n")).leakData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,6 +17,6 @@ namespace serial {
|
|||||||
*/
|
*/
|
||||||
//%
|
//%
|
||||||
void writeString(StringData *text) {
|
void writeString(StringData *text) {
|
||||||
uBit.serial.sendString(ManagedString(text));
|
uBit.serial.send(ManagedString(text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
libs/microbit/shims.d.ts
vendored
4
libs/microbit/shims.d.ts
vendored
@ -332,10 +332,10 @@ declare namespace control {
|
|||||||
* Raises an event in the event bus.
|
* Raises an event in the event bus.
|
||||||
* @param src ID of the MicroBit Component that generated the event e.g. MICROBIT_ID_BUTTON_A.
|
* @param src ID of the MicroBit Component that generated the event e.g. MICROBIT_ID_BUTTON_A.
|
||||||
* @param value Component specific code indicating the cause of the event.
|
* @param value Component specific code indicating the cause of the event.
|
||||||
* @param mode optional definition of how the event should be processed after construction (default is CREATE_AND_QUEUE).
|
* @param mode optional definition of how the event should be processed after construction (default is CREATE_AND_FIRE).
|
||||||
*/
|
*/
|
||||||
//% weight=21 blockGap=12 blockId="control_raise_event" block="raise event|from source %src=control_event_source|with value %value=control_event_value" blockExternalInputs=1
|
//% weight=21 blockGap=12 blockId="control_raise_event" block="raise event|from source %src=control_event_source|with value %value=control_event_value" blockExternalInputs=1
|
||||||
//% mode.defl=1 shim=control::raiseEvent
|
//% mode.defl=2 shim=control::raiseEvent
|
||||||
function raiseEvent(src: number, value: number, mode?: EventCreationMode): void;
|
function raiseEvent(src: number, value: number, mode?: EventCreationMode): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
"autoRun": true
|
"autoRun": true
|
||||||
},
|
},
|
||||||
"compileService": {
|
"compileService": {
|
||||||
"gittag": "v0.1.6",
|
"gittag": "v0.1.7",
|
||||||
"serviceId": "ws"
|
"serviceId": "ws"
|
||||||
},
|
},
|
||||||
"serial": {
|
"serial": {
|
||||||
|
Loading…
Reference in New Issue
Block a user