Last active
June 26, 2023 23:12
-
-
Save WestsideRobotics/0cf4f5f9913266be93cb366f54045a24 to your computer and use it in GitHub Desktop.
6-18-23 OpMode for FTC PR 2853, testing Webcam Control Blocks for White Balance 6-26-23 removed setProcessEnabled()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xml xmlns="https://developers.google.com/blockly/xml"> | |
<variables> | |
<variable id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</variable> | |
<variable id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</variable> | |
<variable id="d3c/kq?LHN~m;PA@fr-t">setWhiteBalanceModeBoolean</variable> | |
<variable type="AprilTagProcessor.Builder" id="NYqOu)Ei(Q{C!f;y!a^O">myAprilTagProcessorBuilder</variable> | |
<variable id="3.)/eLHm(iRl1^Qsq;Hb">USE_WEBCAM</variable> | |
<variable id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</variable> | |
<variable id="!;}U%XlE[1kRUxXb?;0=">setWhiteBalanceBoolean</variable> | |
<variable id="?$5B~Px*.0/^b(+=;!)C">myTemperature</variable> | |
<variable id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</variable> | |
<variable id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</variable> | |
<variable id="TH^`wXe*;d{FEY#vBAtF">minTemperature</variable> | |
<variable id="cf*^ww67t7IG$zoNx7I@">maxTemperature</variable> | |
<variable type="VisionPortal.Builder" id="wx@xgbnS_]b0DQL.08Qg">myVisionPortalBuilder</variable> | |
</variables> | |
<block type="procedures_defnoreturn" id="WtpyD@tEu+EoY=P9iY,D" deletable="false" x="-215" y="-159"> | |
<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="vG1;7$#*;crH,9)V$Lbq"> | |
<field name="COMMENT">This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation.</field> | |
<next> | |
<block type="comment" id="vUNjVyX%Y9V~:.7m2xe7"> | |
<field name="COMMENT">It also tests the new "transformer Blocks" for White Balance.</field> | |
<next> | |
<block type="variables_set" id="+WOa|3hz0c^Rah6+[;U4"> | |
<field name="VAR" id="3.)/eLHm(iRl1^Qsq;Hb">USE_WEBCAM</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id="C]dWgdzJ2YW[h}=7w5QN"> | |
<field name="BOOL">TRUE</field> | |
</block> | |
</value> | |
<next> | |
<block type="procedures_callnoreturn" id="f5VC4xOrYYZrGzpFY}@G"> | |
<mutation name="initAprilTag"/> | |
<comment pinned="false" h="60" w="270">Initialize AprilTag before waitForStart.</comment> | |
<next> | |
<block type="controls_whileUntil" id="h1Xrlgu|L8w(=tIL,Q8V"> | |
<field name="MODE">WHILE</field> | |
<value name="BOOL"> | |
<block type="logic_operation" id="z2}lPJUqg#pK?C$DvTO." inline="false"> | |
<field name="OP">AND</field> | |
<value name="A"> | |
<block type="logic_compare" id="d!oj^kSgz%zjku|L3UxS" inline="false"> | |
<field name="OP">NEQ</field> | |
<value name="A"> | |
<block type="visionPortal_getCameraState" id="@S]9Bi|b/[P{$:xVO5RX"> | |
<comment pinned="false" h="150" w="325">Return the state of the camera.</comment> | |
<value name="VISION_PORTAL"> | |
<block type="variables_get" id="Vw2e55.uo`X]7PA(6hin"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="B"> | |
<block type="visionPortal_typedEnum_cameraState" id=";Qw#T4e8Fp%Ayv=IaV@1"> | |
<field name="CAMERA_STATE">STREAMING</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="B"> | |
<block type="linearOpMode_opModeInInit" id="qkVI4$;4h~JUJxQD6BiD"/> | |
</value> | |
</block> | |
</value> | |
<statement name="DO"> | |
<block type="comment" id=":uOqfr2m9(aBG`ytR7!-"> | |
<field name="COMMENT">Wait for Streaming to begin, before using Camera Controls.</field> | |
<next> | |
<block type="linearOpMode_sleep_Number" id="W~bNu[!LFp4xMLXE2q6{"> | |
<value name="MILLISECONDS"> | |
<shadow type="math_number" id="s@8U^NWR20-Fz#c_D~!}"> | |
<field name="NUM">200</field> | |
</shadow> | |
</value> | |
</block> | |
</next> | |
</block> | |
</statement> | |
<next> | |
<block type="procedures_callnoreturn" id="-BLW2A#m5-DaP,Fi~U15"> | |
<mutation name="initialize White Balance Control"/> | |
<next> | |
<block type="telemetry_addTextData_All" id="Y/b(p3p_Ls7l_.)bQt%8"> | |
<value name="KEY"> | |
<shadow type="text" id="]K/@Q[7z:EBSoy.ggFCo"> | |
<field name="TEXT">DS preview on/off</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="eV-62@bA|1V9{)n7lim2"> | |
<field name="TEXT">3 dots, Camera Stream</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="/Zm[n8^)(`(S}Ab9j!;|"> | |
<value name="KEY"> | |
<shadow type="text" id="E)4aB(Zb2,Da/0v0AiN="> | |
<field name="TEXT">></field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="^u5_oh+s(.Vs1Kk;$yw9"> | |
<field name="TEXT">Touch Play to start OpMode</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_update" id="CcM7+$syN,5p}u1NCi8q"> | |
<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="procedures_callnoreturn" id="vFtq$`!=QgH!UFn~vc0A"> | |
<mutation name="set White Balance temperature"/> | |
<next> | |
<block type="procedures_callnoreturn" id="L1~6q-w9m`2ahlT|b!@A"> | |
<mutation name="telemetryAprilTag"/> | |
<next> | |
<block type="telemetry_update" id="exvivmft-pX$n!1,8Ea$"> | |
<comment pinned="false" h="55" w="295">Push telemetry to the Driver Station.</comment> | |
<next> | |
<block type="linearOpMode_sleep_Number" id="jjoCwI:;J87CrtGs%}K7"> | |
<comment pinned="false" h="46" w="191">Share the CPU.</comment> | |
<value name="MILLISECONDS"> | |
<shadow type="math_number" id="w~.7$M*lJeh#@I/xsbHy"> | |
<field name="NUM">20</field> | |
</shadow> | |
</value> | |
</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> | |
<block type="procedures_defnoreturn" id="fQp~,ZYAv00*6j5^:acx" x="509" y="-168"> | |
<field name="NAME">initialize White Balance Control</field> | |
<comment pinned="false" h="80" w="160">Describe this function...</comment> | |
<statement name="STACK"> | |
<block type="variables_set" id="G,rT[`PsC/(C@aB=BMUl"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
<value name="VALUE"> | |
<block type="visionPortal_getWhiteBalanceControl" id="XL~5MNc+!X]l(`z*PwW="> | |
<comment pinned="false" h="150" w="325">Get the WhiteBalanceControl object, to allow adjusting the camera's white balance temperature.</comment> | |
<data>{"commentPositionLeft":-355,"commentPositionTop":-37}</data> | |
<value name="VISION_PORTAL"> | |
<block type="variables_get" id="Q:K|pm@-u!,B=dG9bU9:"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="S9y[x,OEXUTLN1;~6A%t"> | |
<field name="VAR" id="d3c/kq?LHN~m;PA@fr-t">setWhiteBalanceModeBoolean</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id="n3fi8q|kLrUW[@?=@a[0"> | |
<field name="BOOL">FALSE</field> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="g5}@kOj[+VUMRF(PHVMP"> | |
<field name="VAR" id="!;}U%XlE[1kRUxXb?;0=">setWhiteBalanceBoolean</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id=")+e@cFc,;WKs2%5s$%6z"> | |
<field name="BOOL">FALSE</field> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="0tk7!PD{,d0SCEU?gi57"> | |
<field name="COMMENT">Enable ONE of the next two Blocks.</field> | |
<next> | |
<block type="whiteBalanceControl_setMode" id="?|a8r%G3OI*{Yg6p0z1j"> | |
<mutation has_output="false"/> | |
<comment pinned="false" h="150" w="325">Set the white balance mode value.</comment> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="yn])7lj#ESb8fcz@b];}"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
<value name="MODE"> | |
<shadow type="whiteBalanceControl_typedEnum_mode" id="Pa]Xbu$PaqmnluU2%i6:"> | |
<field name="MODE">MANUAL</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="variables_set" id=";1kP4`0-*:Sv^izRmWY+" disabled="true"> | |
<field name="VAR" id="d3c/kq?LHN~m;PA@fr-t">setWhiteBalanceModeBoolean</field> | |
<value name="VALUE"> | |
<block type="whiteBalanceControl_setMode" id="h`2Xko~YN8G_,xt00Mn:"> | |
<mutation has_output="true"/> | |
<comment pinned="false" h="150" w="325">Set the white balance mode value.</comment> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="`ZeE@e9Vm#-]NT;C{u~j"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
<value name="MODE"> | |
<shadow type="whiteBalanceControl_typedEnum_mode" id="dSyf.6oAynr[os=YQE%."> | |
<field name="MODE">MANUAL</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="N0I;MY}X2B%sr+-srwxp"> | |
<field name="VAR" id="TH^`wXe*;d{FEY#vBAtF">minTemperature</field> | |
<value name="VALUE"> | |
<block type="whiteBalanceControl_getWhiteBalanceTemperature" id="Mz3GV}[}0RNL~t6Hn)HT"> | |
<field name="FUNC">getMinWhiteBalanceTemperature</field> | |
<comment pinned="false" h="150" w="325">Get the current (or minimum or maximum) white balance temperature, in degrees Kelvin.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id=".sP)#*`2F=)5*)2r%!Br"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="F$kPup9*q@74HeiGguF}"> | |
<field name="VAR" id="cf*^ww67t7IG$zoNx7I@">maxTemperature</field> | |
<value name="VALUE"> | |
<block type="whiteBalanceControl_getWhiteBalanceTemperature" id="F*cH)`}3qiS,p*swFK%b"> | |
<field name="FUNC">getMaxWhiteBalanceTemperature</field> | |
<comment pinned="false" h="150" w="325">Get the current (or minimum or maximum) white balance temperature, in degrees Kelvin.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="{W%bz))li**NP!vpav4w"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="khE)ay;ssG?Nq7ducezI"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
<value name="VALUE"> | |
<block type="whiteBalanceControl_getWhiteBalanceTemperature" id="-Pf/n8=)r+Uac-zl^o(J"> | |
<field name="FUNC">getWhiteBalanceTemperature</field> | |
<comment pinned="false" h="150" w="325">Get the current (or minimum or maximum) white balance temperature, in degrees Kelvin.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="0|F9eb6]~]C]fxq,];DB"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="6(R9{]~cvOn[(#xb8M6P" x="1449" y="-164"> | |
<field name="NAME">set White Balance temperature</field> | |
<comment pinned="false" h="80" w="160">Describe this function...</comment> | |
<statement name="STACK"> | |
<block type="comment" id="7;*5|RK|$9YTZIs9o,!("> | |
<field name="COMMENT">Warmer: press Red B button (or circle) Cooler: press Blue X button (or square)</field> | |
<next> | |
<block type="controls_if" id=":d4)2bJY/jWc4:LQRXLr"> | |
<mutation elseif="1"/> | |
<value name="IF0"> | |
<block type="gamepad_getProperty_Boolean" id="/jVQ[%.DxoEQ.BybdS%]"> | |
<field name="IDENTIFIER">gamepad1</field> | |
<field name="PROP">B</field> | |
<data>{"IDENTIFIER":"gamepad1"}</data> | |
</block> | |
</value> | |
<statement name="DO0"> | |
<block type="math_change" id="=EfWUUz(T#YV5zQF[@xd"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
<value name="DELTA"> | |
<shadow type="math_number" id="[bAY*OWXjPmG%?!TQ+{]"> | |
<field name="NUM">100</field> | |
</shadow> | |
</value> | |
</block> | |
</statement> | |
<value name="IF1"> | |
<block type="gamepad_getProperty_Boolean" id="IWe^JL6[joW%|7iyIc*?"> | |
<field name="IDENTIFIER">gamepad1</field> | |
<field name="PROP">X</field> | |
<data>{"IDENTIFIER":"gamepad1"}</data> | |
</block> | |
</value> | |
<statement name="DO1"> | |
<block type="math_change" id="7YK{N^L+3+q,7@38stw."> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
<value name="DELTA"> | |
<shadow type="math_number" id="y:Wg~h@iYPLGLc_n*r0V"> | |
<field name="NUM">-100</field> | |
</shadow> | |
</value> | |
</block> | |
</statement> | |
<next> | |
<block type="variables_set" id="N*xOW=cYtxm{9tKdb+fi"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
<value name="VALUE"> | |
<block type="math_constrain" id="Ue{!*1dV#E{78J(EKbqJ"> | |
<value name="VALUE"> | |
<shadow type="math_number" id="0Yk2X821UH.hoYW-=w+}"> | |
<field name="NUM">50</field> | |
</shadow> | |
<block type="variables_get" id="tH2CNP+M)k.?kX:IaUAy"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
</block> | |
</value> | |
<value name="LOW"> | |
<shadow type="math_number" id="4tauSa5%#VKF3l4|wC|t"> | |
<field name="NUM">1</field> | |
</shadow> | |
<block type="variables_get" id="xlKSrkC*um(SG+8+|}!;"> | |
<field name="VAR" id="TH^`wXe*;d{FEY#vBAtF">minTemperature</field> | |
</block> | |
</value> | |
<value name="HIGH"> | |
<shadow type="math_number" id="XXPz=s`Qn%0~GJ_p|_iq"> | |
<field name="NUM">100</field> | |
</shadow> | |
<block type="variables_get" id="#-8g8m:Mg-l(D4c*L%NI"> | |
<field name="VAR" id="cf*^ww67t7IG$zoNx7I@">maxTemperature</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="{fQQ:cb|*/F[#,)/[WLS"> | |
<field name="COMMENT">Enable ONE of the next two Blocks.</field> | |
<next> | |
<block type="whiteBalanceControl_setWhiteBalanceTemperature" id="eSEvK),3Iu;j/W-69O47"> | |
<mutation has_output="false"/> | |
<comment pinned="false" h="150" w="325">Set the white balance temperature, in degrees Kelvin.</comment> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="=-(Qwg/c2?%to^9kd77P"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
<value name="WHITE_BALANCE_TEMPERATURE"> | |
<shadow type="math_number" id="dikUa~Vx/KzO%cAJ,E/q"> | |
<field name="NUM">3000</field> | |
</shadow> | |
<block type="variables_get" id="3Eo-cHk_qD0DJhWfp)K?"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="WezcDHjYxcdg6am!su6w" disabled="true"> | |
<field name="VAR" id="!;}U%XlE[1kRUxXb?;0=">setWhiteBalanceBoolean</field> | |
<value name="VALUE"> | |
<block type="whiteBalanceControl_setWhiteBalanceTemperature" id=")b(@FqMjR@B^}I:F=bgG"> | |
<mutation has_output="true"/> | |
<comment pinned="false" h="150" w="325">Set the white balance temperature, in degrees Kelvin.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="X7xJ)Zz%QFFrBbKGEb[A"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
<value name="WHITE_BALANCE_TEMPERATURE"> | |
<shadow type="math_number" id="//eKd`*0fT)`?-)e{|;0"> | |
<field name="NUM">3000</field> | |
</shadow> | |
<block type="variables_get" id="kIR|0siianVe#mOpk)pu"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="F4|d.o.-Uy[8xm.VHb;s"> | |
<value name="KEY"> | |
<shadow type="text" id="CEFUZ3[,]6SgqC-Pt32^"> | |
<field name="TEXT">setModeBoolean, if used</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="variables_get" id="0=mNsoqGbaLY7a+3./3)"> | |
<field name="VAR" id="d3c/kq?LHN~m;PA@fr-t">setWhiteBalanceModeBoolean</field> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="r}aJJeUB/EAVd*d[gJgl"> | |
<value name="KEY"> | |
<shadow type="text" id="$GySn4JP-Tc0)@^Saqj;"> | |
<field name="TEXT">setWhiteBalanceBoolean, if used</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="T}@S|=^/5F7yDq11MIqT"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="variables_get" id="^#%8`w72kETF}L{S*6F~"> | |
<field name="VAR" id="!;}U%XlE[1kRUxXb?;0=">setWhiteBalanceBoolean</field> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="eXP?rX@-SkWVk[UcU[Ui"> | |
<value name="TEXT"> | |
<shadow type="text" id="SDx/().;d??{1YwYstV~"> | |
<field name="TEXT">Warmer: Red B (circle) Cooler: Blue X (square)</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="xp$?PrT:T=LUF3M[t]5z"> | |
<value name="KEY"> | |
<shadow type="text" id="23iL7X_4/Whq*5HAZ;op"> | |
<field name="TEXT">myTemperature</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<block type="misc_formatNumber" id="ug%qz^px3:2d3HA4l{Kl"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="l~[DuPw0E.Oo@6;cSB;n"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="variables_get" id="Bsg2:+JmgavqH,r_Txz~"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myTemperature</field> | |
</block> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="97d]7tx1hgv?-GfADawR"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="ldzK5Rd=DtV2Uhf(6EYQ"> | |
<value name="KEY"> | |
<shadow type="text" id="(f`j,w$k9%MP|1U;M0fU"> | |
<field name="TEXT">actual White Balance temp. from webcam</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<block type="misc_formatNumber" id="D|VykaBvoZ?8On*85i/m"> | |
<value name="NUMBER"> | |
<shadow type="math_number"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="whiteBalanceControl_getWhiteBalanceTemperature" id="fS]^NxYPDK1Tq$-/~yf0"> | |
<field name="FUNC">getWhiteBalanceTemperature</field> | |
<comment pinned="false" h="150" w="325">Get the current (or minimum or maximum) white balance temperature, in degrees Kelvin.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="WHITE_BALANCE_CONTROL"> | |
<block type="variables_get" id="A;cU[,~J(^.;Rz$~E+Nn"> | |
<field name="VAR" id="T-sMvIuEvt;q;Xpi0sfT">myWhiteBalanceControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="K^OLi+8aW|)?8NVvl;KL"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id=":Un!nS!LS%^tq]:g4^?Z" x="509" y="340"> | |
<field name="NAME">initAprilTag</field> | |
<comment pinned="false" h="80" w="160">Initialize AprilTag Detection.</comment> | |
<statement name="STACK"> | |
<block type="comment" id="Z#tr,B$;l$RV0)j4q0n."> | |
<field name="COMMENT">First, create an AprilTagProcessor.Builder.</field> | |
<next> | |
<block type="aprilTagProcessorBuilder_create_assign" id="]gR@^J/H_v)OY6f[`3z5"> | |
<field name="APRIL_TAG_PROCESSOR_BUILDER" id="NYqOu)Ei(Q{C!f;y!a^O" variabletype="AprilTagProcessor.Builder">myAprilTagProcessorBuilder</field> | |
<next> | |
<block type="comment" id="-dkxGvL2:a(h8n8Mok-i"> | |
<field name="COMMENT">Create an AprilTagProcessor by calling build.</field> | |
<next> | |
<block type="variables_set" id="$.wt,WCD1s5fSqROQT*("> | |
<field name="VAR" id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</field> | |
<value name="VALUE"> | |
<block type="aprilTagProcessorBuilder_build" id="3Vk~@]VGDELD;GHGgEgn"> | |
<field name="APRIL_TAG_PROCESSOR_BUILDER" id="NYqOu)Ei(Q{C!f;y!a^O" variabletype="AprilTagProcessor.Builder">myAprilTagProcessorBuilder</field> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="w{nzs#L5ZbP.GKW2S`x_"> | |
<field name="COMMENT">Next, create a VisionPortal.Builder and set attributes related to the camera.</field> | |
<next> | |
<block type="visionPortalBuilder_create_assign" id="s1^/ZS*LG[dC%CsYcl=%"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<next> | |
<block type="controls_if" id="T`t))DI)e(S6b*Xls7U="> | |
<mutation else="1"/> | |
<value name="IF0"> | |
<block type="variables_get" id="Zr+H]wQb_aiB|J+{-0:G"> | |
<field name="VAR" id="3.)/eLHm(iRl1^Qsq;Hb">USE_WEBCAM</field> | |
</block> | |
</value> | |
<statement name="DO0"> | |
<block type="visionPortalBuilder_setCamera" id="h;`Yd}]R=F.Fw89p`1N/"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<comment pinned="false" h="68" w="247">Use a webcam.</comment> | |
<value name="CAMERA"> | |
<shadow type="navigation_webcamName" id="b`AjugjMrzm855@U*q;W"> | |
<field name="WEBCAM_NAME">Webcam 1</field> | |
</shadow> | |
</value> | |
</block> | |
</statement> | |
<statement name="ELSE"> | |
<block type="visionPortalBuilder_setCamera" id="pm=N,.9EB)-Y)[HJlB;-"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<comment pinned="false" h="56" w="298">Use the device's back camera.</comment> | |
<value name="CAMERA"> | |
<shadow type="navigation_typedEnum_builtinCameraDirection" id="8u8O_}55dptgjBxmKq`9"> | |
<field name="CAMERA_DIRECTION">BACK</field> | |
</shadow> | |
</value> | |
</block> | |
</statement> | |
<next> | |
<block type="comment" id="-QJd~|I/HUP84GR.F=0N"> | |
<field name="COMMENT">Add myAprilTagProcessor to the VisionPortal.Builder.</field> | |
<next> | |
<block type="visionPortalBuilder_addProcessor" id="`A$k?7nl@kd=7y*v@/+-"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<value name="VISION_PROCESSOR"> | |
<block type="variables_get" id="HoXmAtlB7{ai0YF!ZyTl"> | |
<field name="VAR" id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</field> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="6Q2EYFS^A(u/rVLX*nI}"> | |
<field name="COMMENT">Create a VisionPortal by calling build.</field> | |
<next> | |
<block type="variables_set" id="UggZXj@UuhBf97)(oA;m"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
<value name="VALUE"> | |
<block type="visionPortalBuilder_build" id="OBOV:tKH!^AaYsI{A$~x"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="Eg%7GTPuhcoA]FCw9:]O" collapsed="true" x="-212" y="682"> | |
<field name="NAME">telemetryAprilTag</field> | |
<comment pinned="false" h="80" w="160">Display info (using telemetry) for a recognized AprilTag.</comment> | |
<statement name="STACK"> | |
<block type="variables_set" id="c8~R@@~J_)0dhTTP,GP@"> | |
<field name="VAR" id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</field> | |
<comment pinned="false" h="80" w="160">Get a list of AprilTag detections.</comment> | |
<value name="VALUE"> | |
<block type="aprilTagProcessor_getLatestDetections" id="^Sth`xX=n79Q8`P*Z#qt"> | |
<value name="APRIL_TAG_PROCESSOR"> | |
<block type="variables_get" id="Icn).;@XjTI7SR.j$UY#"> | |
<field name="VAR" id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="6E^b4L`Jfq56E$-!S%yU"> | |
<value name="TEXT"> | |
<shadow type="text" id="*^s8ZGvb=(P@,}r{IGmG"> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="3m5}jTks8BeMJ]|.h*Kp"> | |
<value name="KEY"> | |
<shadow type="text" id="MNA3Pe{~9.uc1dSMmO=j"> | |
<field name="TEXT"># AprilTags Detected</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="DRWu-r*O-0eJ4pG2n$_l"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="lists_length" id="q{bEB[P*p2XiVOMj*ku#"> | |
<value name="VALUE"> | |
<block type="variables_get" id="/5v#48C2W5M+l:4)g!zX"> | |
<field name="VAR" id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="controls_forEach" id="|@Y$y8D~],V(MRQ+Cyv{"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
<comment pinned="false" h="81" w="199">Iterate through list and call a function to display info for each recognized AprilTag.</comment> | |
<value name="LIST"> | |
<block type="variables_get" id="W,d1s!eFWeDT0X}~eq,n"> | |
<field name="VAR" id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</field> | |
</block> | |
</value> | |
<statement name="DO"> | |
<block type="comment" id="U@Dkpel-LMa.00jJsqA-"> | |
<field name="COMMENT">Display info about the detection.</field> | |
<next> | |
<block type="telemetry_addLine" id="qrKb?#/HMYJo.RhU8rW:"> | |
<value name="TEXT"> | |
<shadow type="text" id="3^Lv-r.jG6}7LV;(yIh."> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="controls_if" id="1KHSCf_sX!Qd~BKfG}QD"> | |
<mutation else="1"/> | |
<value name="IF0"> | |
<block type="aprilTagDetection_getProperty_IsNotNull" id=":^$lP:Ut!p3Z)E+vy^]D"> | |
<field name="PROP">metadata</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="9Lq*6VTlT$7uDRiB|mYe"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<statement name="DO0"> | |
<block type="telemetry_addLine" id="awB~K!HjEb=h6tM,%vLN"> | |
<value name="TEXT"> | |
<shadow type="text" id="?hM/$PX}4MN:|W`joKgn"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="0C_x2#T#t7yl!%45k{$?"> | |
<mutation items="4"/> | |
<value name="ADD0"> | |
<block type="text" id="buEo7p[-2T4:49=`uwK1"> | |
<field name="TEXT">==== (ID </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="aprilTagDetection_getProperty_Number" id="lifbVBMNn+.1j?y6v54X"> | |
<field name="PROP">id</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="w(63KWmGiZ83+qITBep;"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="=n-]].djPxb,OFyxcOQF"> | |
<field name="TEXT">) </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="aprilTagDetection_getProperty_String" id="=AvXMAjUic3u3lbFtEt4"> | |
<field name="PROP">metadata.name</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="zKHYs.Y87Qrl9%G~Oq^V"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id=";grqK`+-g7;g50c=|L0l"> | |
<value name="TEXT"> | |
<shadow type="text" id="!y]i-sUsabeyV/)u=6D5"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="4TtGi;Z(gbFaks}Eap^9"> | |
<mutation items="7"/> | |
<value name="ADD0"> | |
<block type="text" id="+]Cns+.i=%b0bFaT6;NI"> | |
<field name="TEXT">XYZ </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="df*#gw3iYx$kvL$9{Y?m"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="g`p?z|x@JeU%MJ4.tSFQ"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="jUN`u.6t[:O8`9Ncql]!"> | |
<field name="PROP">ftcPose.x</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="mb(6}~t}KLoi4`XT~d:H"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="k*}!VVn#l8HSq7E2i?#R"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="mh4H+`GE$Em,(iS4ZjPR"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="y34}1aACqw@S]sESt=A#"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="4Oj?ZaC$d#_1X}?b[T.|"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="2cGf/q9c-ZnJ}LB6C1i$"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="^ZxENE!MDi;z:vW0d@XL"> | |
<field name="PROP">ftcPose.y</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="bYyr?K,sa#Z.])=_ot.X"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="BQJxM*kkA=P:cx1$gjDj"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="$REh~]PUb9LYTO;OfzqZ"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="D7A3=:fGOVPSdci(UQtX"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD5"> | |
<block type="misc_formatNumber_withWidth" id="FCZL%yFs6[0x{rm0ps54"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="|j[Xf6X[,{Y~6k#Ow9ay"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="@o/Xx/]f-CWGv|Tr)2Nk"> | |
<field name="PROP">ftcPose.z</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="[9!-4|yF{X2|/{iSu:SC"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="ga,Viu`_|ozkv#5q3*@0"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="(E3-dHVlUbl(~6A~LN[p"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD6"> | |
<block type="text" id=")9nfo^3]N$S,m~5}*3*="> | |
<field name="TEXT"> (inch)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="6W%[*9{;}.5Jl{VBB=*t"> | |
<value name="TEXT"> | |
<shadow type="text" id=";t?`r+|~SzTLUUHO=;M9"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="$$x)e|XJcO*g[Y8~M2/Q"> | |
<mutation items="7"/> | |
<value name="ADD0"> | |
<block type="text" id="CNSpY2iH=tR#]P,pi4u."> | |
<field name="TEXT">PRY </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="sht8%%Nn`h2}jwZ`-{x)"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="?pMQrP+klggGPQ})NZWJ"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="Iy|1o|tQ9/Xq~XhaEN$_"> | |
<field name="PROP">ftcPose.yaw</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="rVJim4c8+/ys[,t:o!0a"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="mHP*I^3G3|9rAiui`;?f"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="VxWPF,FgQz,lDodmj[WR"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="]dbZO?6z_PP)Na=ij|hW"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="!i;Ow5b5|tm]^:f=af8O"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="xsH[9W8/eLks@vlm]1*g"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="ShLjZCVXxN!~/4l*tkIW"> | |
<field name="PROP">ftcPose.pitch</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="OCoPF8gE#WFKctf6vd6f"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="DyJDDqNjyT?RD%Og91T/"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="M?Svc5)[b)Apn186A8Em"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="7-XP1=zX3p(TS(}va$9`"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD5"> | |
<block type="misc_formatNumber_withWidth" id=":tQhsy?3wU|KpZT;GEux"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="v%b/#{Uh]xNL*jCpZAlp"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="rr^=wlJCB2_afebAXJ}Z"> | |
<field name="PROP">ftcPose.roll</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="vBZ8!}wPWKb}V3-g]Wle"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="mu5y,^`sp#UgVsrfnkbc"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="1a@0e%XGstoBjtg)K@p]"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD6"> | |
<block type="text" id="I*Wn1Gf}j+e`]CP5J0Cp"> | |
<field name="TEXT"> (deg)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="p~aY/Ief^l:6#%yF5mBb"> | |
<value name="TEXT"> | |
<shadow type="text" id="[:Q^{:f(MSqR]$h@YO_G"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="text_join" id="7AAW16ak[E;pRyJ50_pV"> | |
<mutation items="7"/> | |
<value name="ADD0"> | |
<block type="text" id="_D88fgJh36dZBe#kxQkh"> | |
<field name="TEXT">RBE </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="o=,mI,_W=C-(irqk:S^/"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="67$:0vchTm|ZAu?yf9Zs"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="V_e8w[RX[YJ6%2RfwTK4"> | |
<field name="PROP">ftcPose.range</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="5U:C0C|9gsGJwjwric-u"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="E}T84I!akJTmE1gb#KTc"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="UKUfpg-DJ~rM||Pp1;?~"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="/)!A!j+m`c^.RSzJfnW8"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="v,Ilg5bR5*;(#^l3B@-0"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="%)S}?+}8]#C5YOJMTtIz"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="}bh%9Kz6)u_zYo7,L]Iq"> | |
<field name="PROP">ftcPose.bearing</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="B6P^H@vWo+vyX@sYn_ik"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="5ti##om.fc`N4y~4C#;|"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="22o;=,7*otM:5h`-4L|A"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="Q|e}m1um|X;(#X^F`wb("> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD5"> | |
<block type="misc_formatNumber_withWidth" id="x-{*.Ghd4zinz}U9X3?V"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id=".MdJRQ6rUBU)RFzD8T%o"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="D(K1+O}E+Y7i_ek8}A?z"> | |
<field name="PROP">ftcPose.elevation</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="sv;lYz!5q^E[A|N14(.X"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="GU73O^@;SXL))%*l[8Me"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="4Nv)-M9MfCY%aAn:1SEF"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD6"> | |
<block type="text" id="x`,kpt}.uw,YSWON!D^j"> | |
<field name="TEXT"> (inch, deg, deg)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
<statement name="ELSE"> | |
<block type="telemetry_addLine" id=".k7)ZU|.JU[vLM%.9oWH"> | |
<value name="TEXT"> | |
<shadow type="text" id="hqwM9[:8R6P;nJWo`z$@"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="Q$XL59m.y(HLLD=Lb6bM"> | |
<mutation items="3"/> | |
<value name="ADD0"> | |
<block type="text" id="GO{s|1|cjZX5wm!s}6^U"> | |
<field name="TEXT">==== (ID </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="aprilTagDetection_getProperty_Number" id="YbKMT]1!N/1orH}f.`^%"> | |
<field name="PROP">id</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="*DZMa]u.xVDWo54-+9Xp"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="Ej2sUV*ZReT^:zwt~{Ar"> | |
<field name="TEXT">) Unknown</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="*wewMc^H[$Rs0;EK}Ow]"> | |
<value name="TEXT"> | |
<shadow type="text" id="2oq;P##KvH:(,WjrIe3!"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="DS^4mx0$o}XW[*EAx9g+"> | |
<mutation items="5"/> | |
<value name="ADD0"> | |
<block type="text" id="~aS!V+hMdY{-*4G3Ow%3"> | |
<field name="TEXT">Center </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="NWWJ-BvdUXyMBZ|RD`m}"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="WWZ1rIy[E-^rf4i5ES.w"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="Kns6PW?m}A;SO?@NVb#)"> | |
<field name="PROP">center.x</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="Ar)`$(G]w1~mg?c!0{v;"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="ZZ080[{./+Y}t=(P1DCR"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="sPPkrRLvHyLpl?+E}RhL"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="QO=g./qsEJDCSmKz*Wpu"> | |
<field name="TEXT"/> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="IGswFrO!Q%aCF}3x,SPE"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="iQ6P;:;Igrei}.mq2:.{"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="P2eT2TYX6nNBSYz7e^E)"> | |
<field name="PROP">center.y</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="ZmOVtYIkx|@b66VSAfd]"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="MQkYmiA}ms4pA[Ifr2gb"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="*L=(!sY,[nz~xV=Ke@]u"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="RlN,el}fA6Th3SjoD@!G"> | |
<field name="TEXT"> (pixels)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
<next> | |
<block type="telemetry_addLine" id="3N{F`jhy%rx/{Xex;5zu"> | |
<value name="TEXT"> | |
<shadow type="text" id="ds{Hr}!u1tUZ{*]D~==j"> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="[:W.s1Ok!]MP)3.3IU{#"> | |
<value name="TEXT"> | |
<shadow type="text" id="Pzz,~#oj]g6(p8-kE+HJ"> | |
<field name="TEXT">key:</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="(z3|~vT*DZX[fOyQ2%S["> | |
<value name="TEXT"> | |
<shadow type="text" id="M=~-,X%t3PZW:?]x+FCV"> | |
<field name="TEXT">XYZ = X (Right), Y (Forward), Z (Up) dist.</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="M,AbdMv6W{1dFQc)zQt~"> | |
<value name="TEXT"> | |
<shadow type="text" id="`KTr5c!E2VUU.9*_77qL"> | |
<field name="TEXT">PRY = Pitch, Roll & Yaw (XYZ Rotation)</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="uuC6(PL0R.pO7.AFo]db"> | |
<value name="TEXT"> | |
<shadow type="text" id="^GlP*DEB!=^Mvq=zsRKv"> | |
<field name="TEXT">RBE = Range, Bearing & Elevation</field> | |
</shadow> | |
</value> | |
</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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment