-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
1 lines (1 loc) · 15.3 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</variable><variable id="?ln~g1r?/CVy[S_@%mAx">WW</variable><variable id="3ql:@;WaD)mHHrm4r^i(">WB</variable><variable id="X=wp17,NsKpx;*/L}w;m">BW</variable><variable id="@-~hP3e!Q;(KW,7taCYI">BB</variable><variable id=".kU1AZd%T,dQk.rMPMEC">timeInterval</variable><variable id="_654}nD1WjpZUe.YuT4s">threshold</variable><variable id="+8R@=I?jOR=XSOR3;|x@">power</variable><variable id="|3xs.sG.%^ETSC808638">gain</variable></variables><block type="pxt-on-start" id="MwJHe#1HeWU/bP{LLp2P" x="33" y="52"><statement name="HANDLER"><block type="variables_set" id="Q``j!X:o$l^0u^c9LAGO"><field name="VAR" id=".kU1AZd%T,dQk.rMPMEC">timeInterval</field><comment pinned="false" h="80" w="160">比例制御</comment><value name="VALUE"><shadow type="math_number" id="}2!.1ZoEj^N|kNqdT2?+"><field name="NUM">500</field></shadow></value><next><block type="variables_set" id="vGLqw3|DMLx-Wjd#+OL4"><field name="VAR" id="_654}nD1WjpZUe.YuT4s">threshold</field><comment pinned="false" h="80" w="160">ms</comment><value name="VALUE"><shadow type="math_number" id="Wg9XI_$Zp(zde*i,(g;."><field name="NUM">50</field></shadow></value><next><block type="variables_set" id="gf;OYh}uJx5Z]DWX4nz?"><field name="VAR" id="+8R@=I?jOR=XSOR3;|x@">power</field><value name="VALUE"><shadow type="math_number" id="GT1}:PYl/9X(H%zlBNr,"><field name="NUM">60</field></shadow></value><next><block type="variables_set" id="9*lIur#wC@(b?xRCb6SF"><field name="VAR" id="|3xs.sG.%^ETSC808638">gain</field><value name="VALUE"><shadow type="math_number" id="F,$#6Y5|A~OA!@3I{vkB"><field name="NUM">0.6</field></shadow></value><next><block type="variables_set" id="/{Ot?7B_^C%,+%f~$.tR"><field name="VAR" id="?ln~g1r?/CVy[S_@%mAx">WW</field><comment pinned="false" h="80" w="160">条件式定義</comment><value name="VALUE"><shadow type="math_number" id="x7d}o1eEyadtUa@_qiu."><field name="NUM">0</field></shadow><block type="logic_operation" id="z`k@.#6(?b)M5MW4F1bC"><field name="OP">AND</field><value name="A"><shadow type="logic_boolean" id="2hE)lD$:7@M0qOk^xBjz"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="8P]t8NY{woNU-)9bCxp|"><field name="direct">Tinybit.enPos.LeftState</field><field name="value">Tinybit.enLineState.White</field></block></value><value name="B"><shadow type="logic_boolean" id="r]vYyHCw9-kL2AR6t+`1"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="NoFWrdmoiHF_UISneFQa"><field name="direct">Tinybit.enPos.RightState</field><field name="value">Tinybit.enLineState.White</field></block></value></block></value><next><block type="variables_set" id="+6Vf%e#5xi|.ckzdv@6H"><field name="VAR" id="3ql:@;WaD)mHHrm4r^i(">WB</field><value name="VALUE"><shadow type="math_number" id=";(^)UFrJZaFgS2AuYrs^"><field name="NUM">0</field></shadow><block type="logic_operation" id="}:[}Eck$2qrc!;S5Y#l7"><field name="OP">AND</field><value name="A"><shadow type="logic_boolean" id="e3gADw~xPf?EjVj},jX9"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="kFC9YN(0~eUZkQgKttdY"><field name="direct">Tinybit.enPos.LeftState</field><field name="value">Tinybit.enLineState.White</field></block></value><value name="B"><shadow type="logic_boolean" id="I[I3G^QUaRr2fI1[)dUe"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="(Bo~wF,zMVE+kKLM.P*/"><field name="direct">Tinybit.enPos.RightState</field><field name="value">Tinybit.enLineState.Black</field></block></value></block></value><next><block type="variables_set" id="/FY^_s+-4sgRCp79aHR0"><field name="VAR" id="X=wp17,NsKpx;*/L}w;m">BW</field><value name="VALUE"><shadow type="math_number" id="t;mMx_oayF9ZSu}BXqVF"><field name="NUM">0</field></shadow><block type="logic_operation" id="(+x?G`X$d1U:Nh(m(u/:"><field name="OP">AND</field><value name="A"><shadow type="logic_boolean" id="rom.B3JJ{=++%Cbu3si2"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="n*1Z,exGVFC1YMz1_w.v"><field name="direct">Tinybit.enPos.LeftState</field><field name="value">Tinybit.enLineState.Black</field></block></value><value name="B"><shadow type="logic_boolean" id="h~#X`I.D90%?)ZZmg5=;"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="puQQ~t(c!A[(ht$no(o!"><field name="direct">Tinybit.enPos.RightState</field><field name="value">Tinybit.enLineState.White</field></block></value></block></value><next><block type="variables_set" id="TPqKwERZL1Tno1V1Ac#8"><field name="VAR" id="@-~hP3e!Q;(KW,7taCYI">BB</field><value name="VALUE"><shadow type="math_number" id="^%+sS707hZs4RF7l}S~3"><field name="NUM">0</field></shadow><block type="logic_operation" id="9UURU{[Loa(0m3PCG5;D"><field name="OP">AND</field><value name="A"><shadow type="logic_boolean" id="E-KvkifT_[j=4h%nG]03"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="SiXW3.o7hsGc)A@9_txo"><field name="direct">Tinybit.enPos.LeftState</field><field name="value">Tinybit.enLineState.Black</field></block></value><value name="B"><shadow type="logic_boolean" id="`?P2Em=(r{nji`EbL=g6"><field name="BOOL">TRUE</field></shadow><block type="Tinybit_Line_Sensor" id="tvV+6hb(`fllY1/c[!7R"><field name="direct">Tinybit.enPos.RightState</field><field name="value">Tinybit.enLineState.Black</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_forever" id="buEbHsx2-?sd9UiOD-;_" x="1558" y="0"><statement name="HANDLER"><block type="controls_if" id="P[oGo^8M)HX6$@:ZWb9E"><mutation elseif="3"></mutation><value name="IF0"><shadow type="logic_boolean" id="HSDdY8v:?yiD*/?o^}Q}"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="c)EN;H5_ttx(qw89f8(v"><field name="VAR" id="?ln~g1r?/CVy[S_@%mAx">WW</field></block></value><statement name="DO0"><block type="function_call" id="A%Yy9@}OC$T~`spuzOl4"><mutation name="move" functionid="^_SC2qU^__?S0+~Q1b@g"><arg name="leftSpeed" id="9newxfoaexn7ugt6bs5m" type="number"></arg><arg name="rightSpeed" id="6htz0ra16w1lx5q3fqu8" type="number"></arg></mutation><value name="9newxfoaexn7ugt6bs5m"><shadow type="math_number" id="niDB,+g%X2N!H3k8.d%W"><field name="NUM">120</field></shadow></value><value name="6htz0ra16w1lx5q3fqu8"><shadow type="math_number" id="#%.52Oj3}/v3#iVK]K8H"><field name="NUM">120</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean" id=")_,iD,H%wf(|U]].x)~$"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="7V^kQj,;7Xne4Zc22Kbd"><field name="VAR" id="3ql:@;WaD)mHHrm4r^i(">WB</field></block></value><statement name="DO1"><block type="function_call" id="GY#?N~,^)NndPC;2/_RX"><mutation name="move" functionid="^_SC2qU^__?S0+~Q1b@g"><arg name="leftSpeed" id="9newxfoaexn7ugt6bs5m" type="number"></arg><arg name="rightSpeed" id="6htz0ra16w1lx5q3fqu8" type="number"></arg></mutation><value name="9newxfoaexn7ugt6bs5m"><shadow type="math_number" id=".yJ~v[@B)w1ebQydO:K+"><field name="NUM">60</field></shadow></value><value name="6htz0ra16w1lx5q3fqu8"><shadow type="math_number" id="`4$4`XiVWo!c9R*Q^cQ;"><field name="NUM">0</field></shadow></value></block></statement><value name="IF2"><shadow type="logic_boolean" id="U@`jSSRrj{BQ6YM{0wx9"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="#t?LUGHEm$1tS]4anj6h"><field name="VAR" id="X=wp17,NsKpx;*/L}w;m">BW</field></block></value><statement name="DO2"><block type="function_call" id="]Ex+~}Q]gsjgOz%(fo{H"><mutation name="move" functionid="^_SC2qU^__?S0+~Q1b@g"><arg name="leftSpeed" id="9newxfoaexn7ugt6bs5m" type="number"></arg><arg name="rightSpeed" id="6htz0ra16w1lx5q3fqu8" type="number"></arg></mutation><value name="9newxfoaexn7ugt6bs5m"><shadow type="math_number" id="1Jr~a[!@Nb7A03RrBvoE"><field name="NUM">0</field></shadow></value><value name="6htz0ra16w1lx5q3fqu8"><shadow type="math_number" id="[DHfNO(EAjQV0@fViw~a"><field name="NUM">60</field></shadow></value></block></statement><value name="IF3"><shadow type="logic_boolean" id="=8@`P9@)P%{g0]Ctp=Ux"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="gAj;eUS(@w4js(_YTmGt"><field name="VAR" id="@-~hP3e!Q;(KW,7taCYI">BB</field></block></value><statement name="DO3"><block type="Tinybit_CarCtrlSpeed" id="BDastbhF0,*e%HJC[Tk4"><field name="index">Tinybit.CarState.Car_Stop</field><value name="speed"><shadow type="math_number_minmax" id="|tg~G}-g6A}*%xcA^RXg"><mutation min="0" max="255" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="synth_set_volume" id="4@?04n=pP2dja/th7,@^"><value name="volume"><shadow type="math_number_minmax" id="7-2zB.vWo`w-W!l6YZRo"><mutation min="0" max="255" precision="0"></mutation><field name="SLIDER">40</field></shadow></value><next><block type="music_playable_play" id="Uw4Cn0{?/+1#0wBxJAl#"><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_string_playable" id="oX%dB0=9:%bixtKKN17Y"><value name="melody"><shadow type="melody_editor" id="[X=fY_e4dA.|-)#{dIxX"><field name="melody">"C5 F C5 F C5 F C5 F "</field></shadow></value><value name="bpm"><shadow type="math_number_minmax" id="J;:l#jft^v9(U,RLgQ=x"><mutation min="40" max="500" precision="0"></mutation><field name="SLIDER">120</field></shadow></value></shadow></value><next><block type="device_print_message" id="$*h8slV7c$Ay;HRx*ebI"><value name="text"><shadow type="text" id="~2NIoLejx5cD;#V2t@?^"><field name="TEXT">SOS</field></shadow></value></block></next></block></next></block></next></block></statement></block></statement></block><block type="function_definition" id="x^`=FRIHhy.GyMd4ZjQ;" x="342" y="705"><mutation name="move" functionid="^_SC2qU^__?S0+~Q1b@g"><arg name="leftSpeed" id="9newxfoaexn7ugt6bs5m" type="number"></arg><arg name="rightSpeed" id="6htz0ra16w1lx5q3fqu8" type="number"></arg></mutation><field name="function_name">move</field><value name="9newxfoaexn7ugt6bs5m"><block type="argument_reporter_number" id="s9gp(c,oGwcc#^kVg!fY"><mutation duplicateondrag="true"></mutation><field name="VALUE">leftSpeed</field></block></value><value name="6htz0ra16w1lx5q3fqu8"><block type="argument_reporter_number" id="?R40+.{B3n1L5}ra.o7r"><mutation duplicateondrag="true"></mutation><field name="VALUE">rightSpeed</field></block></value><statement name="STACK"><block type="variables_set" id="8TQdUBAB74TcXmAo/5B:"><field name="VAR" id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</field><value name="VALUE"><shadow type="math_number" id=".oInU$-C24o!Fa/dVD6H"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="E!Mbqn|s_5q3LT$1_:db"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="xp[=IBCm/k*l{1q@ZtCf"><field name="NUM">0</field></shadow><block type="argument_reporter_number" id="ep}43X0K,F[r?g|ONoZ}"><field name="VALUE">leftSpeed</field></block></value><value name="B"><shadow type="math_number" id="C|w5+2hk,]~|fqxg~t|%"><field name="NUM">0</field></shadow><block type="argument_reporter_number" id="FzQBoVi96t(,P{F{9H4+"><field name="VALUE">rightSpeed</field></block></value></block></value><next><block type="controls_if" id="{jr3YB~t@l2ME$G@[LYG"><mutation elseif="2"></mutation><value name="IF0"><shadow type="logic_boolean" id="5;THnm4._P7oPW6}1QB$"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="b!zyX[|7OHCsN,@P@}L="><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="_[84}Pz/^k!~]NLagw|u"><field name="NUM">0</field></shadow><block type="variables_get" id="nD!6Id^BQM:sQnL^M|r,"><field name="VAR" id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</field></block></value><value name="B"><shadow type="math_number" id="I?Vl|l3rKzSaFH:q[hCL"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="Tinybit_CarCtrlSpeed" id="=mu=m_r/+*dcTCtO$v%E"><field name="index">Tinybit.CarState.Car_Run</field><value name="speed"><shadow type="math_number_minmax" id="B_2^C]~E%I3BE+$J*9e6"><mutation min="0" max="255" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="argument_reporter_number" id="OAh+I6hxYYt#z]8aKmFK"><field name="VALUE">leftSpeed</field></block></value></block></statement><value name="IF1"><shadow type="logic_boolean" id="x=-eb[z9G/vk^M=skql:"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="{naSt87lm+-#5sib++mF"><field name="OP">GT</field><value name="A"><shadow type="math_number" id="Sn.pQH$eT,x)1VC~8z!F"><field name="NUM">0</field></shadow><block type="variables_get" id=".fQwg*P_O7OK5mt^QS4j"><field name="VAR" id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</field></block></value><value name="B"><shadow type="math_number" id="@sdB_arD:D/{e1FNEc,t"><field name="NUM">0</field></shadow></value></block></value><statement name="DO1"><block type="Tinybit_CarCtrlSpeed" id="{+/gxVr/xu2t}hgSalM`"><field name="index">Tinybit.CarState.Car_SpinRight</field><value name="speed"><shadow type="math_number_minmax" id="6@WN6mQm_TokOo7JR0+@"><mutation min="0" max="255" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="variables_get" id="%icHrTx,eW*6UQ~R9oGW"><field name="VAR" id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</field></block></value></block></statement><value name="IF2"><shadow type="logic_boolean" id="BF%2^A3NOaj|rYq]BA)x"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="D$B.^Op;%?Nu1qXrIA`3"><field name="OP">LT</field><value name="A"><shadow type="math_number" id="Wz}^:q,[vC@l{o6Hqw}c"><field name="NUM">0</field></shadow><block type="variables_get" id="vHtXp6g5f,@!FUi!P(T+"><field name="VAR" id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</field></block></value><value name="B"><shadow type="math_number" id="*!B/.tmcFoFt#i!`Um:-"><field name="NUM">0</field></shadow></value></block></value><statement name="DO2"><block type="Tinybit_CarCtrlSpeed" id="IWB@cZ]p@Y=%){99%4%."><field name="index">Tinybit.CarState.Car_SpinLeft</field><value name="speed"><shadow type="math_number_minmax" id="Z[Yc%rJQcv!,l?V^*Hd|"><mutation min="0" max="255" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="math_op3" id="hjzq17Uu5fxBl-TQyi5!"><value name="x"><block type="variables_get" id="QWg8z7M/$~@gsQ4Ck*+m"><field name="VAR" id="ck81Ez0B[Nc(Pqn3uk#T">speedGap</field></block></value></block></value></block></statement></block></next></block></statement></block><block type="every_interval" id=".:CI$4osOc#d4DSNmYps" x="42" y="742"><value name="interval"><shadow type="longTimePicker" id="F?OCuc4j}vH^BVZzlwY7"><field name="ms">NaN</field></shadow><block type="variables_get" id="K_q4HnD8vAIM%^$,:6:2"><field name="VAR" id=".kU1AZd%T,dQk.rMPMEC">timeInterval</field></block></value><statement name="HANDLER"><block type="typescript_statement" id="d)3;{6a:R,aTs;1Rl+@5"><mutation xmlns="http://www.w3.org/1999/xhtml" line0="console.log("helo")" numlines="1"></mutation></block></statement></block><block type="function_definition" id="S_km+4bR)d;+b9vr@{;J" x="1000" y="705"><mutation name="caluculateRefrectionGap" functionid="-IU(6nu!~oEQJKHu{:b~"></mutation><field name="function_name">caluculateRefrectionGap</field><statement name="STACK"><block type="typescript_statement" id="$^zAnn6U%U}0Ga%;MRGa"><mutation xmlns="http://www.w3.org/1999/xhtml" line0="console.log("helo")" numlines="1"></mutation><next><block type="function_return" id="XS_][NQ^J$;wKVB3F`98"><mutation xmlns="http://www.w3.org/1999/xhtml" no_return_value="true"></mutation></block></next></block></statement></block></xml>