From e942fb57336175a0d167009fe5cafc1308ab3821 Mon Sep 17 00:00:00 2001 From: Thomas Denney Date: Mon, 18 Jul 2016 10:12:00 +0100 Subject: [PATCH 1/2] Minor linting changes --- libs/microbit/control.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/microbit/control.ts b/libs/microbit/control.ts index f2d4ec1a..ecfc4e93 100644 --- a/libs/microbit/control.ts +++ b/libs/microbit/control.ts @@ -23,18 +23,17 @@ namespace control { * Display specified error code and stop the program. */ //% shim=pxtrt::panic - export function panic(code: number) { - } + export function panic(code: number) { } /** * If the condition is false, display msg on serial console, and panic with code 098. */ - export function assert(condition:boolean, msg?: string) - { + export function assert(condition: boolean, msg ?: string) { if (!condition) { console.log("ASSERTION FAILED") - if (msg != null) + if (msg != null) { console.log(msg) + } panic(98) } } From 141420d33748db3c661a32605df825cde578b933 Mon Sep 17 00:00:00 2001 From: Thomas Denney Date: Tue, 9 Aug 2016 16:05:25 +0100 Subject: [PATCH 2/2] Correct Bluetooth doc comment --- libs/microbit-bluetooth/bluetooth.cpp | 4 ++-- libs/microbit-bluetooth/shims.d.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/microbit-bluetooth/bluetooth.cpp b/libs/microbit-bluetooth/bluetooth.cpp index 81585e9d..3d668351 100644 --- a/libs/microbit-bluetooth/bluetooth.cpp +++ b/libs/microbit-bluetooth/bluetooth.cpp @@ -84,8 +84,8 @@ namespace bluetooth { /** * Starts the Bluetooth UART service */ - // help=bluetooth/start-uart-service - // blockId=bluetooth_start_uart_service block="bluetooth uart service" blockGap=8 + //% help=bluetooth/start-uart-service + //% blockId=bluetooth_start_uart_service block="bluetooth uart service" blockGap=8 void startUartService() { if (uart) return; // 61 octet buffer size is 3 x (MTU - 3) + 1 diff --git a/libs/microbit-bluetooth/shims.d.ts b/libs/microbit-bluetooth/shims.d.ts index 0606d684..2cbc3c0c 100644 --- a/libs/microbit-bluetooth/shims.d.ts +++ b/libs/microbit-bluetooth/shims.d.ts @@ -49,6 +49,13 @@ declare namespace bluetooth { //% blockId=bluetooth_start_button_service block="bluetooth button service" blockGap=8 shim=bluetooth::startButtonService function startButtonService(): void; + /** + * Starts the Bluetooth UART service + */ + //% help=bluetooth/start-uart-service + //% blockId=bluetooth_start_uart_service block="bluetooth uart service" blockGap=8 shim=bluetooth::startUartService + function startUartService(): void; + /** * Writes to the Bluetooth UART service buffer. From there the data is transmitted over Bluetooth to a connected device. */