Merge branch 'cleanup' of https://github.com/Team4388/2022NoWayHome into cleanup

This commit is contained in:
Ryan
2022-03-25 11:31:10 -06:00
@@ -227,21 +227,11 @@ public class RobotContainer {
/* Default Commands */ /* Default Commands */
// Swerve Drive with Input // Swerve Drive with Input
m_robotSwerveDrive.setDefaultCommand( m_robotSwerveDrive.setDefaultCommand(
new RunCommand(() -> { new RunCommand(() -> m_robotSwerveDrive.driveWithInput( getDriverController().getLeftX(),
if (currentDriveMode.equals(DriveMode.ON)) { getDriverController().getLeftY(),
m_robotSwerveDrive.driveWithInput( getDriverController().getLeftX(), getDriverController().getRightX(),
getDriverController().getLeftY(), getDriverController().getRightY(),
getDriverController().getRightX(), true), m_robotSwerveDrive).withName("Swerve driveWithInput defaultCommand"));
getDriverController().getRightY(),
true); }
if (currentDriveMode.equals(DriveMode.OFF)) {
m_robotSwerveDrive.driveWithInput( 0,
0,
0,
0,
false);
}}
, m_robotSwerveDrive).withName("Swerve driveWithInput defaultCommand"));
// Intake with Triggers // Intake with Triggers
m_robotIntake.setDefaultCommand( m_robotIntake.setDefaultCommand(
@@ -398,9 +388,9 @@ public class RobotContainer {
.whenPressed(new InstantCommand(() -> currentControlMode = ControlMode.CLIMBER)) .whenPressed(new InstantCommand(() -> currentControlMode = ControlMode.CLIMBER))
.whenReleased(new InstantCommand(() -> currentControlMode = ControlMode.SHOOTER)); .whenReleased(new InstantCommand(() -> currentControlMode = ControlMode.SHOOTER));
new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value) // new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value)
.whileHeld(new InstantCommand(() -> currentDriveMode = DriveMode.OFF)) // .whileHeld(new InstantCommand(() -> currentDriveMode = DriveMode.OFF))
.whenReleased(new InstantCommand(() -> currentDriveMode = DriveMode.ON)); // .whenReleased(new InstantCommand(() -> currentDriveMode = DriveMode.ON));
// Left Button > Extender In // Left Button > Extender In
new JoystickButton(getButtonBox(), ButtonBox.Button.kLeftButton.value) new JoystickButton(getButtonBox(), ButtonBox.Button.kLeftButton.value)