Move forever and runinbackground after onstart (#555)

This commit is contained in:
Richard Knoll 2017-10-24 13:10:54 -07:00 committed by GitHub
parent 3ec0534064
commit b67ff733ab
3 changed files with 11 additions and 11 deletions

View File

@ -112,7 +112,7 @@ namespace basic {
* Repeats the code forever in the background. On each iteration, allows other codes to run.
* @param body code to execute
*/
//% help=basic/forever weight=55 blockGap=8 blockAllowMultiple=1
//% help=basic/forever weight=55 blockGap=8 blockAllowMultiple=1 afterOnStart=true
//% blockId=device_forever block="forever" icon="\uf01e"
void forever(Action a) {
if (a != 0) {

View File

@ -217,7 +217,7 @@ namespace control {
/**
* Schedules code that run in the background.
*/
//% help=control/in-background blockAllowMultiple=1
//% help=control/in-background blockAllowMultiple=1 afterOnStart=true
//% blockId="control_in_background" block="run in background" blockGap=8
void inBackground(Action a) {
runInBackground(a);

View File

@ -196,7 +196,7 @@ declare namespace basic {
* Repeats the code forever in the background. On each iteration, allows other codes to run.
* @param body code to execute
*/
//% help=basic/forever weight=55 blockGap=8 blockAllowMultiple=1
//% help=basic/forever weight=55 blockGap=8 blockAllowMultiple=1 afterOnStart=true
//% blockId=device_forever block="forever" icon="\uf01e" shim=basic::forever
function forever(a: () => void): void;
@ -373,7 +373,7 @@ declare namespace control {
/**
* Schedules code that run in the background.
*/
//% help=control/in-background blockAllowMultiple=1
//% help=control/in-background blockAllowMultiple=1 afterOnStart=true
//% blockId="control_in_background" block="run in background" blockGap=8 shim=control::inBackground
function inBackground(a: () => void): void;