diff --git a/src/main/java/org/carlmontrobotics/robotcode2023/commands/TeleopDrive.java b/src/main/java/org/carlmontrobotics/robotcode2023/commands/TeleopDrive.java index 2ee736a6..7069d6d3 100644 --- a/src/main/java/org/carlmontrobotics/robotcode2023/commands/TeleopDrive.java +++ b/src/main/java/org/carlmontrobotics/robotcode2023/commands/TeleopDrive.java @@ -28,7 +28,7 @@ public class TeleopDrive extends CommandBase { private DoubleSupplier str; private DoubleSupplier rcw; private BooleanSupplier slow; - + private BooleanSupplier baby; private double currentForwardVel = 0; private double currentStrafeVel = 0; @@ -41,7 +41,7 @@ public TeleopDrive(Drivetrain drivetrain, DoubleSupplier fwd, DoubleSupplier str this.str = str; this.rcw = rcw; this.slow = slow; - + this.baby = baby; } // Called when the command is initially scheduled. @@ -69,8 +69,8 @@ public double[] getRequestedSpeeds() { if (Math.abs(rotateClockwise) <= Constants.OI.JOY_THRESH) rotateClockwise = 0.0; else rotateClockwise *= maxRCW; - double driveMultiplier = slow.getAsBoolean() ? kBabyDriveSpeed : (slow.getAsBoolean() ? kSlowDriveSpeed : kNormalDriveSpeed); - double rotationMultiplier = slow.getAsBoolean() ? kBabyTurnSpeed : (slow.getAsBoolean() ? kSlowDriveRotation : kNormalDriveRotation); + double driveMultiplier = baby.getAsBoolean() ? kBabyDriveSpeed : (slow.getAsBoolean() ? kSlowDriveSpeed : kNormalDriveSpeed); + double rotationMultiplier = baby.getAsBoolean() ? kBabyTurnSpeed : (slow.getAsBoolean() ? kSlowDriveRotation : kNormalDriveRotation); forward *= driveMultiplier; strafe *= driveMultiplier;