1 line
4.6 KiB
XML
1 line
4.6 KiB
XML
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><variables><variable id="d$Hz)_vvA0^=g9`rK.n2">data</variable></variables><block type="communicate_bluetooth_peripheral_init" id="?#UT]=GxPx^nmLgY?]8I" x="-1213" y="-853"><value name="VAR"><shadow type="variables_get" id="lZF,kT8Y2M=lL-W2yGqb"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="y,d();(9y3NCy!pC7hir"><field name="TEXT">Mixly_Slave</field></shadow></value><next><block type="communicate_bluetooth_recv" id="xQ*ZXj]3+IsK|eq!f)HB"><value name="VAR"><shadow type="variables_get" id="miF6sMusbS-TWF_h)=wR"><field name="VAR">ble_x</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="LK_5ahOU(g,FeN/690/f"><field name="VALUE">ble_method</field></shadow></value><next><block type="controls_whileUntil" id="XlQ=2}I*8~4?~7G4;Ld_"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id=")g;kZQa3.unz6^7i6:.8"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="k3UEI2t2$_Rxb$U_OZaZ"><mutation else="1"></mutation><value name="IF0"><block type="communicate_bluetooth_is_connected" id="{BeBGl~Z$bOT}v^{s$^o"><value name="VAR"><shadow type="variables_get" id="PvC#eKF1btpfQ{?(Eqm8"><field name="VAR">ble_x</field></shadow></value></block></value><statement name="DO0"><block type="display_show_image_or_string_delay" id="p^)4Is7)=;RmZ^K0vWyw"><field name="center">True</field><value name="data"><shadow type="text" id="UT=i;YWn^6Y~t.k)v}FS"><field name="TEXT">OK</field></shadow></value><value name="space"><shadow type="math_number" id="o~_g:FRoO=.:qjKn?B1G"><field name="NUM">0</field></shadow></value><next><block type="controls_if" id=")JG6p})1HtAXIywLPf28"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="!$Q77B`(rOBq9=3jAE$2"><value name="btn"><shadow type="pins_button" id="W}![W*m(U47?BAKq@Uj/"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="ud~e5m*6(UjA;2/1P*l,"><value name="VAR"><shadow type="variables_get" id="Ls*]fI-|l_:=*CxtNe(x"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="GqG{Ozv08RH+#n}v3G[["><field name="TEXT">A按键按下</field></shadow></value></block></statement><next><block type="controls_if" id="Wc,k]A2!}p]@!E:#7vd-"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="!o2nXDJ*G.=vfcZRl`Hq"><value name="btn"><shadow type="pins_button" id="7;2+^YD0{(ncJkQT.Mr#"><field name="PIN">button_b</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="C8YCgVXEYu|w_=8I;eUw"><value name="VAR"><shadow type="variables_get" id="a7d.87J6Fa|m#AzlI(]~"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="ujl}UwG}+/Dg0_1Rz+89"><field name="TEXT">B按键按下</field></shadow></value></block></statement></block></next></block></next></block></statement><statement name="ELSE"><block type="display_show_image_or_string_delay" id="TS8D[v,h5B.#yKrqDP~m"><field name="center">True</field><value name="data"><shadow type="text" id="qA2xoPRdfpW*XAWw=+^f"><field name="TEXT">==</field></shadow></value><value name="space"><shadow type="math_number" id="~/(x+)xZ!B])IT0kd[9R"><field name="NUM">0</field></shadow></value></block></statement></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="Fevu?3a#fM,SzORqlpc7" x="-1208" y="-319"><mutation><arg name="data" varid="d$Hz)_vvA0^=g9`rK.n2"></arg></mutation><field name="NAME">ble_method</field><statement name="STACK"><block type="system_print" id="|ipi{PbFxmdWz4mUQ#9}"><value name="VAR"><shadow type="text" id="@g3gieM{E^BuhoPoddoB"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="qDx@C]d@N4:aV!4`S(4c"><field name="VAR">data</field></block></value></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGJsZV9wZXJpcGhlcmFsCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CmltcG9ydCBmZWl5aQppbXBvcnQgbWFjaGluZQoKZGVmIGJsZV9tZXRob2QoZGF0YSk6CiAgICBwcmludChkYXRhKQoKCgpibGVfeCA9IGJsZV9wZXJpcGhlcmFsLkJMRVNpbXBsZVBlcmlwaGVyYWwoJ01peGx5X1NsYXZlJykKYmxlX3gucmVjdihibGVfbWV0aG9kKQp3aGlsZSBUcnVlOgogICAgaWYgYmxlX3guaXNfY29ubmVjdGVkKCk6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJ09LJyxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkKICAgICAgICBpZiBmZWl5aS5idXR0b25fYS53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfeC5zZW5kKCdB5oyJ6ZSu5oyJ5LiLJykKICAgICAgICBpZiBmZWl5aS5idXR0b25fYi53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfeC5zZW5kKCdC5oyJ6ZSu5oyJ5LiLJykKICAgIGVsc2U6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJz09JyxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkK</code> |