Safety added for climber and leveler

This commit is contained in:
mayabartels
2020-02-15 13:29:06 -08:00
parent 0469897501
commit e2efd0f8d3
3 changed files with 35 additions and 2 deletions
@@ -133,6 +133,11 @@ public class RobotContainer {
new JoystickButton(getDriverJoystick(), XboxController.LEFT_JOYSTICK_BUTTON)
.whenPressed(new InstantCommand(() -> System.out.print("Gamer"), m_robotDrive));
// safety for climber and leveler
new JoystickButton(getOperatorJoystick(), XboxController.START_BUTTON)
.whileHeld(new InstantCommand(() -> m_robotClimber.setSafetyPressed(), m_robotClimber))
.whenReleased(new InstantCommand(() -> m_robotClimber.setSafetyNotPressed(), m_robotClimber));
/* Storage Neo PID Test */
new JoystickButton(getOperatorJoystick(), XboxController.A_BUTTON)
.whileHeld(new RunCommand(() -> m_robotStorage.runStoragePositionPID(0.5, 0.2, 0.0, 0.0, 0.0, 0.0, 1, -1)));