Compare commits

...

20 Commits

Author SHA1 Message Date
472846bf3c 0.7.43 2017-01-20 15:16:42 -08:00
ac4fbc850b Bump pxt-core to 0.10.14 2017-01-20 15:16:40 -08:00
c7054b7ee0 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2017-01-20 15:16:29 -08:00
559a43e17b 0.7.42 2017-01-20 15:05:50 -08:00
7671bc46ad Bump pxt-core to 0.10.13 2017-01-20 15:05:49 -08:00
b3c5f2926d Electron release 0.7.41 2017-01-20 11:02:59 -08:00
28830aa905 more info on on-start 2017-01-19 17:51:48 -08:00
7fbbb5e65a release of beta 2017-01-19 16:55:20 -08:00
51ebc29887 0.7.41 2017-01-19 16:09:32 -08:00
f5d1722eae Bump pxt-core to 0.10.11 2017-01-19 16:09:29 -08:00
5f876d5ea9 Add openocd script (for pxt gdb) 2017-01-19 17:24:03 +00:00
31de8892fa Use standard type names
otherwise compilation fails on some yotta installs
2017-01-19 17:23:51 +00:00
0d0a68122d 0.7.40 2017-01-19 00:19:15 -08:00
4ad660568e Bump pxt-core to 0.10.10 2017-01-19 00:19:14 -08:00
58e82a571d 0.7.39 2017-01-18 16:14:11 -08:00
e629b866d5 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2017-01-18 16:13:08 -08:00
f0ac2b7a05 fixing debug message 2017-01-18 16:12:58 -08:00
e3c8db28e4 0.7.38 2017-01-18 14:48:43 -08:00
2c0e19a120 Bump pxt-core to 0.10.9 2017-01-18 14:48:42 -08:00
595eb788b2 removed console.log for pxt.debug 2017-01-17 16:51:21 -08:00
8 changed files with 22 additions and 11 deletions

View File

@ -2,6 +2,10 @@
### @description Language constructs for the Block editor.
Blocks snap into each other to define the program that your @boardname@ will run.
Blocks can be event (buttons, shake, ...) or need to be snapped into an event to run.
The [on-start](/blocks/on-start) event runs first.
```namespaces
for (let i = 0;i<5;++i) {}
if (true){}

View File

@ -16,7 +16,13 @@ input.onButtonPressed(Button.A, () => {
led.setBrightness(50)
```
## What about JavaScript?
``on-start`` only exists in the block editor. In JavaScript, all code executes sequentially from the first line.
## Hey, my events moved!
When we transform the blocks into JavaScript, we always place all the event registrations (buttons, shake, ...)
before launching the ``on start`` code.
If a block from ``on start`` pauses, other registered events will have the opportunity to run as well.

View File

@ -1,3 +1,3 @@
{
"appref": "v0.6.36"
"appref": "v0.7.41"
}

View File

@ -1,9 +1,9 @@
{
"versions": {
"0": {
"latest": "v0.7.29",
"latest": "v0.7.41",
"banned": [],
"prompt": "v0.7.29"
"prompt": "v0.7.41"
}
}
}

View File

@ -338,10 +338,10 @@ namespace pxt {
void Segment::print()
{
printf("Segment: %x, length: %u, size: %u\n", data, (uint)length, (uint)size);
for(uint i = 0; i < size; i++)
printf("Segment: %x, length: %u, size: %u\n", data, (uint32_t)length, (uint32_t)size);
for(uint32_t i = 0; i < size; i++)
{
printf("%d ",(uint)data[i]);
printf("%d ",(uint32_t)data[i]);
}
printf("\n");
}

View File

@ -1,6 +1,6 @@
{
"name": "pxt-microbit",
"version": "0.7.37",
"version": "0.7.43",
"description": "micro:bit target for PXT",
"keywords": [
"JavaScript",
@ -36,6 +36,6 @@
"semantic-ui-less": "^2.2.4"
},
"dependencies": {
"pxt-core": "0.10.8"
"pxt-core": "0.10.14"
}
}

View File

@ -28,6 +28,7 @@
"deployDrives": "(MICROBIT|MBED)",
"driveName": "MICROBIT",
"hexMimeType": "application/x-microbit-hex",
"openocdScript": "source [find interface/cmsis-dap.cfg]; source [find target/nrf51.cfg]",
"upgrades": [
{
"type": "package",
@ -338,4 +339,4 @@
}
}
}
}
}

View File

@ -28,7 +28,7 @@ namespace pxsim {
this.data = data;
}
public print() {
console.log(`Image id:${this.id} refs:${this.refcnt} size:${this.width}x${Image.height}`)
// console.debug(`Image id:${this.id} refs:${this.refcnt} size:${this.width}x${Image.height}`)
}
public get(x: number, y: number): number {
if (x < 0 || x >= this.width || y < 0 || y >= 5) return 0;