Unverified Commit 91a3ec94 authored by Cédric Bonhomme's avatar Cédric Bonhomme
Browse files

wait before the motors are finished.

parent 1c54e07a
......@@ -47,6 +47,9 @@ def check_stop_condition(motorA, motorB):
motorB.run_position_limited(position_sp=180, speed_sp=800,
stop_mode=Motor.STOP_MODE.BRAKE, ramp_up_sp=1000,
while "running" in motorA.state.split(" ") and \
"running" in motorB.state.split(" "):
return "hit_wall"
if color_sensor.colors[color_sensor.color] == "red":
stop(motorA, motorB)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment