Merge branch 'master' of https://github.com/Microsoft/pxt-microbit
This commit is contained in:
commit
3b3e402ffa
@ -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));
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
|
2
libs/microbit/shims.d.ts
vendored
2
libs/microbit/shims.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user