turret reset before auto climb

This commit is contained in:
aarav18
2022-03-18 22:31:59 -06:00
parent aa32c1e81c
commit d47cf27633
@@ -359,6 +359,10 @@ public class RobotContainer {
// toggle manual mode and autonomous mode based on the current control mode
new JoystickButton(getButtonBox(), ButtonBox.Button.kRightSwitch.value)
.whenPressed(new InstantCommand(() -> {
if (this.currentControlMode.equals(SubsystemMode.CLIMBER)) { m_robotTurret.gotoZero(); }
}, m_robotTurret))
.whenPressed(new InstantCommand(() -> {
if (this.currentControlMode.equals(SubsystemMode.SHOOTER)) { this.currentTurretMode = ControlMode.MANUAL; }
if (this.currentControlMode.equals(SubsystemMode.CLIMBER)) { this.currentClimberMode = ControlMode.AUTONOMOUS; }