This commit is contained in:
Michael Elliot Braun 2016-04-26 10:46:32 -07:00
commit 3b3e402ffa
4 changed files with 6 additions and 5 deletions

View File

@ -15,7 +15,7 @@ namespace serial {
/**
* Sends a piece of text through Serial connection.
*/
//%
//% blockId=serial_writestring block="serial write %text"
void writeString(StringData *text) {
uBit.serial.send(ManagedString(text));
}

View File

@ -8,7 +8,7 @@ namespace serial {
* @param value to send over serial
*/
//% help=serial/write-line
//% blockId=serial_writeline block="serial|write %text"
//% blockId=serial_writeline block="serial|write line %text"
export function writeLine(text: string): void {
writeString(text);
writeString("\r\n");
@ -17,6 +17,7 @@ namespace serial {
/**
* Prints a numeric value to the serial
*/
//% blockId=serial_writenumber block="serial|write number %value"
export function writeNumber(value: number): void {
writeString(value.toString());
}

View File

@ -528,7 +528,7 @@ declare namespace serial {
/**
* Sends a piece of text through Serial connection.
*/
//% shim=serial::writeString
//% blockId=serial_writestring block="serial write %text" shim=serial::writeString
function writeString(text: string): void;
}

View File

@ -1,6 +1,6 @@
{
"name": "pxt-microbit",
"version": "0.2.90",
"version": "0.2.91",
"description": "BBC micro:bit target for PXT",
"keywords": [
"JavaScript",
@ -29,6 +29,6 @@
"typescript": "^1.8.7"
},
"dependencies": {
"pxt-core": "0.2.98"
"pxt-core": "0.2.99"
}
}