<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="!i-2,%EEFm#4DA;@Y6N1">CPR</variable>
<variable id="5KSqhm6%$gt?0[Mc!I]F">position</variable>
<variable id="*o_X%gv)uTDG9kc^``Y,">revolutions</variable>
<variable id=")4Fe^RcWINgSuZdMWOM}">angle</variable>
<variable id="JjI]ctX;Y5/S,f]w`DxW">angleNormalized</variable>
</variables>
<block type="procedures_defnoreturn" id="WtpyD@tEu+EoY=P9iY,D" deletable="false" x="39" y="-28">
<field name="NAME">runOpMode</field>
<comment pinned="false" h="45" w="532">This function is executed when this Op Mode is selected from the Driver Station.</comment>
<statement name="STACK">
<block type="linearOpMode_waitForStart" id=":`$wN_ci`O;o6P0~.(+g">
<next>
<block type="controls_if" id="}Q?5mbxSO8Di;i!__6[y">
<value name="IF0">
<block type="linearOpMode_opModeIsActive" id=")o%YFX/#9kvv^sgXr4~5"/>
</value>
<statement name="DO0">
<block type="comment" id="^N!w3Agh}YFe$3cj_YBD">
<field name="COMMENT">Reset the motor encoder so that it reads zero</field>
<next>
<block type="dcMotor_setProperty_RunMode" id="1|iH*VXes7@mQ=J|7fMZ">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="dcMotor_typedEnum_runMode" id="8{oUZ{wAS#l;au[!?t^8">
<field name="RUN_MODE">STOP_AND_RESET_ENCODER</field>
</shadow>
</value>
<next>
<block type="comment" id="`tv/?-U_gI-Gv4yPeEbc">
<field name="COMMENT">Turn motor back on, required after STOP_AND_RESET_ENCODER</field>
<next>
<block type="dcMotor_setProperty_RunMode" id="*x:L|f|LXRU~$*{!QRr~">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="dcMotor_typedEnum_runMode" id="HBv]ej;xbop5~K;jg+Qi">
<field name="RUN_MODE">RUN_WITHOUT_ENCODER</field>
</shadow>
</value>
<next>
<block type="controls_whileUntil" id="^0Kagy/e+Ea{rbZPv2G6">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="linearOpMode_opModeIsActive" id="e)cr{!2VIET83s,JWC.="/>
</value>
<statement name="DO">
<block type="comment" id="[AUvhg;y]7)?wzHZxVeG">
<field name="COMMENT">Your Counts Per Revolution Here</field>
<next>
<block type="variables_set" id="_TKW_.91;=FxHz{Z8+]2">
<field name="VAR" id="!i-2,%EEFm#4DA;@Y6N1">CPR</field>
<value name="VALUE">
<block type="math_number" id="Ur)_0ncZIxuDhG{_IWXo">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="comment" id="ntv7`~yx/z2V0LY-bOn7">
<field name="COMMENT">Get the current position of the motor</field>
<next>
<block type="variables_set" id=":Rbc)wW;VF%B~0z:y=2R">
<field name="VAR" id="5KSqhm6%$gt?0[Mc!I]F">position</field>
<value name="VALUE">
<block type="dcMotor_getProperty_Number" id="xjS[:0x.u~-Z6w:L4+_6">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">CurrentPosition</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
</block>
</value>
<next>
<block type="variables_set" id="z(=hS^1/./3Ty|mKr$79">
<field name="VAR" id="*o_X%gv)uTDG9kc^``Y,">revolutions</field>
<value name="VALUE">
<block type="math_arithmetic" id="CMr{UV,*Q=@))A4szEe?">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number" id="MgL$M+v9~0#~CRWVv+9Z">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="Mjn1m/m*}c5NFKfqV+]h">
<field name="VAR" id="5KSqhm6%$gt?0[Mc!I]F">position</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="DSZ^AJ`9Gg98TdSuRd|A">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="{n2gZ:+++;:Dxks2pa:@">
<field name="VAR" id="!i-2,%EEFm#4DA;@Y6N1">CPR</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="MUgVy,q^zl^aWwAan#ct">
<field name="VAR" id=")4Fe^RcWINgSuZdMWOM}">angle</field>
<value name="VALUE">
<block type="math_arithmetic" id="%qckV#B[r_8=R$MDE/r}">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="|swasF6RVut1[B!d46Y=">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="uL*0:hs8Y]05iSJ*!R2N">
<field name="VAR" id="*o_X%gv)uTDG9kc^``Y,">revolutions</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="D23nDfP2lFMxnvsC_BDz">
<field name="NUM">360</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="variables_set" id="ekxYaA0R#gWh_/VBd%=R">
<field name="VAR" id="JjI]ctX;Y5/S,f]w`DxW">angleNormalized</field>
<value name="VALUE">
<block type="math_modulo" id="+rlX-d.#LJ7j_u^2w{v*">
<value name="DIVIDEND">
<shadow type="math_number" id="/|4o-vM{O{u?qyp_]Nol">
<field name="NUM">64</field>
</shadow>
<block type="variables_get" id="^g2~E*fA+-HOLMMq/}S=">
<field name="VAR" id=")4Fe^RcWINgSuZdMWOM}">angle</field>
</block>
</value>
<value name="DIVISOR">
<shadow type="math_number" id="R5[M-QO7s~SW`IO5=!(e">
<field name="NUM">360</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="comment" id="t,H$|ENQIppI42aB`_e9">
<field name="COMMENT"> Show the position of the motor on telemetry</field>
<next>
<block type="telemetry_addNumericData_Number" id="vu;U#eDcB4BOwDr6*[pT">
<value name="KEY">
<shadow type="text" id="/zmgB:JhItzhkmw?/QU/">
<field name="TEXT">Encoder Position</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="*;+NAXu]7-C*wu9W_Me?">
<field name="NUM">123</field>
</shadow>
<block type="variables_get" id="NPmJ{A`$3BET#CEoE3Od">
<field name="VAR" id="5KSqhm6%$gt?0[Mc!I]F">position</field>
</block>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="!dBp1H+M?YoPh:}x!s].">
<value name="KEY">
<shadow type="text" id="eew9f9pcb[Fg$Efg#1~@">
<field name="TEXT">Encoder Revolutions</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="~L]aB^[OzmLBmlzDB8=E">
<field name="NUM">123</field>
</shadow>
<block type="variables_get" id="=r~c|iaP(w0U;!HNI:0$">
<field name="VAR" id="*o_X%gv)uTDG9kc^``Y,">revolutions</field>
</block>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="MOlL/Pg/7cK4G,lKGGm}">
<value name="KEY">
<shadow type="text" id="(b~k)R[L`YR4j/_`^!mc">
<field name="TEXT">Encoder Angle (Degrees)</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="#P5Ey4uS%|pf2;a{(F?X">
<field name="NUM">123</field>
</shadow>
<block type="variables_get" id=")N+INCF,yGk=[Z_(F=Z1">
<field name="VAR" id=")4Fe^RcWINgSuZdMWOM}">angle</field>
</block>
</value>
<next>
<block type="telemetry_addNumericData_Number" id="1b1h}m6j)%+al?Td$IX:">
<value name="KEY">
<shadow type="text" id="5gk2g`B5F[?vtFN6D3,U">
<field name="TEXT">Encoder Angle - Normalized (Degrees)</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="CcMT(fTL`SGCA]XFWlg|">
<field name="NUM">123</field>
</shadow>
<block type="variables_get" id="2!prCvgK24g)oiKWYHLo">
<field name="VAR" id="JjI]ctX;Y5/S,f]w`DxW">angleNormalized</field>
</block>
</value>
<next>
<block type="telemetry_update" id="$TIw+#[k]t}#Zo[1Ye?$"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</xml>
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<Extra>
<OpModeMeta flavor="TELEOP" group="" autoTransition="" />
<Enabled value="true" />
</Extra>
