This commit is contained in:
Peli de Halleux 2019-03-04 20:44:01 -08:00
parent 0c6e65d828
commit a3e431c892
4 changed files with 55 additions and 11 deletions

View File

@ -22,13 +22,8 @@
} }
declare const enum ValType { declare const enum PerfCounters {
Undefined = 0, GC = 0,
Boolean = 1,
Number = 2,
String = 3,
Object = 4,
Function = 5,
} }
// Auto-generated. Do not edit. Really. // Auto-generated. Do not edit. Really.

39
libs/base/shims.d.ts vendored
View File

@ -42,6 +42,12 @@ declare interface Buffer {
//% start.defl=0 length.defl=-1 shim=BufferMethods::shift //% start.defl=0 length.defl=-1 shim=BufferMethods::shift
shift(offset: int32, start?: int32, length?: int32): void; 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. * Convert a buffer to its hexadecimal representation.
*/ */
@ -72,6 +78,13 @@ declare namespace control {
*/ */
//% shim=control::createBuffer //% shim=control::createBuffer
function createBuffer(size: int32): Buffer; 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 { declare namespace loops {
@ -147,7 +160,31 @@ declare namespace control {
* *
*/ */
//% shim=control::__log //% 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. // Auto-generated. Do not edit. Really.

View File

@ -45,6 +45,18 @@ declare interface Image {
//% shim=ImageMethods::fill //% shim=ImageMethods::fill
fill(c: int32): void; 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 * Return a copy of the current image
*/ */

View File

@ -1,6 +1,6 @@
{ {
"name": "pxt-ev3", "name": "pxt-ev3",
"version": "1.0.11", "version": "1.1.0",
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode", "description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
"private": true, "private": true,
"keywords": [ "keywords": [
@ -39,8 +39,8 @@
"webfonts-generator": "^0.4.0" "webfonts-generator": "^0.4.0"
}, },
"dependencies": { "dependencies": {
"pxt-common-packages": "0.23.56", "pxt-common-packages": "6.4.13",
"pxt-core": "4.0.9" "pxt-core": "5.5.18"
}, },
"scripts": { "scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis" "test": "node node_modules/pxt-core/built/pxt.js travis"