Added double solenoid and method to shift gears

Has not been tested yet, waiting for solenoids to arrive.
This commit is contained in:
keenandbuckley
2020-02-08 13:01:25 -07:00
parent 13801cabc3
commit 8cbd39ebe8
2 changed files with 26 additions and 0 deletions
@@ -83,6 +83,14 @@ public class RobotContainer {
new JoystickButton(getDriverJoystick(), XboxController.X_BUTTON)
.whenPressed(new InstantCommand(() -> m_robotDrive.resetGyroYaw(), m_robotDrive));
// sets solenoids into high gear
new JoystickButton(getDriverJoystick(), XboxController.RIGHT_TRIGGER_AXIS)
.whenPressed(new InstantCommand(() -> m_robotDrive.setShiftState(true), m_robotDrive));
// sets solenoids into low gear
new JoystickButton(getDriverJoystick(), XboxController.LEFT_TRIGGER_AXIS)
.whenPressed(new InstantCommand(() -> m_robotDrive.setShiftState(false), m_robotDrive));
//new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON)
// .whenPressed(new RunCommand(() -> m_robotDrive.runMotionMagicPID(5000, 0), m_robotDrive));
// interrupts any running command