From 5e975b9a2effd87c2282c97c1278199b4dad8126 Mon Sep 17 00:00:00 2001 From: PenguinEncounter <49845522+penguinencounter@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:37:04 -0800 Subject: [PATCH] use OtherParking --- .../firstinspires/ftc/teamcode/opmodes/TwentyAuto.java | 8 ++++++-- .../ftc/teamcode/opmodes/TwentyAutoBlueRight.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAuto.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAuto.java index 2ce642b24684..d40c6fd43602 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAuto.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAuto.java @@ -254,6 +254,10 @@ public void runOpMode() throws InterruptedException { undoCenter.run(); break; } + // PUT IF STATEMENT TO BRANCH HERE + + if (parkingConf() == Parking.OtherParking) + throw new IllegalStateException("Don't know how to handle OtherParking here"); double modifier = parkingConf() == Parking.MoveLeft ? 1 : -1; turnPID.TurnRobot(modifier * 100.0, telemetry); forwardPID.DriveReverse(19.0, telemetry, 5.0); @@ -291,7 +295,6 @@ public void runOpMode() throws InterruptedException { .then(driveToTag.getTaskFactory()) .then(theXButton.approach(new InchUnit(3.5))); - // ewwwww scheduler.runToCompletion(this::opModeIsActive); // robot.liftLeft().setTargetPosition(1000); @@ -372,6 +375,7 @@ public enum StartPosition { public enum Parking { MoveLeft, MoveRight, - NoParking + NoParking, + OtherParking } } diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAutoBlueRight.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAutoBlueRight.java index 49dff97d81a0..19331f8ddb7c 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAutoBlueRight.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/TwentyAutoBlueRight.java @@ -18,6 +18,6 @@ protected StartPosition positionConf() { @Override protected Parking parkingConf() { - return Parking.NoParking; + return Parking.OtherParking; } }