pxt-microbit 7.0.23 → 7.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/block-tests.js +1 -1
- package/built/editor.js +12 -8
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.json +1 -1
- package/package.json +2 -2
package/built/block-tests.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var testJSON = {"libsTests":[{"packageName":"core","testFiles":[{"testName":"basic.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"PGGhch1kuMF##st8~wFr\">receivedNumber</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"77\" y=\"38\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">12</field>\n </shadow>\n </value>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Umbrella</field>\n <next>\n <block type=\"device_print_message\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\">Hello!</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"418\" y=\"25\"></block>\n</xml>"},{"testName":"control.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"control_in_background\" x=\"-13\" y=\"175\">\n <statement name=\"HANDLER\">\n <block type=\"control_reset\">\n <next>\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"w]G5E,EGl+SOB?91N4SV\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp"\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"~$#[A%Y{}%ZvxA7_z/6+\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value"\"></block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"=OWyqW(E=RBE^i;;QC0$\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"-58\" y=\"393\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"o,i-zrB1+%JG/,EC.6zB\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_DPAD_BUTTON_C_UP</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"n2s(-M;{|izma6OZGq:F\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_REMOTE_CONTROL_EVT_PLAY</field>\n </block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"$3|;#yTHhAwO-r1Bsk:B\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"image.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"-29\" y=\"116\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"builtin_image\">\n <field name=\"i\">IconNames.Heart</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\" id=\"KX(1%=^vQUd=Q`UHhD*n\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </block>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"builtin_arrow_image\">\n <field name=\"i\">ArrowNames.SouthWest</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"145\" y=\"168\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"input.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"wUkGVHoc@p^mter~Rc7h\">item</variable>\n <variable type=\"\" id=\")f$ml.CVl6|1^?sPWl:;\">sdfsadf</variable>\n </variables>\n <block type=\"device_button_event\" x=\"-6\" y=\"17\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P1</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"o~k},FK*r@[O2)Cy!lM}\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"Uu,ZpYs7!BzIpX`%V_^!\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"s{USu#UBc84Ao*jy(EQC\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n <next>\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.TwoG</field>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"472\" y=\"-8\">\n <field name=\"NAME\">Gesture.SixG</field>\n </block>\n <block type=\"device_pin_event\" x=\"555\" y=\"96\">\n <field name=\"name\">TouchPin.P2</field>\n </block>\n <block type=\"device_pin_released\" x=\"188\" y=\"435\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n</xml>"},{"testName":"game.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"B{fp`0m8viO6.2a3):}D\">item</variable>\n <variable type=\"\" id=\")IrU.C_Qui4E3llvPl7H\">gdfgsdfg</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"246\" y=\"25\">\n <statement name=\"HANDLER\">\n <block type=\"game_delete_sprite\">\n <value name=\"this\">\n <block type=\"game_create_sprite\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_move_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"leds\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_turn_sprite\">\n <field name=\"direction\">Direction.Right</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"degrees\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_change_xy\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_set_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"sRSKKdl8vYSc1rPg4mA2\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"other\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_edge\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_sprite_bounce\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"game_add_score\">\n <value name=\"points\">\n <shadow type=\"math_number\" id=\"Z8k_T^n:89Tv{RiBQP!$\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"game_score\"></block>\n </value>\n <next>\n <block type=\"game_set_score\">\n <value name=\"points\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_start_countdown\">\n <value name=\"duration\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">10000</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_game_over\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_set\" disabled=\"true\" x=\"-76\" y=\"44\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"-92\" y=\"111\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"led.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <block type=\"pxt-on-start\" x=\"20\" y=\"20\">\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\" id=\"F!|?!lo8YkE4p2I@MDy?\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"music.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"I3xB5Q]ehg#-~(sq{[|E\">item</variable>\n </variables>\n <block type=\"melody_on_event\" x=\"-27\" y=\"128\">\n <field name=\"value\">MusicEvent.BackgroundMelodyStarted</field>\n <statement name=\"HANDLER\">\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">175</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">147</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">466</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <next>\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1242</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"serial.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"3ch~y{k6dWI;q}kA]3pa\">item</variable>\n </variables>\n <block type=\"serial_on_data_received\" x=\"79\" y=\"287\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\" id=\"Rgi{j+glSZt}8nIn!+08\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"re1R]taer}HU[ed30FDZ\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\" id=\"Y9NXoV7DPB{.(T=w:ei^\">\n <field name=\"TEXT\">x</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\"></field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writenumbers\">\n <value name=\"values\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"3ch~y{k6dWI;q}kA]3pa\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P13</field>\n <field name=\"rate\">BaudRate.BaudRate28800</field>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <block type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"test.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"2w47B[B-y%SK,+8+DQGz\">booltest</variable>\n <variable type=\"\" id=\"Uv6@%!N7Ts}XI7t+j[zB\">myImage</variable>\n <variable type=\"\" id=\"7BPQp@}m*I210zEM4S=3\">strtest</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"481\" y=\"68\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\" id=\")RB0,?b3RM|TO|?[ZPG6\">\n <field name=\"NUM\">123</field>\n </shadow>\n <block type=\"control_event_value"\"></block>\n </value>\n <next>\n <block type=\"device_show_leds\">\n <field name=\"LEDS\">`\n # . . # .\n # . . # .\n . # . . .\n . # # . .\n . . . . .\n `\n </field>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Heart</field>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"timePicker\">\n <field name=\"ms\">500</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.SouthEast</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\" id=\"xu?]Tdz!8RfpHlMjG)~B\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Hash</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_event\" x=\"2407\" y=\"0\">\n <field name=\"name\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"led_set_display_mode\">\n <field name=\"mode\">DisplayMode.Greyscale</field>\n <next>\n <block type=\"device_set_analog_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P4</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\",:%8N*FL3wa-zFQ[+^$9\">\n <mutation min=\"0\" max=\"1023\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">1023</field>\n </shadow>\n <block type=\"device_get_analog_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P13</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_digital_pin\">\n <value name=\"name\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"W~pvdj%jFEj?EHmT{81Z\">\n <mutation min=\"0\" max=\"1\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">0</field>\n </shadow>\n <block type=\"device_get_digital_pin\">\n <value name=\"name\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P15</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_analog_period\">\n <value name=\"pin\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P9</field>\n </block>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"4a@.1MdG`n=p;34mQOpC\">\n <field name=\"NUM\">1234</field>\n </shadow>\n <block type=\"pin_map\">\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"lTWI!)d`ZkwvZW))3X(F\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <value name=\"fromLow\">\n <shadow type=\"math_number\" id=\"2n.VJ_pD7wFdcjM:FToF\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <value name=\"fromHigh\">\n <shadow type=\"math_number\" id=\"-c^:x{=$`RLP5RW9}{6a\">\n <field name=\"NUM\">1023</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <value name=\"toLow\">\n <shadow type=\"math_number\" id=\"#1@Uxq:nFqe!(pHawH9H\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <value name=\"toHigh\">\n <shadow type=\"math_number\" id=\"?%tD/NB|a$cg#TU0/C02\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P20</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"xC9lYf`{!gA-A8R+#~L.\">\n <mutation min=\"0\" max=\"180\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">180</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pulse\">\n <value name=\"value\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P14</field>\n </block>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"@*C3kzJkeeUQ@s$N5?K}\">\n <field name=\"NUM\">1500</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">220</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">659</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Double</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_start_melody\">\n <field name=\"options\">MelodyOptions.ForeverInBackground</field>\n <value name=\"melody\">\n <shadow type=\"device_builtin_melody\">\n <field name=\"melody\">Melodies.Ringtone</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"1570\" y=\"56\">\n <field name=\"NAME\">Gesture.TiltLeft</field>\n <statement name=\"HANDLER\">\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"|}V%t{K/j77J}J54FX]r\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MICROBIT_PIN_EVT_PULSE_HI</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <shadow type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"1172\" y=\"242\">\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">4</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_button_event\" x=\"1294\" y=\"513\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"Z[BsF}r)3:FoNWE|X5}s\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"2we6or2Y|vhAl!^BAYtl\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">5</field>\n </shadow>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number_minmax\" id=\"IjJTgf5z!,K`qd`~pCB3\">\n <mutation min=\"0\" max=\"255\" label=\"Brightness\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"WAUzdT@1z{%:UNn!_dU(\">\n <mutation min=\"0\" max=\"255\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">440</field>\n </block>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">TRUE</field>\n </shadow>\n </value>\n <next>\n <block type=\"input_compass_calibrate\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_in_background\" x=\"0\" y=\"635\">\n <statement name=\"HANDLER\">\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"^!;AKS(vo=ly}ykm1~Z|\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp"\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM1</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_released\" x=\"942\" y=\"723\">\n <field name=\"NAME\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.EightG</field>\n </block>\n </statement>\n </block>\n <block type=\"serial_on_data_received\" x=\"419\" y=\"933\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P14</field>\n <field name=\"rate\">BaudRate.BaudRate19200</field>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"pins_on_pulsed\" x=\"1538\" y=\"929\">\n <value name=\"pin\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </block>\n </value>\n <field name=\"pulse\">PulseValue.Low</field>\n <statement name=\"HANDLER\">\n <block type=\"i2c_writenumber\">\n <field name=\"format\">NumberFormat.UInt8BE</field>\n <value name=\"address\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"repeat\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_pitch\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"ms\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_pin_events\">\n <value name=\"pin\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P0</field>\n </block>\n </value>\n <field name=\"type\">PinEventType.Touch</field>\n <next>\n <block type=\"spi_frequency\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1000000</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_set_pitch_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P2</field>\n </block>\n </value>\n <next>\n <block type=\"device_set_pull\">\n <value name=\"pin\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P2</field>\n </block>\n </value>\n <field name=\"pull\">PinPullMode.PullDown</field>\n <next>\n <block type=\"spi_format\">\n <value name=\"bits\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">8</field>\n </shadow>\n </value>\n <value name=\"mode\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">3</field>\n </shadow>\n </value>\n <next>\n <block type=\"spi_pins\">\n <value name=\"mosi\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P9</field>\n </block>\n </value>\n <value name=\"miso\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P14</field>\n </block>\n </value>\n <value name=\"sck\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P16</field>\n </block>\n </value>\n <next>\n <block type=\"control_reset\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"melody_on_event\" x=\"859\" y=\"1002\">\n <field name=\"value\">MusicEvent.BackgroundMelodyNotePlayed</field>\n <statement name=\"HANDLER\">\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">123</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"4\" max=\"400\" label=\"Bpm\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">12312312</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"SYl:x9lxu0KI{YcmomQz\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\">\n <field name=\"TEXT\">x</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"_gp`6rz8ZI+em9ILvR~6\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"24\" y=\"1406\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P1</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM2</field>\n </shadow>\n </value>\n </block>\n</xml>"},{"testName":"pins.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <block type=\"pins_on_pulsed\" x=\"-157\" y=\"130\">\r\n <value name=\"pin\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P5</field>\r\n </block>\r\n </value>\r\n <field name=\"pulse\">PulseValue.Low</field>\r\n <statement name=\"HANDLER\">\r\n <block type=\"device_set_analog_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_analog_period\">\r\n <value name=\"pin\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P10</field>\r\n </block>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">20000</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_digital_pin\">\r\n <value name=\"name\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P6</field>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P13</field>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pulse\">\r\n <value name=\"value\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P8</field>\r\n </block>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\" id=\"Hx4bpmg|8KSH=b_`+XtP\">\r\n <field name=\"NUM\">1500</field>\r\n </shadow>\r\n <block type=\"math_map\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"J%8`=~h4-?O{fY59%(_{\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_i2c_readnumber\">\r\n <field name=\"format\">NumberFormat.Int8BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"fromLow\">\r\n <shadow type=\"math_number\" id=\"kp(!mScnCVWI/1_X|ar#\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_pulse_in\">\r\n <value name=\"name\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n <field name=\"value\">PulseValue.Low</field>\r\n </block>\r\n </value>\r\n <value name=\"fromHigh\">\r\n <shadow type=\"math_number\" id=\"]@F=`[ZuxAk,=05Yyn[{\">\r\n <field name=\"NUM\">1023</field>\r\n </shadow>\r\n <block type=\"pins_pulse_duration\"></block>\r\n </value>\r\n <value name=\"toLow\">\r\n <shadow type=\"math_number\" id=\"sJDL?hoabUE)cDdBJWO=\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"spi_write\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"toHigh\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">4</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"i2c_writenumber\">\r\n <field name=\"format\">NumberFormat.Int16BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\" id=\"RjJ{^G_#*rwUqER:]i-L\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_digital_pin\">\r\n <value name=\"name\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"CCl{zdVU/!(bR}aUfG,G\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_analog_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </block>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_pins\">\r\n <value name=\"mosi\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P11</field>\r\n </block>\r\n </value>\r\n <value name=\"miso\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n <value name=\"sck\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P10</field>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pull\">\r\n <value name=\"pin\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n <field name=\"pull\">PinPullMode.PullDown</field>\r\n <next>\r\n <block type=\"device_analog_pitch\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"ms\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pin_events\">\r\n <value name=\"pin\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P8</field>\r\n </block>\r\n </value>\r\n <field name=\"type\">PinEventType.Touch</field>\r\n <next>\r\n <block type=\"device_analog_set_pitch_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_frequency\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">1000000</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </statement>\r\n </block>\r\n</xml>"}]}],"commonTests":[]}
|
|
1
|
+
var testJSON = {"libsTests":[{"packageName":"core","testFiles":[{"testName":"basic.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"PGGhch1kuMF##st8~wFr\">receivedNumber</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"77\" y=\"38\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">12</field>\n </shadow>\n </value>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Umbrella</field>\n <next>\n <block type=\"device_print_message\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\">Hello!</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"418\" y=\"25\"></block>\n</xml>"},{"testName":"game.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"B{fp`0m8viO6.2a3):}D\">item</variable>\n <variable type=\"\" id=\")IrU.C_Qui4E3llvPl7H\">gdfgsdfg</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"246\" y=\"25\">\n <statement name=\"HANDLER\">\n <block type=\"game_delete_sprite\">\n <value name=\"this\">\n <block type=\"game_create_sprite\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_move_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"leds\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_turn_sprite\">\n <field name=\"direction\">Direction.Right</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"degrees\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_change_xy\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_set_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"sRSKKdl8vYSc1rPg4mA2\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"other\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_edge\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_sprite_bounce\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"game_add_score\">\n <value name=\"points\">\n <shadow type=\"math_number\" id=\"Z8k_T^n:89Tv{RiBQP!$\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"game_score\"></block>\n </value>\n <next>\n <block type=\"game_set_score\">\n <value name=\"points\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_start_countdown\">\n <value name=\"duration\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">10000</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_game_over\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_set\" disabled=\"true\" x=\"-76\" y=\"44\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"-92\" y=\"111\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"image.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"-29\" y=\"116\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"builtin_image\">\n <field name=\"i\">IconNames.Heart</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\" id=\"KX(1%=^vQUd=Q`UHhD*n\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </block>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"builtin_arrow_image\">\n <field name=\"i\">ArrowNames.SouthWest</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"145\" y=\"168\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"control.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"control_in_background\" x=\"-13\" y=\"175\">\n <statement name=\"HANDLER\">\n <block type=\"control_reset\">\n <next>\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"w]G5E,EGl+SOB?91N4SV\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp"\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"~$#[A%Y{}%ZvxA7_z/6+\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value"\"></block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"=OWyqW(E=RBE^i;;QC0$\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"-58\" y=\"393\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"o,i-zrB1+%JG/,EC.6zB\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_DPAD_BUTTON_C_UP</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"n2s(-M;{|izma6OZGq:F\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_REMOTE_CONTROL_EVT_PLAY</field>\n </block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"$3|;#yTHhAwO-r1Bsk:B\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"led.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <block type=\"pxt-on-start\" x=\"20\" y=\"20\">\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\" id=\"F!|?!lo8YkE4p2I@MDy?\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"input.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"wUkGVHoc@p^mter~Rc7h\">item</variable>\n <variable type=\"\" id=\")f$ml.CVl6|1^?sPWl:;\">sdfsadf</variable>\n </variables>\n <block type=\"device_button_event\" x=\"-6\" y=\"17\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P1</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"o~k},FK*r@[O2)Cy!lM}\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"Uu,ZpYs7!BzIpX`%V_^!\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"s{USu#UBc84Ao*jy(EQC\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n <next>\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.TwoG</field>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"472\" y=\"-8\">\n <field name=\"NAME\">Gesture.SixG</field>\n </block>\n <block type=\"device_pin_event\" x=\"555\" y=\"96\">\n <field name=\"name\">TouchPin.P2</field>\n </block>\n <block type=\"device_pin_released\" x=\"188\" y=\"435\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n</xml>"},{"testName":"music.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"I3xB5Q]ehg#-~(sq{[|E\">item</variable>\n </variables>\n <block type=\"melody_on_event\" x=\"-27\" y=\"128\">\n <field name=\"value\">MusicEvent.BackgroundMelodyStarted</field>\n <statement name=\"HANDLER\">\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">175</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">147</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">466</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <next>\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1242</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"pins.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <block type=\"pins_on_pulsed\" x=\"-157\" y=\"130\">\r\n <value name=\"pin\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P5</field>\r\n </block>\r\n </value>\r\n <field name=\"pulse\">PulseValue.Low</field>\r\n <statement name=\"HANDLER\">\r\n <block type=\"device_set_analog_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_analog_period\">\r\n <value name=\"pin\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P10</field>\r\n </block>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">20000</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_digital_pin\">\r\n <value name=\"name\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P6</field>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P13</field>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pulse\">\r\n <value name=\"value\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P8</field>\r\n </block>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\" id=\"Hx4bpmg|8KSH=b_`+XtP\">\r\n <field name=\"NUM\">1500</field>\r\n </shadow>\r\n <block type=\"math_map\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"J%8`=~h4-?O{fY59%(_{\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_i2c_readnumber\">\r\n <field name=\"format\">NumberFormat.Int8BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"fromLow\">\r\n <shadow type=\"math_number\" id=\"kp(!mScnCVWI/1_X|ar#\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_pulse_in\">\r\n <value name=\"name\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n <field name=\"value\">PulseValue.Low</field>\r\n </block>\r\n </value>\r\n <value name=\"fromHigh\">\r\n <shadow type=\"math_number\" id=\"]@F=`[ZuxAk,=05Yyn[{\">\r\n <field name=\"NUM\">1023</field>\r\n </shadow>\r\n <block type=\"pins_pulse_duration\"></block>\r\n </value>\r\n <value name=\"toLow\">\r\n <shadow type=\"math_number\" id=\"sJDL?hoabUE)cDdBJWO=\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"spi_write\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"toHigh\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">4</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"i2c_writenumber\">\r\n <field name=\"format\">NumberFormat.Int16BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\" id=\"RjJ{^G_#*rwUqER:]i-L\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_digital_pin\">\r\n <value name=\"name\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"CCl{zdVU/!(bR}aUfG,G\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_analog_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </block>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_pins\">\r\n <value name=\"mosi\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P11</field>\r\n </block>\r\n </value>\r\n <value name=\"miso\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n <value name=\"sck\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P10</field>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pull\">\r\n <value name=\"pin\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </block>\r\n </value>\r\n <field name=\"pull\">PinPullMode.PullDown</field>\r\n <next>\r\n <block type=\"device_analog_pitch\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"ms\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pin_events\">\r\n <value name=\"pin\">\r\n <block type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P8</field>\r\n </block>\r\n </value>\r\n <field name=\"type\">PinEventType.Touch</field>\r\n <next>\r\n <block type=\"device_analog_set_pitch_pin\">\r\n <value name=\"name\">\r\n <block type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_frequency\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">1000000</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </statement>\r\n </block>\r\n</xml>"},{"testName":"serial.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"3ch~y{k6dWI;q}kA]3pa\">item</variable>\n </variables>\n <block type=\"serial_on_data_received\" x=\"79\" y=\"287\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\" id=\"Rgi{j+glSZt}8nIn!+08\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"re1R]taer}HU[ed30FDZ\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\" id=\"Y9NXoV7DPB{.(T=w:ei^\">\n <field name=\"TEXT\">x</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\"></field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writenumbers\">\n <value name=\"values\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"3ch~y{k6dWI;q}kA]3pa\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P13</field>\n <field name=\"rate\">BaudRate.BaudRate28800</field>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <block type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"test.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"2w47B[B-y%SK,+8+DQGz\">booltest</variable>\n <variable type=\"\" id=\"Uv6@%!N7Ts}XI7t+j[zB\">myImage</variable>\n <variable type=\"\" id=\"7BPQp@}m*I210zEM4S=3\">strtest</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"481\" y=\"68\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\" id=\")RB0,?b3RM|TO|?[ZPG6\">\n <field name=\"NUM\">123</field>\n </shadow>\n <block type=\"control_event_value"\"></block>\n </value>\n <next>\n <block type=\"device_show_leds\">\n <field name=\"LEDS\">`\n # . . # .\n # . . # .\n . # . . .\n . # # . .\n . . . . .\n `\n </field>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Heart</field>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"timePicker\">\n <field name=\"ms\">500</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.SouthEast</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\" id=\"xu?]Tdz!8RfpHlMjG)~B\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Hash</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_event\" x=\"2407\" y=\"0\">\n <field name=\"name\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"led_set_display_mode\">\n <field name=\"mode\">DisplayMode.Greyscale</field>\n <next>\n <block type=\"device_set_analog_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P4</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\",:%8N*FL3wa-zFQ[+^$9\">\n <mutation min=\"0\" max=\"1023\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">1023</field>\n </shadow>\n <block type=\"device_get_analog_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P13</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_digital_pin\">\n <value name=\"name\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"W~pvdj%jFEj?EHmT{81Z\">\n <mutation min=\"0\" max=\"1\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">0</field>\n </shadow>\n <block type=\"device_get_digital_pin\">\n <value name=\"name\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P15</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_analog_period\">\n <value name=\"pin\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P9</field>\n </block>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"4a@.1MdG`n=p;34mQOpC\">\n <field name=\"NUM\">1234</field>\n </shadow>\n <block type=\"pin_map\">\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"lTWI!)d`ZkwvZW))3X(F\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <value name=\"fromLow\">\n <shadow type=\"math_number\" id=\"2n.VJ_pD7wFdcjM:FToF\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <value name=\"fromHigh\">\n <shadow type=\"math_number\" id=\"-c^:x{=$`RLP5RW9}{6a\">\n <field name=\"NUM\">1023</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <value name=\"toLow\">\n <shadow type=\"math_number\" id=\"#1@Uxq:nFqe!(pHawH9H\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <value name=\"toHigh\">\n <shadow type=\"math_number\" id=\"?%tD/NB|a$cg#TU0/C02\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P20</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"xC9lYf`{!gA-A8R+#~L.\">\n <mutation min=\"0\" max=\"180\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">180</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pulse\">\n <value name=\"value\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P14</field>\n </block>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"@*C3kzJkeeUQ@s$N5?K}\">\n <field name=\"NUM\">1500</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">220</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">659</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Double</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_start_melody\">\n <field name=\"options\">MelodyOptions.ForeverInBackground</field>\n <value name=\"melody\">\n <shadow type=\"device_builtin_melody\">\n <field name=\"melody\">Melodies.Ringtone</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"1570\" y=\"56\">\n <field name=\"NAME\">Gesture.TiltLeft</field>\n <statement name=\"HANDLER\">\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"|}V%t{K/j77J}J54FX]r\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MICROBIT_PIN_EVT_PULSE_HI</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <shadow type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"1172\" y=\"242\">\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">4</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_button_event\" x=\"1294\" y=\"513\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"Z[BsF}r)3:FoNWE|X5}s\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"2we6or2Y|vhAl!^BAYtl\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">5</field>\n </shadow>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number_minmax\" id=\"IjJTgf5z!,K`qd`~pCB3\">\n <mutation min=\"0\" max=\"255\" label=\"Brightness\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"WAUzdT@1z{%:UNn!_dU(\">\n <mutation min=\"0\" max=\"255\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">440</field>\n </block>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">TRUE</field>\n </shadow>\n </value>\n <next>\n <block type=\"input_compass_calibrate\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_in_background\" x=\"0\" y=\"635\">\n <statement name=\"HANDLER\">\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"^!;AKS(vo=ly}ykm1~Z|\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp"\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM1</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_released\" x=\"942\" y=\"723\">\n <field name=\"NAME\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.EightG</field>\n </block>\n </statement>\n </block>\n <block type=\"serial_on_data_received\" x=\"419\" y=\"933\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P14</field>\n <field name=\"rate\">BaudRate.BaudRate19200</field>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"pins_on_pulsed\" x=\"1538\" y=\"929\">\n <value name=\"pin\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </block>\n </value>\n <field name=\"pulse\">PulseValue.Low</field>\n <statement name=\"HANDLER\">\n <block type=\"i2c_writenumber\">\n <field name=\"format\">NumberFormat.UInt8BE</field>\n <value name=\"address\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"repeat\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_pitch\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"ms\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_pin_events\">\n <value name=\"pin\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P0</field>\n </block>\n </value>\n <field name=\"type\">PinEventType.Touch</field>\n <next>\n <block type=\"spi_frequency\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1000000</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_set_pitch_pin\">\n <value name=\"name\">\n <block type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P2</field>\n </block>\n </value>\n <next>\n <block type=\"device_set_pull\">\n <value name=\"pin\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P2</field>\n </block>\n </value>\n <field name=\"pull\">PinPullMode.PullDown</field>\n <next>\n <block type=\"spi_format\">\n <value name=\"bits\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">8</field>\n </shadow>\n </value>\n <value name=\"mode\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">3</field>\n </shadow>\n </value>\n <next>\n <block type=\"spi_pins\">\n <value name=\"mosi\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P9</field>\n </block>\n </value>\n <value name=\"miso\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P14</field>\n </block>\n </value>\n <value name=\"sck\">\n <block type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P16</field>\n </block>\n </value>\n <next>\n <block type=\"control_reset\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"melody_on_event\" x=\"859\" y=\"1002\">\n <field name=\"value\">MusicEvent.BackgroundMelodyNotePlayed</field>\n <statement name=\"HANDLER\">\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">123</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"4\" max=\"400\" label=\"Bpm\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">12312312</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"SYl:x9lxu0KI{YcmomQz\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\">\n <field name=\"TEXT\">x</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"_gp`6rz8ZI+em9ILvR~6\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"24\" y=\"1406\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P1</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM2</field>\n </shadow>\n </value>\n </block>\n</xml>"}]}],"commonTests":[]}
|
package/built/editor.js
CHANGED
|
@@ -3429,14 +3429,7 @@ class DAPWrapper {
|
|
|
3429
3429
|
const connectionId = this.connectionId;
|
|
3430
3430
|
this.allocDAP(); // clean dap apis
|
|
3431
3431
|
await this.io.reconnectAsync();
|
|
3432
|
-
|
|
3433
|
-
// to commands from previous sessions (if any) are flushed. Count of 5 is arbitrary.
|
|
3434
|
-
for (let i = 0; i < 5; i++) {
|
|
3435
|
-
try {
|
|
3436
|
-
await this.getDaplinkVersionAsync();
|
|
3437
|
-
}
|
|
3438
|
-
catch (e) { }
|
|
3439
|
-
}
|
|
3432
|
+
await this.clearCommandsAsync();
|
|
3440
3433
|
// halt before reading from dap
|
|
3441
3434
|
// to avoid interference from data logger
|
|
3442
3435
|
await this.cortexM.halt();
|
|
@@ -3465,6 +3458,16 @@ class DAPWrapper {
|
|
|
3465
3458
|
// start jacdac, serial async
|
|
3466
3459
|
this.startReadSerial(connectionId);
|
|
3467
3460
|
}
|
|
3461
|
+
async clearCommandsAsync() {
|
|
3462
|
+
// before calling into dapjs, push through a few commands to make sure the responses
|
|
3463
|
+
// to commands from previous sessions (if any) are flushed. Count of 5 is arbitrary.
|
|
3464
|
+
for (let i = 0; i < 5; i++) {
|
|
3465
|
+
try {
|
|
3466
|
+
await this.getDaplinkVersionAsync();
|
|
3467
|
+
}
|
|
3468
|
+
catch (e) { }
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3468
3471
|
async getDaplinkVersionAsync() {
|
|
3469
3472
|
return await this.dapCmdNums(0x00, 0x04);
|
|
3470
3473
|
}
|
|
@@ -3505,6 +3508,7 @@ class DAPWrapper {
|
|
|
3505
3508
|
if (!this.io.isConnected()) {
|
|
3506
3509
|
await this.io.reconnectAsync();
|
|
3507
3510
|
}
|
|
3511
|
+
await this.clearCommandsAsync();
|
|
3508
3512
|
await this.stopReadersAsync();
|
|
3509
3513
|
await this.cortexM.init();
|
|
3510
3514
|
await this.cortexM.reset(true);
|