diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 67092d2..2bc3f90 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -46,6 +46,7 @@ import frc4388.robot.commands.auto.Wait; import frc4388.robot.commands.climber.DisengageRachet; import frc4388.robot.commands.climber.RunClimberWithTriggers; import frc4388.robot.commands.climber.RunLevelerWithJoystick; +import frc4388.robot.commands.drive.DriveStraightAtVelocityPID; import frc4388.robot.commands.drive.DriveStraightToPositionMM; import frc4388.robot.commands.drive.DriveWithJoystick; import frc4388.robot.commands.drive.TurnDegrees; @@ -172,11 +173,11 @@ public class RobotContainer { /* Test Buttons */ // A driver test button new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON) - .whileHeld(new InstantCommand(() -> m_robotDrive.tankDriveVelocity(1, -1), m_robotDrive)); + .whenPressed(new DriveStraightAtVelocityPID(m_robotDrive, 1000)); // B driver test button new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON) - .whenPressed(new TurnDegrees(m_robotDrive, 90)); + .whenPressed(new TurnDegrees(m_robotDrive, m_robotDrive.m_currentAngleYaw + 5)); // Y driver test button new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON) .whenPressed(new Wait(m_robotDrive, 0, 0)); diff --git a/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java b/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java index e0999e6..b9f7d35 100644 --- a/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java +++ b/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java @@ -50,8 +50,8 @@ public class TurnDegrees extends CommandBase { m_drive.runTurningPID(m_targetAngleTicksOut); - //SmartDashboard.putNumber("Turning Error", Math.abs(m_currentYawInTicks - m_targetAngleTicksOut)); - //SmartDashboard.putNumber("Turning Target", m_targetAngleTicksOut); + SmartDashboard.putNumber("Turning Error", Math.abs(m_currentYawInTicks - m_targetAngleTicksOut)); + SmartDashboard.putNumber("Turning Target", m_targetAngleTicksOut); i++; }