diff --git a/libs/base/enums.d.ts b/libs/base/enums.d.ts index bd7fcd0e..f457764b 100644 --- a/libs/base/enums.d.ts +++ b/libs/base/enums.d.ts @@ -22,13 +22,8 @@ } - declare const enum ValType { - Undefined = 0, - Boolean = 1, - Number = 2, - String = 3, - Object = 4, - Function = 5, + declare const enum PerfCounters { + GC = 0, } // Auto-generated. Do not edit. Really. diff --git a/libs/base/shims.d.ts b/libs/base/shims.d.ts index bc035e08..7496461a 100644 --- a/libs/base/shims.d.ts +++ b/libs/base/shims.d.ts @@ -42,6 +42,12 @@ declare interface Buffer { //% start.defl=0 length.defl=-1 shim=BufferMethods::shift shift(offset: int32, start?: int32, length?: int32): void; + /** + * Convert a buffer to string assuming UTF8 encoding + */ + //% shim=BufferMethods::toString + toString(): string; + /** * Convert a buffer to its hexadecimal representation. */ @@ -72,6 +78,13 @@ declare namespace control { */ //% shim=control::createBuffer function createBuffer(size: int32): Buffer; + + /** + * Create a new buffer with UTF8-encoded string + * @param str the string to put in the buffer + */ + //% shim=control::createBufferFromUTF8 + function createBufferFromUTF8(str: string): Buffer; } declare namespace loops { @@ -147,7 +160,31 @@ declare namespace control { * */ //% shim=control::__log - function __log(text: string): void; + function __log(prority: int32, text: string): void; + + /** + * Dump internal information about a value. + */ + //% shim=control::dmesgValue + function dmesgValue(v: any): void; + + /** + * Force GC and dump basic information about heap. + */ + //% shim=control::gc + function gc(): void; + + /** + * Force GC and halt waiting for debugger to do a full heap dump. + */ + //% shim=control::heapDump + function heapDump(): void; + + /** + * Return true if profiling is enabled in the current build. + */ + //% shim=control::profilingEnabled + function profilingEnabled(): boolean; } // Auto-generated. Do not edit. Really. diff --git a/libs/screen/shims.d.ts b/libs/screen/shims.d.ts index f8a5b06d..561c1be4 100644 --- a/libs/screen/shims.d.ts +++ b/libs/screen/shims.d.ts @@ -45,6 +45,18 @@ declare interface Image { //% shim=ImageMethods::fill fill(c: int32): void; + /** + * Copy row(s) of pixel from image to buffer (8 bit per pixel). + */ + //% shim=ImageMethods::getRows + getRows(x: int32, dst: Buffer): void; + + /** + * Copy row(s) of pixel from buffer to image. + */ + //% shim=ImageMethods::setRows + setRows(x: int32, src: Buffer): void; + /** * Return a copy of the current image */ diff --git a/package.json b/package.json index d2e3571d..dc79ecbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-ev3", - "version": "1.0.11", + "version": "1.1.0", "description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode", "private": true, "keywords": [ @@ -39,8 +39,8 @@ "webfonts-generator": "^0.4.0" }, "dependencies": { - "pxt-common-packages": "0.23.56", - "pxt-core": "4.0.9" + "pxt-common-packages": "6.4.13", + "pxt-core": "5.5.18" }, "scripts": { "test": "node node_modules/pxt-core/built/pxt.js travis"