-
Notifications
You must be signed in to change notification settings - Fork 0
/
BlockMecanum.py
83 lines (71 loc) · 52.1 KB
/
BlockMecanum.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# pybricks blocks file:{"blocks":{"languageVersion":0,"blocks":[{"type":"blockGlobalSetup","id":"bjK,wS1MYO7aiYkFSwd{","x":0,"y":185,"deletable":false,"next":{"block":{"type":"variables_set_prime_hub","id":"_yFC`H}YKU,FB5:ms2xl","extraState":{"optionLevel":1},"fields":{"VAR":{"id":"sO_cL*G+.:Y3M6,!7qwi"}},"inputs":{"AXIS_TOP":{"shadow":{"type":"blockParametersAxis","id":"%K3S^MPnaxID2;CUb@d{","fields":{"VALUE":"z"}}},"AXIS_FRONT":{"shadow":{"type":"blockParametersAxis","id":"pHj@Ow[9_lG^-e1$oQH;","fields":{"VALUE":"y"}}}},"next":{"block":{"type":"variables_set_motor","id":"Ryur{7.s:F-h1a2.M7(S","fields":{"VAR":{"id":"Sc]FLxCp9RK$Bye{m]ud"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"!LrmZ-E|0IUg8n{u]ys9","fields":{"NAME":"A"}}},"POSITIVE_DIRECTION":{"shadow":{"type":"blockParametersDirection","id":"d5[9(T_qNtxy4RR8hO!s","fields":{"SELECTION":"Direction.COUNTERCLOCKWISE"}}}},"next":{"block":{"type":"variables_set_motor","id":"h@nNFI_ht1+MgpW9:YA)","fields":{"VAR":{"id":"DBG$1mWei$DFtr@i8C0,"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"Fz}dgBa+@7V[PD^Y*v;w","fields":{"NAME":"B"}}},"POSITIVE_DIRECTION":{"shadow":{"type":"blockParametersDirection","id":"@4PB|?:6;8ovbUSD=5B]","fields":{"SELECTION":"Direction.CLOCKWISE"}}}},"next":{"block":{"type":"variables_set_motor","id":"Wy%Sn*o1ZI8qxFH*Dw}/","fields":{"VAR":{"id":"4{z.0E5jGeOn+*59@h=|"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"q+TeCTqUw61#08e~uYB1","fields":{"NAME":"C"}}},"POSITIVE_DIRECTION":{"shadow":{"type":"blockParametersDirection","id":").w`bG|-iN!(fjq-_?vD","fields":{"SELECTION":"Direction.COUNTERCLOCKWISE"}}}},"next":{"block":{"type":"variables_set_motor","id":"iWD+TFi#5_/an/XE%7WJ","fields":{"VAR":{"id":"]@-{.I_[C51k,rZEyamx"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"[LM0Yz}36)(*j|{y}d?/","fields":{"NAME":"D"}}},"POSITIVE_DIRECTION":{"shadow":{"type":"blockParametersDirection","id":".tGLn[8NKqA}8SZWzmr,","fields":{"SELECTION":"Direction.CLOCKWISE"}}}},"next":{"block":{"type":"variables_setup_any","id":"jFyt!Gm+F)*YQ(|AD*^L","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"QR.iawSnRCU0y:WjxJJE","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"g9Eo0;AP]UU_tTrkvJP$","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"1X{9#^Vc$K#QBsP:/AQe","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"Q2GL7}ZB,fpxbg?^91Z*","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"!W|xYliNGkwDwp8vqX~g","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"=}0a?|mAW3jsanwb@H{6","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"i}lvF86/;L2wxlDD:.AQ","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"g*=w,+^.B(L@2-U1`@|0","fields":{"VAR":{"id":"oaJ-06=YQvz=,,b*TSXK"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"uq3sZKpDcSuIh@R}!cY;","fields":{"NUM":810}}}},"next":{"block":{"type":"variables_setup_any","id":"=)BlZUGU@]BUZb(hXYW+","fields":{"VAR":{"id":"Knn6[t730T]Wnuk_=vm^"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Qz%6l!aSYX@WAq1C0E+3","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":";yzY`Z1U-reS#c/0.n`@","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"N@XU7Jvn9bN]]b4G7{Wb","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"$dzxfvFel`%DtC$YDnW4","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"n1|QT4Eso]x2#)!$ido+","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Yz8w`,B%?X{Yot05[uJ{","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_set_xbox_controller","id":"W/gOX0{r.X]{jM4E;aY%","fields":{"VAR":{"id":"|WoF9v#@}kG%6=CLn5Dj"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},{"type":"blockGlobalStart","id":"3tJe|AWl0baN(wH9a$@.","x":0,"y":925,"deletable":false,"next":{"block":{"type":"blockFlowWhile","id":"4ME9Q8U1+9qwMRA)F_1=","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"-;#H:A0@(*9UHjVWTw(t"}},"DO":{"block":{"type":"blockVariableSetValue","id":"=+fWe!J15*K([X%b*7y_","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"9r}J?+Bm)LV5Yi{#tR70","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"lq=ka+fedxsK2qU_-hUP","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"@4JS#F:kSxIrCEu5Qnku","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"Ht`ZA*6?0j%6nmi!~2lX"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"ol@@?_^;El@)c6o)W9~!","fields":{"NUM":0}},"block":{"type":"blockJoystickValue","id":"Qx_*UB}8,{6n`c3v~A#i","fields":{"JOYSTICK":"XBOX_LJ_Y"},"inputs":{"VAR":{"shadow":{"type":"variables_get_gamepad","id":"hCXyq*=mBUbaIK7qT5F|","fields":{"VAR":{"id":"|WoF9v#@}kG%6=CLn5Dj","name":"XBOX","type":"XboxController"}}}}}}}}}}},"next":{"block":{"type":"blockVariableSetValue","id":"BDEr;U1CJqQnhTN;Qz!G","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"{[XI8kBjFJZhf8#gAYR~","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":":A~9m4g|tmB!;94SCoLa","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"N,h]#kA.?w4Mu[0)e(QL","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"Ht`ZA*6?0j%6nmi!~2lX"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"ol@@?_^;El@)c6o)W9~!","fields":{"NUM":0}},"block":{"type":"blockJoystickValue","id":"n28to?2lOZ7Glp[)d)!c","fields":{"JOYSTICK":"XBOX_LJ_X"},"inputs":{"VAR":{"shadow":{"type":"variables_get_gamepad","id":"T)VsiohqKvGx[7*4is36","fields":{"VAR":{"id":"|WoF9v#@}kG%6=CLn5Dj","name":"XBOX","type":"XboxController"}}}}}}}}}}},"next":{"block":{"type":"blockVariableSetValue","id":"0D6~USJmKymQy(FhL`=a","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"DV)2H3okAb={isaMGt31","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Hh;X_SL31Atflw.D%[Z)","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"c._z^GEnP^[5F|yn]eY_","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"Ht`ZA*6?0j%6nmi!~2lX"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"ol@@?_^;El@)c6o)W9~!","fields":{"NUM":0}},"block":{"type":"blockJoystickValue","id":"Vqw`xtnyLiymU.;0Muav","fields":{"JOYSTICK":"XBOX_RJ_X"},"inputs":{"VAR":{"shadow":{"type":"variables_get_gamepad","id":"`l-(R~celj$u0T=Rpl#j","fields":{"VAR":{"id":"|WoF9v#@}kG%6=CLn5Dj","name":"XBOX","type":"XboxController"}}}}}}}}}}},"next":{"block":{"type":"blockIfElse","id":"_xr.u#ckpPu}V@$5p|LZ","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"jmw1|^ex$+{g5`zXN;95"},"block":{"type":"blockButtonIsPressed","id":"^s`xXZao}ME`x!3l:5=q","inputs":{"VAR":{"shadow":{"type":"variables_get_keypad","id":"j8MVWuR(#0kZA_0Vg|Yi","fields":{"VAR":{"id":"|WoF9v#@}kG%6=CLn5Dj","name":"XBOX","type":"XboxController"}}}},"VALUE0":{"shadow":{"type":"blockParametersButton","id":"19ZLj~}9/g8e^{2lERu.","fields":{"VALUE":"A"}}}}}},"DO0":{"block":{"type":"blockIfElse","id":",TYT)Xqk*TIA:WSJ99Ai","extraState":{"optionLevel":1},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"fPj~hNbV?D`~xMRqWK@0"},"block":{"type":"blockVariableGetValue","id":",S/=n7fSdA[v)Wh)/usb","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"0U~rr61{=Murmo)T;r{`","fields":{"VAR":{"id":"Knn6[t730T]Wnuk_=vm^","name":"FIELD MODE","type":"Any"}}}}}}},"DO0":{"block":{"type":"blockVariableSetValue","id":":oH-1%!jNUV({B!~HbKC","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"xT54[/DP*y`]E3KKb[S8","fields":{"VAR":{"id":"Knn6[t730T]Wnuk_=vm^","name":"FIELD MODE","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Ks9l;}m(Q6mXrv=Syt9z","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"_h=j(i]O3g]phHbBRZOG","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"blockWaitTime","id":"=A!i4%E4CktlkFzv*apV","inputs":{"VALUE0":{"shadow":{"type":"unit_time","id":"udfzM,PM42s=Vs?`=IwK","fields":{"VALUE0":200}}}}}}}},"ELSE":{"block":{"type":"blockVariableSetValue","id":",UD2FAP1mZTastN5vbLS","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"*~l7T4T%8UgnIo$fn}b6","fields":{"VAR":{"id":"Knn6[t730T]Wnuk_=vm^","name":"FIELD MODE","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Ks9l;}m(Q6mXrv=Syt9z","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"s/P/1]%_-c7a(/HR8DHY","fields":{"BOOL":"TRUE"}}}},"next":{"block":{"type":"blockWaitTime","id":"~Nhzc[AEQGkD7ebExp0L","inputs":{"VALUE0":{"shadow":{"type":"unit_time","id":"AA^~XawiE8m|u2:{!7T=","fields":{"VALUE0":200}}}},"next":{"block":{"type":"blockImuResetHeading","id":"Y0NC__Vgg[2wGdKQt)]9","inputs":{"VAR":{"shadow":{"type":"variables_get_imu_hub","id":"p65M`i3;*3c3Ec016%JA","fields":{"VAR":{"id":"sO_cL*G+.:Y3M6,!7qwi","name":"prime hub","type":"PrimeHub"}}}},"VALUE0":{"shadow":{"type":"unit_angle","id":"MC-4Luu25j7)Y(AC]Ga^","fields":{"VALUE0":0}}}}}}}}}}}}}},"next":{"block":{"type":"blockIfElse","id":"4CQ*sy@N|72hHNXUrSZ9","extraState":{"optionLevel":1},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":",p@o73S4{IUb_9!r^RGQ"},"block":{"type":"blockVariableGetValue","id":"B|srg2rJc5a4jXd9E}):","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Kp?;t5up|$_zLLD4K^ki","fields":{"VAR":{"id":"Knn6[t730T]Wnuk_=vm^","name":"FIELD MODE","type":"Any"}}}}}}},"DO0":{"block":{"type":"blockLightMatrixDo","id":"d{jNTd~aPE8K$3+DlHcr","extraState":{"optionLevel":2},"fields":{"METHOD":"LIGHT_MATRIX_SYMBOL"},"inputs":{"VAR":{"shadow":{"type":"variables_get_light_matrix_hub","id":"-.^9.D`+.ZA]jQ*i(5%s","fields":{"VAR":{"id":"sO_cL*G+.:Y3M6,!7qwi","name":"prime hub","type":"PrimeHub"}}}},"ARG0":{"shadow":{"type":"text","id":"ANKDl;r#y4)N=4Mi{V#f","fields":{"TEXT":"O"}}}},"next":{"block":{"type":"blockVariableSetValue","id":"cl#X9nGELW}fU+w.30Wc","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"!62Q)$C0cmHb!(TA~JNV","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a","name":"Rotated Forward","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Hh;X_SL31Atflw.D%[Z)","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"^_sl;=d[;6NRt87*+{{+","extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"/;8U:|VhX^$^WCBVWE)i"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"Lj$6T^N/@NT128W/G-m*","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"QP2o_WJt*6;O^urrlJ)[","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Dg}TAX2x$?2W!XZw3pgN","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"/OIYRY[lb95)lEEUK[F!","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"n[mXABUiY^Mv#O[|P{HQ","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"7dY.pzZj9liWjxrY/,B@","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"@j_||Vmtia|v8:@AUgF~","fields":{"NUM":0}},"block":{"type":"blockImuGetHeading","id":"u3~g-y-L%fF{{v!Avqsl","inputs":{"VAR":{"shadow":{"type":"variables_get_imu_hub","id":"c7$TIfR^bW~DG/[26h+_","fields":{"VAR":{"id":"sO_cL*G+.:Y3M6,!7qwi","name":"prime hub","type":"PrimeHub"}}}}}}}}}}},"next":{"block":{"type":"blockVariableSetValue","id":"XB,OUpFP;^K%B_nZ3kP{","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"L%XXKJr!y}E*.EC#ISMc","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}","name":"Rotated Strafing","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Hh;X_SL31Atflw.D%[Z)","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"Rz[P=Iu*pi%/{*u|Tp5%","extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"_P7IrIEMJ%:=u+y:.yb@"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"iey4;N=uH1NGkY8h+3+.","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"n37_4#u{_qFa$^WWe400","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"b}6^GpVS1BZHxOkrlC`R","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"OK(PDSI3E%*@wB@Je%_L","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"^}.li}6wFa2Oe#NKHwFa","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"^MoU`sQ3CR0xQ9DEK[{e","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"^Y[RHUv@QBvfu/LJga1V","fields":{"NUM":0}},"block":{"type":"blockImuGetHeading","id":"1{F410W|[/:n;yqygCm[","inputs":{"VAR":{"shadow":{"type":"variables_get_imu_hub","id":"?e0.!cq6+QEQBK-XO^W]","fields":{"VAR":{"id":"sO_cL*G+.:Y3M6,!7qwi","name":"prime hub","type":"PrimeHub"}}}}}}}}}}},"next":{"block":{"type":"blockVariableSetValue","id":"F@2h2@jR($KCz|exmwy0","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"KYYW.;)wo_#d51It@ykv","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"6eplw,?-8z-!p9+jX=$(","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"osdNCmySS~^oW]V])P4:","extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"IfneswHsiv%EyZclHDIT"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"d42o#4)Yf]vu@Wuy?VyJ","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"CR9D.VCXXvY$[,pbp|R/","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"l1[CFR:j|R6iRxp$FKMB","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a","name":"Rotated Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"P|KeSDC*oINXiVPp!:k[","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"JY|(^GsGosx`{sOc^mh$","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"n1+|mgGlkXoXLrrH%Vt2","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}","name":"Rotated Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"_Su8tbqvI*vT6cgs}3j%","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"JoE93hr8U5B($s_%,H#J","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"E7$pB?sZrvH*z9^WQ_R}","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"3s1YKF%Ju0eR1en]{uc`","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"`)cS)KOaM]d*t|^WJ)4$"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"IHCe}?%[7kWwbpG!;.C6","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"U`sD8?7w+Gx/p]zE,#*J","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"bGve`%c|^u^va8VL!}U)","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a","name":"Rotated Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":")Fc!FXa!7(k7zvC3IM$J","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"T0ZIRq%-U~PFd0ito{9_","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"eU-7E(Rx[/};Im#-lq[M","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}","name":"Rotated Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"VkXhm8T!?DtGt_G#~VzF","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"32pfoMP{pbA]|F)t(P*,","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"1?4!,!tYkb./Ds||8O([","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":",bmSzui6=}XT(g!@U~|i","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"{(zyX(AWTfvlkmIQD^sF","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Ou|QXk!]Jm;~JC]A`-i%","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"2?LW^Lq.ARH]pK*FwI9)","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"M]x/.7U{K$M{qH5j%({@"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"SBB_:R^~{E9s]f0U!P5S","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"X(/=%%43)b0~P5,5-T/`","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"`@+R*9o0W,rNJUwy[Ztk","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a","name":"Rotated Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"!ysb%gDsKU}iqTUH6+aT","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"%bx$4pgvL;Yqy(4o,^XM","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"^:Itu!b*/CYFif-=P{:s","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}","name":"Rotated Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":";8[-JN%]-%qyVy6([D74","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"WJkb~pqvcB4;cBqoWy1T","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Jh_a~+f]wbz@[dRy_Gu{","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":"Xs)r}LAy`/myn-?7SD+;","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"/IGvAS9;lmEo,YUNd`6`","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"59Sca0Ndd+E]$sdj2Qd0","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"?OX$K:Eca~xg+_RN3Jy+","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"[/FP{@8s!2RrW=t[pw!Z"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"`j9(|a0M:WdAfn197%%;","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"sL=/l?joG6*gX|uV?]Yn","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":".h9av!H4tIUp%y*~YJ)b","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a","name":"Rotated Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"90Wx4V_/s~`Di3/kW:Ni","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"-lE~(Uj{hyejWU{6j4t=","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"_[ODTq5PK4J`e[DJ90;?","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}","name":"Rotated Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"A_3=yJsGip,}BzXH3~R!","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"J+(e`G_1|+n.t[]g]16/","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"#6Xkn[r?`=o15d/_%hv$","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":"4The;mow=^,g9Ba{ASp}","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":":ML0vwY0VJ8.Xq@sl7i/","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"bJIk_z%@Ig`#.RaFc4%R","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"$oHY6kO~%aKQ{pMq$Z2g","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"f:^:Se],vE/{iARZ8S2["}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"PibdC6#YMQ)1lD:RXWXu","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"B,*;GGmN+$[Wfb0QJ.(w","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"unut]o}m=:7.vWf#Ak)[","fields":{"VAR":{"id":"8Ys^ZcY+uxtb`I~t`L/a","name":"Rotated Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"e^iQX)~7mlV`=@Z?YkZ@","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"0Ee,JI%EbD8]GeC];B?V","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"kB|UM(MnfC[]~X[^Bt?O","fields":{"VAR":{"id":"W!@v]#HZ1kVa:Ih%Awe}","name":"Rotated Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"7r+4pDfo=;h`,nmpOG{v","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"?;G7FvwM4DF#9IQ{#1i|","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"2,^G9~?`vI3{Zag@zZ(5","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":"~Dj(V|=TMU8J[+^,WZWP","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"jz[.F`sm-#9rZ7S^,Xn;","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"9hA!L}9,fDJNbUqGc5;z","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}}}}}}}}}}}}}}}}}},"ELSE":{"block":{"type":"blockLightMatrixDo","id":"a%1R5wnD0%:[email protected],","extraState":{"optionLevel":2},"fields":{"METHOD":"LIGHT_MATRIX_SYMBOL"},"inputs":{"VAR":{"shadow":{"type":"variables_get_light_matrix_hub","id":"Ah$E0O-OVZbg5K(CKi@L","fields":{"VAR":{"id":"sO_cL*G+.:Y3M6,!7qwi","name":"prime hub","type":"PrimeHub"}}}},"ARG0":{"shadow":{"type":"text","id":"Nl{UXx%u3vxT3xWtC@Sg","fields":{"TEXT":"R"}}}},"next":{"block":{"type":"blockVariableSetValue","id":"O_VfUlx7nOmY0ykn+=vw","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"z!0U{YH!JrR_I:{(i^d+","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"6eplw,?-8z-!p9+jX=$(","fields":{"NUM":0}},"block":{"type":"blockFunctionCallerValue","id":"-El3Ma)ddF2!+JLhTdjf","extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"IfneswHsiv%EyZclHDIT"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"d42o#4)Yf]vu@Wuy?VyJ","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"AX.U9g++eT`FspUY59vL","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"aW@tR,IijM}z/Oy{@|cS","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"P|KeSDC*oINXiVPp!:k[","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"~yYThp9C_(cTU+mQ`RiN","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"QptXXAMeTT|g87K|/Y)m","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"_Su8tbqvI*vT6cgs}3j%","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"hyiaR.u,RPPC`yTcwJNW","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"d18rd0:Mo8fiSWCrE;s)","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"(J{JxpnqtG0f9_q-#q3o","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"`)cS)KOaM]d*t|^WJ)4$"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"IHCe}?%[7kWwbpG!;.C6","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"hIFe|6h0Oi~dU)Z.$eRC","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"6jw1pp]-)3:w7vXW|z_x","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":")Fc!FXa!7(k7zvC3IM$J","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":",~GKNmWn[qTcd71MGXeh","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"*!Rl2.^c7Kgt=(F8`/vd","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"VkXhm8T!?DtGt_G#~VzF","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"uWczJdxIUe*2,+j9g-GT","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"B5BkvDW@9]3buB6(8(~f","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":",bmSzui6=}XT(g!@U~|i","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"o$$Di3d,ruO4xw6+%2|U","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"A|751i6jE66/i!!!rm6C","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"!v)cvS^uI$X6j*VKkdl2","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"M]x/.7U{K$M{qH5j%({@"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"SBB_:R^~{E9s]f0U!P5S","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"Z5{-h:hs_I!/*1Av)llb","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"iz`Ty@)lHUvl6tY#^WLZ","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"!ysb%gDsKU}iqTUH6+aT","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"a+J.tOwD98xwPs(85%;f","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"6P~{s0tZ}@E3#5msh%FB","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":";8[-JN%]-%qyVy6([D74","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"[.P#,etRoUj0kQAjXXg/","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"M?%$@I]BlA5-nU^k9Yt)","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":"Xs)r}LAy`/myn-?7SD+;","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":",*/hJ;bhJJ3L@V/OhS3H","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"@$Kh[,FcCQ/K[15iGBR_","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"z0I=4KwMjgeQ!O%fA3eT","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"[/FP{@8s!2RrW=t[pw!Z"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"`j9(|a0M:WdAfn197%%;","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"^@~fKzJ@A:fOgRDr}BK0","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"QfZfS$O[O^_4gq38%bXb","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"90Wx4V_/s~`Di3/kW:Ni","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"n|;UI5_v$nDeC?,+exg9","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"!r5mPohFW2]dfCIyo?gH","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"A_3=yJsGip,}BzXH3~R!","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"4n!4A~Q_P@RnN!?3p/V4","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"^Cx{NZ{m.KNOS=]Ipv]l","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":"4The;mow=^,g9Ba{ASp}","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"Za30ZC{SwF3q]j?)dcvX","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"@2w}axEG;V4O@y;#ppZo","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"?XaR_BC]6nVMuXD-!ot1","extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"f:^:Se],vE/{iARZ8S2["}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"PibdC6#YMQ)1lD:RXWXu","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"o?UXyTnM/R@*B6/]$0yt","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"i[C$3%+XSN0SAO$NmA*3","fields":{"VAR":{"id":"h:`~.(zldkHrDG1}-;C]","name":"Forward","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"e^iQX)~7mlV`=@Z?YkZ@","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"sy2z|08?aZLvgOACs|;r","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"RpflN5?jAiRV/-7Lb2hr","fields":{"VAR":{"id":".n*kf3BfyrBOz7T@H8%]","name":"Strafing","type":"Any"}}}}}}},"ARG2":{"shadow":{"type":"blockMathNumber","id":"7r+4pDfo=;h`,nmpOG{v","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"{QY4UsIGFAO-gUqToIMk","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"tr7vkf:7j]tZe`_RB_2h","fields":{"VAR":{"id":"1bM1z-mnCp9GbLUq,Jpy","name":"Rotation","type":"Any"}}}}}}},"ARG3":{"shadow":{"type":"blockMathNumber","id":"~Dj(V|=TMU8J[+^,WZWP","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"iqG.X@EbvK8E3fk03kc6","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"IOem8Y_#GI_]G[Z%pDnI","fields":{"VAR":{"id":"tORlJwVf=hObN1_a5u9X","name":"Denominator","type":"Any"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"O$Z2rr+yR]NF=(HRu,Qh","x":0,"y":0,"extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"IfneswHsiv%EyZclHDIT"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"I18|lZk`.Ku34MTjC-bB","fields":{"VAR":{"id":"C0Lg=h](jNR?P]uu@$:7","name":"argument 0","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"lf}[nGi2Kk)f1[rv(@bi","fields":{"VAR":{"id":"R3PeO;u,zAyV5AZ4Tj/}","name":"argument 1","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"y%Xuqo=q+usbH~5Z(|:/","fields":{"VAR":{"id":"E;q239ojrcW-/*a$OIfi","name":"argument 2","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockTaskReturn","id":"3,J1VW49`U*MJ18loUX6","inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"FB~;Lv?i)(rKIn1*;k|i","fields":{"NUM":0}},"block":{"type":"blockMathFormula","id":"7$|nL}.R(4[vN8D[jRO3","extraState":{"optionLevel":3},"fields":{"FORMULA":"max((abs(a) + abs(b) + abs(c)), 1)"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"-NfsyMbmCccrB)~z=^C)","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"Z83=.{+qSR#eO-;UGcSr","fields":{"VAR":{"text":"argument 0"}}}},"b":{"shadow":{"type":"blockMathNumber","id":"eX4H{L[/WQm;;Qz_TO(B","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"cSRiBzM)Qd`NNY1SYPuD","fields":{"VAR":{"text":"argument 1"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"0Z^naPCPQ9|X?$S^ugbv","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"tPS1_*[MHG#,XC1o5h]~","fields":{"VAR":{"text":"argument 2"}}}}}}}}}}}},{"type":"variables_setup_function","id":",QA962[7,|/zn}K+,1uW","x":0,"y":4485,"extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"Ht`ZA*6?0j%6nmi!~2lX"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"@V~!]h+*CYD~zoFGqz?B","fields":{"VAR":{"id":"Au^b_#M$;to)o7+h!$Ui","name":"stick","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockIfElse","id":"k3J]l5joxijDssgwCdlh","extraState":{"optionLevel":1},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"[6_9/`~Bb,B==XLyu#ZJ"},"block":{"type":"blockLogicCompareDouble","id":"ik06SMDL;60jmSB!tnh8","fields":{"OP1":"LTE","OP2":"LTE"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"9u?UAcK-.e~z4),}))cr","fields":{"NUM":-7}}},"B":{"shadow":{"type":"blockMathNumber","id":"u|,QS)enLc(]IP%v-60@","fields":{"NUM":4}},"block":{"type":"variables_setup_function_argumentConstant","id":"xDr|X]6;@)wney{W?[AG","fields":{"VAR":{"text":"stick"}}}},"C":{"shadow":{"type":"blockMathNumber","id":",^=`uI6Y(^n9Xav0B=ws","fields":{"NUM":7}}}}}},"DO0":{"block":{"type":"blockTaskReturn","id":"lYjaKU-Vk_QCO4g5l;:_","inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"9@kQMU#UZOY|Dsihyr!I","fields":{"NUM":0}}}}}},"ELSE":{"block":{"type":"blockTaskReturn","id":"$.^OJs*XO;^3-)ZF][E.","inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Tg`G*716zYAw0-)3160{","fields":{"NUM":0}},"block":{"type":"blockMathArithmetic","id":"fi.R7|qy!cX}.j3gyE=$","fields":{"OP":"DIVIDE"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"3n!:8_%^`go(}[-0{p%P","fields":{"NUM":1}},"block":{"type":"variables_setup_function_argumentConstant","id":"~K)YN_O{VFD4X]1X}n)V","fields":{"VAR":{"text":"stick"}}}},"B":{"shadow":{"type":"blockMathNumber","id":"|lXxuBO=ogsE5vpLG[[}","fields":{"NUM":100}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"QEu(}sF4LKpqE:+dT$+j","x":0,"y":4115,"extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"/;8U:|VhX^$^WCBVWE)i"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"KeKlxE,^vnif-+O$(|F4","fields":{"VAR":{"id":"x|BD92(N9=vF~%1k0.`c","name":"y","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"W!ei;k}.T)#7fchNMsKi","fields":{"VAR":{"id":"P5og5h-Mq~A%s(UTsw7q","name":"x","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"K92bx}RP`:?{!KQD7Ak3","fields":{"VAR":{"id":"/?jJ!F[krO2%vGk.t[fC","name":"z","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockTaskReturn","id":"TyU:Cyx^ZR#y4dV!bK@M","inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"ux3DGo?0E~K?K+Cd=epF","fields":{"NUM":0}},"block":{"type":"blockMathFormula","id":"HoaiFW5HofcaGoxHOJJp","extraState":{"optionLevel":3},"fields":{"FORMULA":"b * sin(radians(c)) + a * cos(radians(c))"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"xgCu)7N`-c(QGg,71gkF","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"XlZN)1cnz[h=_n+O+[5J","fields":{"VAR":{"text":"y"}}}},"b":{"shadow":{"type":"blockMathNumber","id":"zCD;yGlit;54HV`VBUNE","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"(F2tdb|3KQ.@Rp(mTM/9","fields":{"VAR":{"text":"x"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"DXvCrh[B,{:e]m?I=?F[","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"5K;9fqg/a{}Ql4-6y8x+","fields":{"VAR":{"text":"z"}}}}}}}}}}}},{"type":"variables_setup_function","id":"j,3},|#qC?;~:y-3SXO#","x":0,"y":4300,"extraState":{"optionLevel":3},"fields":{"ICON":"TASK","VAR":{"id":"_P7IrIEMJ%:=u+y:.yb@"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"gLs=z+||MKLtM1XS8o3m","fields":{"VAR":{"id":"x|BD92(N9=vF~%1k0.`c","name":"y","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"rEJ!O;?0wpM@3yW%[^[_","fields":{"VAR":{"id":"P5og5h-Mq~A%s(UTsw7q","name":"x","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"%I}BSw7_E.`{v.cg$]Dl","fields":{"VAR":{"id":"/?jJ!F[krO2%vGk.t[fC","name":"z","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockTaskReturn","id":"mpL8B{.=vyi`d:#jZ[|^","inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"ux3DGo?0E~K?K+Cd=epF","fields":{"NUM":0}},"block":{"type":"blockMathFormula","id":"#V4yU$}0CN+Zy.)EWZC0","extraState":{"optionLevel":3},"fields":{"FORMULA":"b * cos(radians(c)) - a * sin(radians(c))"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"xgCu)7N`-c(QGg,71gkF","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"+3IYDm#Oy6$bs[~D=A[%","fields":{"VAR":{"text":"y"}}}},"b":{"shadow":{"type":"blockMathNumber","id":"zCD;yGlit;54HV`VBUNE","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"?dmQ:,n^yaveB0XCC!Z7","fields":{"VAR":{"text":"x"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"DXvCrh[B,{:e]m?I=?F[","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"[_g.K].9mjzAVp9TRIvD","fields":{"VAR":{"text":"z"}}}}}}}}}}}},{"type":"variables_setup_function","id":"Hvz[HM{gO/n~QZK=n,)+","x":0,"y":2894,"extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"`)cS)KOaM]d*t|^WJ)4$"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"Tl?ZWdPIV|kGq%ZRcG0S","fields":{"VAR":{"id":"-vW1immuLcdDR]+4ls{R","name":"forward_i","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"A#9FuB$}(p.TXdF1=)W1","fields":{"VAR":{"id":"c/$M~|Ruepbv)^=zc9Ou","name":"straffing_i","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"Dd3v[F^}(UQamL*]pCl[","fields":{"VAR":{"id":"~)/a+=onqF9Zbo_+BtXI","name":"rotation_i","type":"FunctionArgument"}}}},"ARG3":{"shadow":{"type":"variables_setup_function_argument","id":"`4k{?Hq7B;tiPNCLW$GZ","fields":{"VAR":{"id":"RzOH2tY;3P$Gh@FSSF2g","name":"denominator_i","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockMotorRun","id":"F4#X1^U(!Co$WAFWcJ~x","extraState":{"optionLevel":0},"fields":{"METHOD":"MOTOR_RUN_FOREVER"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":"oB(Ts$fWcM6P5lV|H:UR","fields":{"VAR":{"id":"Sc]FLxCp9RK$Bye{m]ud","name":"Left Front","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"]:|~^~ChI!A+]=8hQ,9(","fields":{"VALUE0":500}},"block":{"type":"blockMathArithmetic","id":"0)8IGGyJ?,}_wzPXMOMA","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"Ah.13q4}g3MqLCt2U!~_","fields":{"NUM":1}},"block":{"type":"blockMathFormula","id":"U_xFt3yhzrhF=?9p6biH","inline":false,"extraState":{"optionLevel":4},"fields":{"FORMULA":"(a + b + c)/d"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"P2k)W+(+pt3ybA@tt7Cu","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"qGbn?V0DPU^*p06yEF)v","fields":{"VAR":{"text":"forward_i"}}}},"b":{"shadow":{"type":"blockMathNumber","id":".`Olc]bMRYs]D3:F(x9o","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"H4k,|uaMHTA3W9~n{JP1","fields":{"VAR":{"text":"straffing_i"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"T4i{fw-)Y|2?4.3y$U`*","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"gz2?{=cOFJ[G*-~$wWl{","fields":{"VAR":{"text":"rotation_i"}}}},"d":{"shadow":{"type":"blockMathNumber","id":"0mrS(TWx++o0pKuH40/@","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"[WAokSb,I2a`xY5gb@n9","fields":{"VAR":{"text":"denominator_i"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"|Q,6E(RGrGaqHqikt7#V","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"HiNo0./^y_PhOB@[~Ri-","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Igf$4.JO;=2Sd!TBCr2m","fields":{"VAR":{"id":"oaJ-06=YQvz=,,b*TSXK","name":"SPEED","type":"Any"}}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"DHW;%87UvVhX^Jq2=T5$","x":0,"y":2487,"extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"M]x/.7U{K$M{qH5j%({@"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"rQ}bm|NN_kHy_Nu6^^?x","fields":{"VAR":{"id":"-vW1immuLcdDR]+4ls{R","name":"forward_i","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"*xfrf/:I*y=g1kFrEq=)","fields":{"VAR":{"id":"c/$M~|Ruepbv)^=zc9Ou","name":"straffing_i","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"x?I+C%#||(Q._GO%(6Yh","fields":{"VAR":{"id":"~)/a+=onqF9Zbo_+BtXI","name":"rotation_i","type":"FunctionArgument"}}}},"ARG3":{"shadow":{"type":"variables_setup_function_argument","id":"Q*]C7D_*RU/F_Akmho*B","fields":{"VAR":{"id":"RzOH2tY;3P$Gh@FSSF2g","name":"denominator_i","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockMotorRun","id":"pMS;G$kn!$6gQ^a/n!m!","extraState":{"optionLevel":0},"fields":{"METHOD":"MOTOR_RUN_FOREVER"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":"o/@cMu*]%zi8rBQmIEV%","fields":{"VAR":{"id":"4{z.0E5jGeOn+*59@h=|","name":"Left Rear","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"]:|~^~ChI!A+]=8hQ,9(","fields":{"VALUE0":500}},"block":{"type":"blockMathArithmetic","id":"9M^ow+RAnBEZg{)AKn16","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"Ah.13q4}g3MqLCt2U!~_","fields":{"NUM":1}},"block":{"type":"blockMathFormula","id":"dQC:}iu+N.!qu[,IE3k~","inline":false,"extraState":{"optionLevel":4},"fields":{"FORMULA":"(a - b + c)/d"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"P2k)W+(+pt3ybA@tt7Cu","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"e4_/ovpo$XKEkEV.R!i*","fields":{"VAR":{"text":"forward_i"}}}},"b":{"shadow":{"type":"blockMathNumber","id":".`Olc]bMRYs]D3:F(x9o","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"@tU0YN.xB/l2)7t~*RqL","fields":{"VAR":{"text":"straffing_i"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"T4i{fw-)Y|2?4.3y$U`*","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"ewUZGflZqID?zQ;sQxBb","fields":{"VAR":{"text":"rotation_i"}}}},"d":{"shadow":{"type":"blockMathNumber","id":"0mrS(TWx++o0pKuH40/@","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"r0K/g{5aGKe[?tr(tlDb","fields":{"VAR":{"text":"denominator_i"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"|Q,6E(RGrGaqHqikt7#V","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"Sw/qMu;!6qfQ1p`lE,D^","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"A1(L9F4gqs#(d3sm8aUs","fields":{"VAR":{"id":"oaJ-06=YQvz=,,b*TSXK","name":"SPEED","type":"Any"}}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"1h`ec=ce2Tl{Q@DZ+~p;","x":0,"y":3301,"extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"[/FP{@8s!2RrW=t[pw!Z"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"n?f6*-sBV_X%4o-YH_H)","fields":{"VAR":{"id":"-vW1immuLcdDR]+4ls{R","name":"forward_i","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"t4SZZ$d`kgJWo~JCeu,9","fields":{"VAR":{"id":"c/$M~|Ruepbv)^=zc9Ou","name":"straffing_i","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"4N`YqWOEE3IjR9YB[|Da","fields":{"VAR":{"id":"~)/a+=onqF9Zbo_+BtXI","name":"rotation_i","type":"FunctionArgument"}}}},"ARG3":{"shadow":{"type":"variables_setup_function_argument","id":"lrTLk6uoUd(1]Gi(oRCQ","fields":{"VAR":{"id":"RzOH2tY;3P$Gh@FSSF2g","name":"denominator_i","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockMotorRun","id":"F$*.qT:593#7?EAZ3k|f","extraState":{"optionLevel":0},"fields":{"METHOD":"MOTOR_RUN_FOREVER"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":"WGAIF/FFR?pWmWf3:dqL","fields":{"VAR":{"id":"DBG$1mWei$DFtr@i8C0,","name":"Right Front","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"]:|~^~ChI!A+]=8hQ,9(","fields":{"VALUE0":500}},"block":{"type":"blockMathArithmetic","id":"J4%BdnFKf1!/B(BoDw2a","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"Ah.13q4}g3MqLCt2U!~_","fields":{"NUM":1}},"block":{"type":"blockMathFormula","id":"Qbs9M`)yj|!W]g%CS63[","inline":false,"extraState":{"optionLevel":4},"fields":{"FORMULA":"(a - b - c)/d"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"P2k)W+(+pt3ybA@tt7Cu","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"MUN~9ftV#x{IW_*Fg5Rr","fields":{"VAR":{"text":"forward_i"}}}},"b":{"shadow":{"type":"blockMathNumber","id":".`Olc]bMRYs]D3:F(x9o","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"?_v|B~B{qkIW,g+9KkA,","fields":{"VAR":{"text":"straffing_i"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"T4i{fw-)Y|2?4.3y$U`*","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"nVWaiM8~,_NLh/{V|17%","fields":{"VAR":{"text":"rotation_i"}}}},"d":{"shadow":{"type":"blockMathNumber","id":"0mrS(TWx++o0pKuH40/@","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"`cHMyK$=(z*O42_?%#hF","fields":{"VAR":{"text":"denominator_i"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"|Q,6E(RGrGaqHqikt7#V","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"eadF:MdCvXvFa6Vz}A+(","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"`024slG)Y/r/M-G-?AWk","fields":{"VAR":{"id":"oaJ-06=YQvz=,,b*TSXK","name":"SPEED","type":"Any"}}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"#y~`Gapdl-O?*,lZ`0+R","x":0,"y":3708,"extraState":{"optionLevel":4},"fields":{"ICON":"TASK","VAR":{"id":"f:^:Se],vE/{iARZ8S2["}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"c/{TssKil]}qwlp*miT#","fields":{"VAR":{"id":"-vW1immuLcdDR]+4ls{R","name":"forward_i","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"_J0E*@YB=HD1Ah7++tO`","fields":{"VAR":{"id":"c/$M~|Ruepbv)^=zc9Ou","name":"straffing_i","type":"FunctionArgument"}}}},"ARG2":{"shadow":{"type":"variables_setup_function_argument","id":"^`Ev;BY7lO;0z!pZ`b.w","fields":{"VAR":{"id":"~)/a+=onqF9Zbo_+BtXI","name":"rotation_i","type":"FunctionArgument"}}}},"ARG3":{"shadow":{"type":"variables_setup_function_argument","id":"9)5V9OmqJ8WlnDQ%e_HA","fields":{"VAR":{"id":"RzOH2tY;3P$Gh@FSSF2g","name":"denominator_i","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockMotorRun","id":"LC1pCQgox85ACZ.]gaaY","extraState":{"optionLevel":0},"fields":{"METHOD":"MOTOR_RUN_FOREVER"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":"]G%YbGUaK,9OIzadyX+b","fields":{"VAR":{"id":"]@-{.I_[C51k,rZEyamx","name":"Right Rear","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"]:|~^~ChI!A+]=8hQ,9(","fields":{"VALUE0":500}},"block":{"type":"blockMathArithmetic","id":"Kn!#HHWGiOLFhn/2DSP}","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"Ah.13q4}g3MqLCt2U!~_","fields":{"NUM":1}},"block":{"type":"blockMathFormula","id":"D_*S:f%m!j/rsmc1lKj[","inline":false,"extraState":{"optionLevel":4},"fields":{"FORMULA":"(a + b - c)/d"},"inputs":{"a":{"shadow":{"type":"blockMathNumber","id":"P2k)W+(+pt3ybA@tt7Cu","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"l3,t.R9|7~rOV`P9EO||","fields":{"VAR":{"text":"forward_i"}}}},"b":{"shadow":{"type":"blockMathNumber","id":".`Olc]bMRYs]D3:F(x9o","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":";Eoo3)1Wc)C/O-eI7./[","fields":{"VAR":{"text":"straffing_i"}}}},"c":{"shadow":{"type":"blockMathNumber","id":"T4i{fw-)Y|2?4.3y$U`*","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"HX!YTTo(+1R!QDoxQI*_","fields":{"VAR":{"text":"rotation_i"}}}},"d":{"shadow":{"type":"blockMathNumber","id":"0mrS(TWx++o0pKuH40/@","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"0qS!o^g.}-QKszTw@c-#","fields":{"VAR":{"text":"denominator_i"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"|Q,6E(RGrGaqHqikt7#V","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":")A;:z%Elu28xIML7G^j7","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Q^-|9)6d-HzL1rS^@0?x","fields":{"VAR":{"id":"oaJ-06=YQvz=,,b*TSXK","name":"SPEED","type":"Any"}}}}}}}}}}}}}}}]},"variables":[{"name":"red","id":"a{n3.1wE7gR~qWsN%Frs","type":"ColorDef"},{"name":"orange","id":"8jN}K)3s}D#pWLrwY.lp","type":"ColorDef"},{"name":"yellow","id":":/yxzExJ1*TI%@gK@|ss","type":"ColorDef"},{"name":"green","id":"?i:TW39@(`8Yn)Lv0oXU","type":"ColorDef"},{"name":"cyan","id":"lWq{q,2;M#;KTOI`p~M{","type":"ColorDef"},{"name":"blue","id":"jl#go#F[4@eY9P/K$;,m","type":"ColorDef"},{"name":"violet","id":"RrM:apy48W_h8LPUIAku","type":"ColorDef"},{"name":"magenta","id":"tfak2i+I*jkWVlD.e({:","type":"ColorDef"},{"name":"white","id":"]i`Lrww}r@u|mpoS/]pw","type":"ColorDef"},{"name":"none","id":"ohcxkBy[BB#q8@Ghvq2c","type":"ColorDef"},{"name":"prime hub","id":"sO_cL*G+.:Y3M6,!7qwi","type":"PrimeHub"},{"name":"Left Front","id":"Sc]FLxCp9RK$Bye{m]ud","type":"Motor"},{"name":"Right Front","id":"DBG$1mWei$DFtr@i8C0,","type":"Motor"},{"name":"Left Rear","id":"4{z.0E5jGeOn+*59@h=|","type":"Motor"},{"name":"Right Rear","id":"]@-{.I_[C51k,rZEyamx","type":"Motor"},{"name":"argument 0","id":"C0Lg=h](jNR?P]uu@$:7","type":"FunctionArgument"},{"name":"stick","id":"Au^b_#M$;to)o7+h!$Ui","type":"FunctionArgument"},{"name":"argument 1","id":"R3PeO;u,zAyV5AZ4Tj/}","type":"FunctionArgument"},{"name":"argument 2","id":"E;q239ojrcW-/*a$OIfi","type":"FunctionArgument"},{"name":"y","id":"x|BD92(N9=vF~%1k0.`c","type":"FunctionArgument"},{"name":"z","id":"/?jJ!F[krO2%vGk.t[fC","type":"FunctionArgument"},{"name":"x","id":"P5og5h-Mq~A%s(UTsw7q","type":"FunctionArgument"},{"name":"straffing_i","id":"c/$M~|Ruepbv)^=zc9Ou","type":"FunctionArgument"},{"name":"forward_i","id":"-vW1immuLcdDR]+4ls{R","type":"FunctionArgument"},{"name":"rotation_i","id":"~)/a+=onqF9Zbo_+BtXI","type":"FunctionArgument"},{"name":"denominator_i","id":"RzOH2tY;3P$Gh@FSSF2g","type":"FunctionArgument"},{"name":"calc demoninator","id":"IfneswHsiv%EyZclHDIT","type":"Function"},{"name":"convert stick input","id":"Ht`ZA*6?0j%6nmi!~2lX","type":"Function"},{"name":"rotate forward","id":"/;8U:|VhX^$^WCBVWE)i","type":"Function"},{"name":"rotate strafing","id":"_P7IrIEMJ%:=u+y:.yb@","type":"Function"},{"name":"Left Front Function","id":"`)cS)KOaM]d*t|^WJ)4$","type":"Function"},{"name":"Left Rear Function","id":"M]x/.7U{K$M{qH5j%({@","type":"Function"},{"name":"Right Front Function","id":"[/FP{@8s!2RrW=t[pw!Z","type":"Function"},{"name":"Right Rear Function","id":"f:^:Se],vE/{iARZ8S2[","type":"Function"},{"name":"Forward","id":"h:`~.(zldkHrDG1}-;C]","type":"Any"},{"name":"Strafing","id":".n*kf3BfyrBOz7T@H8%]","type":"Any"},{"name":"Rotation","id":"1bM1z-mnCp9GbLUq,Jpy","type":"Any"},{"name":"Denominator","id":"tORlJwVf=hObN1_a5u9X","type":"Any"},{"name":"SPEED","id":"oaJ-06=YQvz=,,b*TSXK","type":"Any"},{"name":"FIELD MODE","id":"Knn6[t730T]Wnuk_=vm^","type":"Any"},{"name":"Rotated Forward","id":"8Ys^ZcY+uxtb`I~t`L/a","type":"Any"},{"name":"Rotated Strafing","id":"W!@v]#HZ1kVa:Ih%Awe}","type":"Any"},{"name":"XBOX","id":"|WoF9v#@}kG%6=CLn5Dj","type":"XboxController"}],"info":{"type":"pybricks","version":"1.0.0"}}
from pybricks.hubs import PrimeHub
from pybricks.iodevices import XboxController
from pybricks.parameters import Axis, Button, Direction, Port, Stop
from pybricks.pupdevices import Motor
from pybricks.tools import wait
from umath import cos, radians, sin
# Set up all devices.
prime_hub = PrimeHub(top_side=Axis.Z, front_side=Axis.Y)
Left_Front = Motor(Port.A, Direction.COUNTERCLOCKWISE)
Right_Front = Motor(Port.B, Direction.CLOCKWISE)
Left_Rear = Motor(Port.C, Direction.COUNTERCLOCKWISE)
Right_Rear = Motor(Port.D, Direction.CLOCKWISE)
XBOX = XboxController()
# Initialize variables.
Forward = 0
Strafing = 0
Rotation = 0
Denominator = 0
SPEED = 810
FIELD_MODE = False
Rotated_Forward = 0
Rotated_Strafing = 0
def calc_demoninator(argument_0, argument_1, argument_2):
return max(abs(argument_0) + abs(argument_1) + abs(argument_2), 1)
def Left_Rear_Function(forward_i, straffing_i, rotation_i, denominator_i):
Left_Rear.run(((forward_i + rotation_i - straffing_i) / denominator_i) * SPEED)
def Left_Front_Function(forward_i, straffing_i, rotation_i, denominator_i):
Left_Front.run(((forward_i + straffing_i + rotation_i) / denominator_i) * SPEED)
def Right_Front_Function(forward_i, straffing_i, rotation_i, denominator_i):
Right_Front.run(((forward_i - (straffing_i + rotation_i)) / denominator_i) * SPEED)
def Right_Rear_Function(forward_i, straffing_i, rotation_i, denominator_i):
Right_Rear.run(((forward_i + straffing_i - rotation_i) / denominator_i) * SPEED)
def rotate_forward(y, x, z):
return x * sin(radians(z)) + y * cos(radians(z))
def rotate_strafing(y, x, z):
return x * cos(radians(z)) - y * sin(radians(z))
def convert_stick_input(stick):
if -7 <= stick <= 7:
return 0
else:
return stick / 100
# The main program starts here.
while True:
Forward = convert_stick_input(XBOX.joystick_left()[1])
Strafing = convert_stick_input(XBOX.joystick_left()[0])
Rotation = convert_stick_input(XBOX.joystick_right()[0])
if Button.A in XBOX.buttons.pressed():
if FIELD_MODE:
FIELD_MODE = False
wait(200)
else:
FIELD_MODE = True
wait(200)
prime_hub.imu.reset_heading(0)
if FIELD_MODE:
prime_hub.display.char('O')
Rotated_Forward = rotate_forward(Forward, Strafing, prime_hub.imu.heading())
Rotated_Strafing = rotate_strafing(Forward, Strafing, prime_hub.imu.heading())
Denominator = calc_demoninator(Rotated_Forward, Rotated_Strafing, Rotation)
Left_Front_Function(Rotated_Forward, Rotated_Strafing, Rotation, Denominator)
Left_Rear_Function(Rotated_Forward, Rotated_Strafing, Rotation, Denominator)
Right_Front_Function(Rotated_Forward, Rotated_Strafing, Rotation, Denominator)
Right_Rear_Function(Rotated_Forward, Rotated_Strafing, Rotation, Denominator)
else:
prime_hub.display.char('R')
Denominator = calc_demoninator(Forward, Strafing, Rotation)
Left_Front_Function(Forward, Strafing, Rotation, Denominator)
Left_Rear_Function(Forward, Strafing, Rotation, Denominator)
Right_Front_Function(Forward, Strafing, Rotation, Denominator)
Right_Rear_Function(Forward, Strafing, Rotation, Denominator)