Skip to content
Snippets Groups Projects
Commit b28e3936 authored by ft-Demo's avatar ft-Demo
Browse files

commit by robo pro coding

parent 961b6997
No related branches found
No related tags found
No related merge requests found
......@@ -64,31 +64,95 @@
</block>
</value>
<statement name="DO0">
<block type="encodermotor_set_values" id="Z@=?{[tj5~?DLR*G0dFo">
<mutation syncBlocks="1"/>
<field name="instance_name_0">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
<field name="direction_0">Motor.CCW</field>
<field name="instance_name_1">vv6o.D]}g0#Ew7C~xfQ1-[rGZ27?2t_Go?A6:UHM*</field>
<field name="direction_1">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="~Y^k_kH}Ue2*2=C9]xnK">
<field name="MOTOR_NUM">512</field>
</shadow>
</value>
<value name="distance">
<shadow type="math_number" id="M%4hry1UKEs94)Z8Xq@I">
<field name="NUM">161</field>
</shadow>
<block type="controls_if" id="4]LYz/pXH@O+g7hWfWT%">
<mutation elseif="0" else="1"/>
<value name="IF0">
<block type="logic_boolean" id="t[Rk12I7!/9w`kN/s;}i">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="util_wait_until" id="0$XmP}:vOJs@k%cV`voh">
<value name="value">
<block type="encodermotor_position_read" id="I$*nar{B,#r5)=fU:IL1">
<field name="instance_name">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
<statement name="DO0">
<block type="encodermotor_set_values" id="in^{uc76|S9V]gqI?=:V">
<mutation syncBlocks="1"/>
<field name="instance_name_0">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
<field name="direction_0">Motor.CCW</field>
<field name="instance_name_1">vv6o.D]}g0#Ew7C~xfQ1-[rGZ27?2t_Go?A6:UHM*</field>
<field name="direction_1">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="DYO4{1^@pk-IjJdD$RP%">
<field name="MOTOR_NUM">512</field>
</shadow>
</value>
<value name="distance">
<shadow type="math_number" id="Qsn9}PV]`,H9FJ!gLLpc">
<field name="NUM">161</field>
</shadow>
</value>
<next>
<block type="util_wait_until" id="1-.$]njkj4Vn#Q`$x]SS">
<value name="value">
<block type="encodermotor_position_read" id="X.O3hxd~[A;1H.QOc2Tf">
<field name="instance_name">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
</block>
</value>
<next>
<block type="encodermotor_stop" id="}0;mhg%d)cgwX;68yhGx">
<mutation syncBlocks="1"/>
<field name="instance_name_0">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
<field name="instance_name_1">vv6o.D]}g0#Ew7C~xfQ1-[rGZ27?2t_Go?A6:UHM*</field>
<next>
<block type="variables_set" id="n#!MIBtqVQ;m6IWR?Oi@">
<field name="VAR" id="VuwL=OdJ![_3P78nRW#}">started</field>
<value name="VALUE">
<block type="logic_boolean" id="sl8H6#}xCCi4x;hDliB9">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="util_wait_until" id="?-mKm%]IWM[?v},8_]Am">
<value name="value">
<block type="variables_get" id="Lio.U|WchRGOfz*J4#AP">
<field name="VAR" id="VuwL=OdJ![_3P78nRW#}">started</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="encodermotor_set_values" id="Z@=?{[tj5~?DLR*G0dFo">
<mutation syncBlocks="1"/>
<field name="instance_name_0">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
<field name="direction_0">Motor.CCW</field>
<field name="instance_name_1">vv6o.D]}g0#Ew7C~xfQ1-[rGZ27?2t_Go?A6:UHM*</field>
<field name="direction_1">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="~Y^k_kH}Ue2*2=C9]xnK">
<field name="MOTOR_NUM">512</field>
</shadow>
</value>
<value name="distance">
<shadow type="math_number" id="M%4hry1UKEs94)Z8Xq@I">
<field name="NUM">161</field>
</shadow>
</value>
<next>
<block type="util_wait_until" id="0$XmP}:vOJs@k%cV`voh">
<value name="value">
<block type="encodermotor_position_read" id="I$*nar{B,#r5)=fU:IL1">
<field name="instance_name">vv6o.D]}g0#Ew7C~xfQ1-7dv9-J9W4.H3uoY}xp[W</field>
</block>
</value>
</block>
</next>
</block>
</next>
</statement>
</block>
</statement>
<value name="IF1">
......@@ -167,7 +231,7 @@
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="([,q3;KDt25p^%ZYwL4r" x="0" y="780">
<block type="procedures_defnoreturn" id="([,q3;KDt25p^%ZYwL4r" x="0" y="1069">
<field name="NAME">thread_display_update</field>
<statement name="STACK">
<block type="display_set_button_enabled" id="R+*qC2@{F,.u[/yT_|/o">
......@@ -284,7 +348,7 @@
</block>
</statement>
</block>
<block type="display_on_button_clicked" id="h9NEZ1yTj+pDceca-h/n" x="0" y="1166">
<block type="display_on_button_clicked" id="h9NEZ1yTj+pDceca-h/n" x="0" y="1455">
<field name="instance_name">txt_button_start</field>
<statement name="statement">
<block type="variables_set" id="Z8*_J+Em!H4iE==YSjZ#">
......
......@@ -42,13 +42,28 @@ while True:
if False:
print_line_info()
if is_white():
TXT_M_M1_encodermotor.set_speed(int(512), Motor.CCW)
TXT_M_M2_encodermotor.set_speed(int(512), Motor.CW)
TXT_M_M1_encodermotor.set_distance(int(161), TXT_M_M2_encodermotor)
while True:
if (not TXT_M_M1_encodermotor.is_running()):
break
time.sleep(0.010)
if True:
TXT_M_M1_encodermotor.set_speed(int(512), Motor.CCW)
TXT_M_M2_encodermotor.set_speed(int(512), Motor.CW)
TXT_M_M1_encodermotor.set_distance(int(161), TXT_M_M2_encodermotor)
while True:
if (not TXT_M_M1_encodermotor.is_running()):
break
time.sleep(0.010)
TXT_M_M1_encodermotor.stop_sync(TXT_M_M2_encodermotor)
started = False
while True:
if started:
break
time.sleep(0.010)
else:
TXT_M_M1_encodermotor.set_speed(int(512), Motor.CCW)
TXT_M_M2_encodermotor.set_speed(int(512), Motor.CW)
TXT_M_M1_encodermotor.set_distance(int(161), TXT_M_M2_encodermotor)
while True:
if (not TXT_M_M1_encodermotor.is_running()):
break
time.sleep(0.010)
elif is_endline():
TXT_M_M1_encodermotor.set_speed(int(512), Motor.CCW)
TXT_M_M2_encodermotor.set_speed(int(512), Motor.CW)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment