Merge branch 'master' of https://github.com/Microsoft/pxt-microbit
This commit is contained in:
commit
f76235736a
@ -11,9 +11,7 @@ This example displays a random number every time the crocodile clip holds `GND`
|
||||
|
||||
### Connecting Crocodile Clips
|
||||
|
||||
![](/static/mb/crocodile-clips-1.jpg)
|
||||
|
||||
![](/static/mb/crocodile-clips-2.jpg)
|
||||
|
||||
### Lessons
|
||||
|
||||
|
@ -163,4 +163,12 @@ namespace control {
|
||||
StringData* deviceName() {
|
||||
return ManagedString(microbit_friendly_name()).leakData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Derive a unique, consistent serial number of this device from internal data.
|
||||
*/
|
||||
//%
|
||||
int deviceSerialNumber() {
|
||||
return microbit_serial_number();
|
||||
}
|
||||
}
|
||||
|
@ -301,4 +301,18 @@ namespace pxtrt {
|
||||
{
|
||||
microbit_panic(code);
|
||||
}
|
||||
|
||||
//
|
||||
// Debugger
|
||||
//
|
||||
|
||||
//%
|
||||
uint32_t getNumGlobals() {
|
||||
return numGlobals;
|
||||
}
|
||||
|
||||
//%
|
||||
void* getGlobalsPtr() {
|
||||
return globals;
|
||||
}
|
||||
}
|
||||
|
6
libs/microbit/shims.d.ts
vendored
6
libs/microbit/shims.d.ts
vendored
@ -348,6 +348,12 @@ declare namespace control {
|
||||
*/
|
||||
//% blockId="control_device_name" block="device name" weight=10 shim=control::deviceName
|
||||
function deviceName(): string;
|
||||
|
||||
/**
|
||||
* Derive a unique, consistent serial number of this device from internal data.
|
||||
*/
|
||||
//% shim=control::deviceSerialNumber
|
||||
function deviceSerialNumber(): number;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-microbit",
|
||||
"version": "0.2.91",
|
||||
"version": "0.2.92",
|
||||
"description": "BBC micro:bit target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -29,6 +29,6 @@
|
||||
"typescript": "^1.8.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.2.99"
|
||||
"pxt-core": "0.2.100"
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,10 @@
|
||||
"deployDrives": "^MICROBIT"
|
||||
},
|
||||
"runtime": {
|
||||
"mathBlocks": true
|
||||
"mathBlocks": true,
|
||||
"loopBlocks": true,
|
||||
"logicBlocks": true,
|
||||
"variablesBlocks": true
|
||||
},
|
||||
"simulator": {
|
||||
"autoRun": true
|
||||
|
Loading…
Reference in New Issue
Block a user