Velocity Control PID

Does not work in testing
This commit is contained in:
aarav18
2020-01-24 20:27:42 -07:00
parent 0da2e35400
commit dec773cdcd
3 changed files with 48 additions and 36 deletions
@@ -52,7 +52,7 @@ public class RobotContainer {
/* Default Commands */
// drives the robot with a two-axis input from the driver controller
m_robotDrive.setDefaultCommand(new DriveWithJoystick(m_robotDrive, getDriverController()));
//m_robotDrive.setDefaultCommand(new DriveWithJoystick(m_robotDrive, getDriverController()));
// drives motor with input from triggers on the opperator controller
m_robotIntake.setDefaultCommand(new RunIntakeWithTriggers(m_robotIntake, getOperatorController()));
// continually sends updates to the Blinkin LED controller to keep the lights on
@@ -79,7 +79,7 @@ public class RobotContainer {
/* PID Test Command */
new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON)
.whileHeld(new RunCommand(() -> m_robotDrive.runVelocityPID(2000), m_robotDrive));
.whileHeld(new DriveAtVelocityPID(m_robotDrive, 50));
new JoystickButton(getDriverJoystick(), XboxController.X_BUTTON)
.whenPressed(new InstantCommand(() -> m_robotDrive.resetGyroYaw(), m_robotDrive));