diff --git a/libs/base/pxt.json b/libs/base/pxt.json index a6424b46..c85311cf 100644 --- a/libs/base/pxt.json +++ b/libs/base/pxt.json @@ -16,10 +16,8 @@ "ns.ts", "control.cpp", "control.ts", - "eventcontext.ts", - "serial.cpp", - "serial.ts", - "fieldeditors.ts" + "console.ts", + "eventcontext.ts" ], "testFiles": [ "test.ts" diff --git a/libs/base/shims.d.ts b/libs/base/shims.d.ts index 81d0b49b..bc035e08 100644 --- a/libs/base/shims.d.ts +++ b/libs/base/shims.d.ts @@ -142,23 +142,12 @@ declare namespace control { //% blockId="control_device_serial_number" block="device serial number" weight=9 //% help=control/device-serial-number shim=control::deviceSerialNumber function deviceSerialNumber(): int32; -} -declare namespace serial { /** - * Write some text to the serial port. + * */ - //% help=serial/write-string - //% 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 blockHidden=true - //% blockId=serial_writebuffer block="serial|write buffer %buffer" shim=serial::writeBuffer - function writeBuffer(buffer: Buffer): void; + //% shim=control::__log + function __log(text: string): void; } // Auto-generated. Do not edit. Really. diff --git a/libs/core/console.ts b/libs/core/console.ts deleted file mode 100644 index fb768868..00000000 --- a/libs/core/console.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// - -/** - * Reading and writing data to the console output. - */ -//% weight=12 color=#00451A icon="\uf112" -//% advanced=true -namespace console { - type Listener = (text: string) => void; - - const listeners: Listener[] = [ - (text: string) => serial.writeLine(text) - ]; - - /** - * Write a line of text to the console output. - * @param value to send - */ - //% weight=90 - //% help=console/log blockGap=8 - //% blockId=console_log block="console|log %text" - export function log(text: string): void { - for (let i = 0; i < listeners.length; ++i) - listeners[i](text); - } - - /** - * Write a name:value pair as a line of text to the console output. - * @param name name of the value stream, eg: "x" - * @param value to write - */ - //% weight=88 blockGap=8 - //% help=console/log-value - //% blockId=console_log_value block="console|log value %name|= %value" - export function logValue(name: string, value: number): void { - log(`${name}: ${value}`) - } - - /** - * Adds a listener for the log messages - * @param listener - */ - //% - export function addListener(listener: (text: string) => void) { - if (!listener) return; - listeners.push(listener); - } -} diff --git a/libs/core/platform.h b/libs/core/platform.h new file mode 100644 index 00000000..ff35a37e --- /dev/null +++ b/libs/core/platform.h @@ -0,0 +1 @@ +// leave empty \ No newline at end of file diff --git a/libs/core/pxt.json b/libs/core/pxt.json index 42b49b69..e46ecbe4 100644 --- a/libs/core/pxt.json +++ b/libs/core/pxt.json @@ -10,7 +10,6 @@ "linux.cpp", "mmap.cpp", "control.cpp", - "console.ts", "timer.ts", "serialnumber.cpp", "buttons.ts", @@ -25,7 +24,8 @@ "enums.d.ts", "dal.d.ts", "icons.jres", - "ns.ts" + "ns.ts", + "platform.h" ], "testFiles": [ "test.ts" diff --git a/libs/screen/image.d.ts b/libs/screen/image.d.ts new file mode 100644 index 00000000..ff35a37e --- /dev/null +++ b/libs/screen/image.d.ts @@ -0,0 +1 @@ +// leave empty \ No newline at end of file diff --git a/package.json b/package.json index 7f2b9d31..ca875a3a 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "webfonts-generator": "^0.4.0" }, "dependencies": { - "pxt-common-packages": "0.23.15", - "pxt-core": "3.19.4" + "pxt-common-packages": "0.23.37", + "pxt-core": "3.20.5" }, "scripts": { "test": "node node_modules/pxt-core/built/pxt.js travis"