From 05305d9243ebec24b20b45343e80b1a32d1a3338 Mon Sep 17 00:00:00 2001 From: aarav18 Date: Fri, 25 Mar 2022 11:28:28 -0600 Subject: [PATCH] no more drive on/off switch --- .../java/frc4388/robot/RobotContainer.java | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 9b9a793..1fe9220 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -227,21 +227,11 @@ public class RobotContainer { /* Default Commands */ // Swerve Drive with Input m_robotSwerveDrive.setDefaultCommand( - new RunCommand(() -> { - if (currentDriveMode.equals(DriveMode.ON)) { - m_robotSwerveDrive.driveWithInput( getDriverController().getLeftX(), - getDriverController().getLeftY(), - getDriverController().getRightX(), - getDriverController().getRightY(), - true); } - if (currentDriveMode.equals(DriveMode.OFF)) { - m_robotSwerveDrive.driveWithInput( 0, - 0, - 0, - 0, - false); - }} - , m_robotSwerveDrive).withName("Swerve driveWithInput defaultCommand")); + new RunCommand(() -> m_robotSwerveDrive.driveWithInput( getDriverController().getLeftX(), + getDriverController().getLeftY(), + getDriverController().getRightX(), + getDriverController().getRightY(), + true), m_robotSwerveDrive).withName("Swerve driveWithInput defaultCommand")); // Intake with Triggers m_robotIntake.setDefaultCommand( @@ -398,9 +388,9 @@ public class RobotContainer { .whenPressed(new InstantCommand(() -> currentControlMode = ControlMode.CLIMBER)) .whenReleased(new InstantCommand(() -> currentControlMode = ControlMode.SHOOTER)); - new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value) - .whileHeld(new InstantCommand(() -> currentDriveMode = DriveMode.OFF)) - .whenReleased(new InstantCommand(() -> currentDriveMode = DriveMode.ON)); + // new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value) + // .whileHeld(new InstantCommand(() -> currentDriveMode = DriveMode.OFF)) + // .whenReleased(new InstantCommand(() -> currentDriveMode = DriveMode.ON)); // Left Button > Extender In new JoystickButton(getButtonBox(), ButtonBox.Button.kLeftButton.value)