Added PID Stuff for pigeon go straight

This commit is contained in:
aarav18
2020-01-23 16:42:20 -07:00
parent 2d1ba14cfd
commit 7008ceb453
4 changed files with 75 additions and 33 deletions
@@ -79,13 +79,13 @@ public class RobotContainer {
/* PID Test Command */
new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON)
.whenPressed(new DriveToDistancePID(m_robotDrive, 36));
.whileHeld(new RunCommand(() -> m_robotDrive.runVelocityPID(2000), m_robotDrive));
new JoystickButton(getDriverJoystick(), XboxController.X_BUTTON)
.whenPressed(new DriveToDistanceMM(m_robotDrive, 36));
.whenPressed(new InstantCommand(() -> m_robotDrive.resetGyroYaw(), m_robotDrive));
new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON)
.whenPressed(new DriveAtVelocityPID(m_robotDrive, 12));
.whileHeld(new RunCommand(() -> m_robotDrive.runTurningPID(0), m_robotDrive));
new JoystickButton(getDriverJoystick(), XboxController.LEFT_JOYSTICK_BUTTON)
.whenPressed(new InstantCommand(() -> System.err.print("interrupt"), m_robotDrive));