Commit 308f1610 authored by Enniwhere's avatar Enniwhere
Browse files

Made the robot return to center after looking right

parent cfe3ef27
Pipeline #3155 skipped
......@@ -61,7 +61,11 @@ public class AvoidFigure9_3_Upg {
if (leftDistance < stopThreshold && rightDistance < stopThreshold && frontDistance < stopThreshold){
// Drive backwards for 2 times ms milliseconds
// Return to center
car.backward(power, 0);
Delay.msDelay(ms);
// Drive backwards for 4 times ms milliseconds
car.backward(power,power);
Delay.msDelay(ms * 4);
car.stop();
......
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