From 9a36a2fc053f4d426ecb5394ab99dd6519a28d27 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 May 2016 13:39:28 -0700 Subject: [PATCH] removing serial event (not supported in DAL) --- libs/microbit/serial.cpp | 4 ++-- libs/microbit/serial.ts | 8 ++++---- libs/microbit/shims.d.ts | 8 -------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/libs/microbit/serial.cpp b/libs/microbit/serial.cpp index a891d36a..ff027c7e 100644 --- a/libs/microbit/serial.cpp +++ b/libs/microbit/serial.cpp @@ -28,8 +28,8 @@ namespace serial { * Registers an event to be fired when one of the delimiter is matched * @param delimiters the characters to match received characters against. eg:"\n" */ - //% help=serial/on-data-received - //% weight=19 + // help=serial/on-data-received + // weight=19 void onDataReceived(StringData* delimiters, Action body) { uBit.serial.eventOn(ManagedString(delimiters)); registerWithDal(MICROBIT_ID_SERIAL, MICROBIT_SERIAL_EVT_DELIM_MATCH, body); diff --git a/libs/microbit/serial.ts b/libs/microbit/serial.ts index 79ab1dc9..1e401af7 100644 --- a/libs/microbit/serial.ts +++ b/libs/microbit/serial.ts @@ -39,10 +39,10 @@ namespace serial { /** * Registers an event to be fired when a line has been received */ - //% help=serial/on-line-received - //% blockId=serial_on_line_received block="serial on line received" - //% weight=21 blockGap=8 + // help=serial/on-line-received + // blockId=serial_on_line_received block="serial on line received" + // weight=21 blockGap=8 export function onLineReceived(body: Action): void { - serial.onDataReceived("\n", body); + // serial.onDataReceived("\n", body); } } diff --git a/libs/microbit/shims.d.ts b/libs/microbit/shims.d.ts index bb7e23bb..e55f5d27 100644 --- a/libs/microbit/shims.d.ts +++ b/libs/microbit/shims.d.ts @@ -575,14 +575,6 @@ declare namespace serial { //% weight=87 //% blockId=serial_writestring block="serial write string %text" shim=serial::writeString function writeString(text: string): void; - - /** - * Registers an event to be fired when one of the delimiter is matched - * @param delimiters the characters to match received characters against. eg:"\n" - */ - //% help=serial/on-data-received - //% weight=19 shim=serial::onDataReceived - function onDataReceived(delimiters: string, body: () => void): void; }