L170

1 file(s) copied, then 2 change(s) in 1 file(s), 8 line(s) of code to write.

Copies

  • lessons/L170DriveToPoseOpMode.java to mytry/L170DriveToPoseOpMode.java

L170DriveToPoseOpMode

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/mytry/L170DriveToPoseOpMode.java

A change

Delete 0 lines, write 6 lines.

--- before this change
+++ after it
@@ -83,6 +83,12 @@
         // When on L170S030, see
         // https://msb-stitt.github.io/ftc31459-26-27-biobuzz/guide/tasks/l170.html#l170s030
         // for what to do here.
+        boolean buttonY = gamepad1.y;
+        boolean buttonYJustPressed = buttonY && !previousButtonY;
+        if (buttonYJustPressed) {
+            Scheduler.schedule(driveToTheTarget);
+        }
+        previousButtonY = buttonY;
 
         loopAfter();
     }

A change

Delete 0 lines, write 2 lines.

--- before this change
+++ after it
@@ -158,6 +158,8 @@
         // When on L170S040, see
         // https://msb-stitt.github.io/ftc31459-26-27-biobuzz/guide/tasks/l170.html#l170s040
         // for what to do here.
+        follower.hold(target);
+        drivetrain.releaseCommandedWheels();
     }
 
     /** Each loop of the drive to the target: the follower drives, not the sticks. */