added default commands back in

This commit is contained in:
aarav18
2022-03-18 19:28:46 -06:00
parent f890dda9f7
commit b755f19de0
+17 -17
View File
@@ -214,26 +214,25 @@ public class RobotContainer {
// new RunCommand(() -> m_robotTurret.runTurretWithInput(getOperatorController().getLeftX()), // new RunCommand(() -> m_robotTurret.runTurretWithInput(getOperatorController().getLeftX()),
// m_robotTurret).withName("Turret runTurretWithInput defaultCommand")); // m_robotTurret).withName("Turret runTurretWithInput defaultCommand"));
// m_robotTurret.setDefaultCommand( m_robotTurret.setDefaultCommand(
// new RunCommand(() -> { new RunCommand(() -> {
// if (this.currentControlMode.equals(ControlMode.SHOOTER)) { if (this.currentControlMode.equals(ControlMode.SHOOTER)) {
// if (this.currentTurretMode.equals(TurretMode.MANUAL)) { m_robotTurret.runTurretWithInput(getOperatorController().getLeftX()); } if (this.currentTurretMode.equals(TurretMode.MANUAL)) { m_robotTurret.runTurretWithInput(getOperatorController().getLeftX()); }
// } }
// if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotTurret.runTurretWithInput(0); } if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotTurret.runTurretWithInput(0); }
// }, m_robotTurret)); }, m_robotTurret));
// m_robotHood.setDefaultCommand( m_robotHood.setDefaultCommand(
// new RunCommand(() -> { new RunCommand(() -> {
// if (this.currentControlMode.equals(ControlMode.SHOOTER)) { m_robotHood.runHood(getOperatorController().getRightY()); } if (this.currentControlMode.equals(ControlMode.SHOOTER)) { m_robotHood.runHood(getOperatorController().getRightY()); }
// if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotHood.runHood(0); } if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotHood.runHood(0); }
// }, m_robotHood)); }, m_robotHood));
m_robotClimber.setDefaultCommand( m_robotClimber.setDefaultCommand(
// new RunCommand(() -> { new RunCommand(() -> {
// if (this.currentMode.equals(Mode.SHOOTER)) { m_robotClimber.setMotors(0, 0); } if (this.currentControlMode.equals(ControlMode.SHOOTER)) { m_robotClimber.setMotors(0, 0); }
/*if (this.currentMode.equals(Mode.CLIMBER)) { */new RunCommand(() -> m_robotClimber.controlJointsWithInput(getOperatorController().getLeftX(), if (this.currentControlMode.equals(ControlMode.CLIMBER)) { m_robotClimber.controlJointsWithInput(getOperatorController().getLeftX(), getOperatorController().getRightY()); }
getOperatorController().getRightY()), m_robotClimber).withName("Climber controlWithInput defaultCommand")); //} }, m_robotClimber));
// }, m_robotClimber));
// m_robotTurret.setDefaultCommand( // m_robotTurret.setDefaultCommand(
// new AimToCenter(m_robotTurret, m_robotSwerveDrive, m_robotVisionOdometry)); // new AimToCenter(m_robotTurret, m_robotSwerveDrive, m_robotVisionOdometry));
@@ -355,6 +354,7 @@ public class RobotContainer {
.whenReleased(new InstantCommand(() -> this.currentControlMode = ControlMode.SHOOTER)); .whenReleased(new InstantCommand(() -> this.currentControlMode = ControlMode.SHOOTER));
// .whenReleased(EnableClimber())); // .whenReleased(EnableClimber()));
// toggle manual mode and autonomous mode based on the current control mode
new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value) new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value)
.whenPressed(new InstantCommand(() -> { .whenPressed(new InstantCommand(() -> {