From 277d9d55ccaa3c6b6a3cb376b25a74ec5bf27bb8 Mon Sep 17 00:00:00 2001 From: sihan Date: Sat, 9 Mar 2024 15:07:46 -0600 Subject: [PATCH] Goog --- .../org/firstinspires/ftc/teamcode/opmodes/AutoRed.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/AutoRed.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/AutoRed.java index da0e91b..9d1e442 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/AutoRed.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/AutoRed.java @@ -67,6 +67,9 @@ public class AutoRed extends LinearOpMode { builder.addTemporalMarker(.2, robot.getSlides()::slideFirstLayer); builder.addTemporalMarker(.2, robot.getWrist()::wristScore); this.robot.getDrive().followTrajectorySequence(builder.build()); + while (this.robot.getDrive().isBusy()) { + robot.update(); + } } protected void park() { @@ -85,6 +88,9 @@ public class AutoRed extends LinearOpMode { builder.addTemporalMarker(.1, robot.getWrist()::wristPickup); builder.addTemporalMarker(.1, robot.getSlides()::slideDown); this.robot.getDrive().followTrajectorySequence(builder.build()); + while (this.robot.getDrive().isBusy()) { + robot.update(); + } } protected void parkLocation(){ @@ -112,7 +118,6 @@ public class AutoRed extends LinearOpMode { this.telemetry.addData("Park Position", parkLocation); this.telemetry.update(); } - while (!isStopRequested()) { robot.update(); scorePreloadOne(); boardScore(); @@ -120,8 +125,6 @@ public class AutoRed extends LinearOpMode { this.robot.getClaw().open(); sleep(250); park(); - stop(); - } } }