<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="O#+P:PIi#^n4Yqd3ULS9">armUpPosition</variable>
<variable id="75PTA/S`vJD!+I%xtWye">armDownPosition</variable>
</variables>
<block type="procedures_defnoreturn" id="WtpyD@tEu+EoY=P9iY,D" deletable="false" x="83" y="94">
<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="comment" id="/2e/Lfr|J%|Qs|SEHuiE">
<field name="COMMENT">Position of the arm when it's lifted</field>
<next>
<block type="variables_set" id="M69NKd.H*rHA#|!Z@n6_">
<field name="VAR" id="O#+P:PIi#^n4Yqd3ULS9">armUpPosition</field>
<value name="VALUE">
<block type="math_number" id="3H;#CrL-R%!S*.i?CgPN">
<field name="NUM">1000</field>
</block>
</value>
<next>
<block type="comment" id="vyY{54k#z)ATY6b*IURA">
<field name="COMMENT">Position of the arm when it's down</field>
<next>
<block type="variables_set" id="2l5eMelHR#WDVLV~IB8u">
<field name="VAR" id="75PTA/S`vJD!+I%xtWye">armDownPosition</field>
<value name="VALUE">
<block type="math_number" id="j#HfYL*aAC,j38%]j5bL">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="comment" id="([t;rWeO;gEK}tWD%ls9">
<field name="COMMENT">Reset the motor encoder so that it reads zero</field>
<next>
<block type="dcMotor_setProperty_RunMode" id="RYY}GY?dhyccR1o.$nVQ">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="dcMotor_typedEnum_runMode" id="O#dKBnDEa,RQ^o[Lyw`z">
<field name="RUN_MODE">STOP_AND_RESET_ENCODER</field>
</shadow>
</value>
<next>
<block type="comment" id="9lK*4$;.R1HF,9-${Db=">
<field name="COMMENT">Sets the starting position of the arm to down</field>
<next>
<block type="dcMotor_setProperty_Number" id="l^8d`O,`~i0G.w;0ZjN$">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">TargetPosition</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="math_number" id="=fEc+Y`du@Y$mccU?(9.">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="zjJ7)2bsIu@xb+agd2-*">
<field name="VAR" id="75PTA/S`vJD!+I%xtWye">armDownPosition</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="U|V%pSFsT/[A$~BXBxG3">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="dcMotor_typedEnum_runMode" id="bWD`-C?uX?wB?^kHX5(#">
<field name="RUN_MODE">RUN_TO_POSITION</field>
</shadow>
</value>
<next>
<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="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="Vca3X2u$7=:^k*@Tp~s]">
<field name="COMMENT">If the A button is pressed, raise the arm</field>
<next>
<block type="controls_if" id="O`Z-ULP{K=N~~K[R@EJ4">
<value name="IF0">
<block type="gamepad_getProperty_Boolean" id="0A3Ed2_L%9qDpb39Jg)?">
<field name="IDENTIFIER">gamepad1</field>
<field name="PROP">A</field>
<data>{"IDENTIFIER":"gamepad1"}</data>
</block>
</value>
<statement name="DO0">
<block type="dcMotor_setProperty_Number" id="(nq9hE(sj.WmW)+3}q^~">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">TargetPosition</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="S5jE5Gw4w!F)abv*MB!`">
<field name="VAR" id="O#+P:PIi#^n4Yqd3ULS9">armUpPosition</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="3f-g%@XbfV_.Nu8C7~`p">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="dcMotor_typedEnum_runMode" id="PJ_s6o^ysu%ced:1^MR(">
<field name="RUN_MODE">RUN_TO_POSITION</field>
</shadow>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="-LGPWt@4)bySUZ]e={WA">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="math_number" id="M+BI(gyC%qVwwSB,=i:k">
<field name="NUM">0.5</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="comment" id="DiS+]1uL,7:|FWizM:zy">
<field name="COMMENT">If the B button is pressed, lower the arm</field>
<next>
<block type="controls_if" id="MPQ(jW$.W7?dr_Le%?Sv">
<value name="IF0">
<block type="gamepad_getProperty_Boolean" id="/O4_u=~krM(4xNq7hb}p">
<field name="IDENTIFIER">gamepad1</field>
<field name="PROP">B</field>
<data>{"IDENTIFIER":"gamepad1"}</data>
</block>
</value>
<statement name="DO0">
<block type="dcMotor_setProperty_Number" id="TM4T%aF`}rpW-XKg.^`d">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">TargetPosition</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="VS=#7l)C]7x)d}1Bolr`">
<field name="VAR" id="75PTA/S`vJD!+I%xtWye">armDownPosition</field>
</block>
</value>
<next>
<block type="dcMotor_setProperty_RunMode" id="[@{ekCEi`mwFJr%].0(/">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Mode</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="dcMotor_typedEnum_runMode" id="qT8lhifx[i?QwehJse{o">
<field name="RUN_MODE">RUN_TO_POSITION</field>
</shadow>
</value>
<next>
<block type="dcMotor_setProperty_Number" id="JV5^U#S;svsjfn^|rfK^">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">Power</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
<value name="VALUE">
<shadow type="math_number" id="!tqIv,5sj:vs(@2%cfuz">
<field name="NUM">0.5</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="comment" id="0jf~vb3kZ_vtA;WXg0(}">
<field name="COMMENT">Show the current position of the Arm Motor</field>
<next>
<block type="telemetry_addNumericData_Number" id="B3+52qbcImC4yxlPZC=N">
<value name="KEY">
<shadow type="text" id="`dy}gwv|v_riiZww;^n_">
<field name="TEXT">Encoder Position</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="3BY.,qm3fVL$X|IAnb^[">
<field name="NUM">123</field>
</shadow>
<block type="dcMotor_getProperty_Number" id="u,C!p4hrp/Sz9)}[bQ5^">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">CurrentPosition</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
</block>
</value>
<next>
<block type="comment" id="Or(k30gcW4nX~q?Et(n_">
<field name="COMMENT">Show the target position of the Arm Motor</field>
<next>
<block type="telemetry_addNumericData_Number" id="S`quQ!~d@b~@9h_KbBi)">
<value name="KEY">
<shadow type="text" id=";d;D/p:_hQyE0BAp5`Yk">
<field name="TEXT">Desired Position</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="l.)z,;T]5z;8A6aN1;Jf">
<field name="NUM">123</field>
</shadow>
<block type="dcMotor_getProperty_Number" id="MiELk_iz[dgt}:MLIB+U">
<field name="IDENTIFIER">ArmMotorAsDcMotor</field>
<field name="PROP">TargetPosition</field>
<data>{"IDENTIFIER":"Arm Motor"}</data>
</block>
</value>
<next>
<block type="telemetry_update" id="(xZWil?V!Fiy:Aw.6@K]"/>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</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>
