Skip to content

Commit

Permalink
Revert "merged baby and slow booloean suppliers into slow"
Browse files Browse the repository at this point in the history
This reverts commit cf37551.
  • Loading branch information
FriedLongJohns committed Oct 1, 2023
1 parent cf37551 commit f510639
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f510639

Please sign in to comment.