working slalom 9s run, working drivestraightatvelocity (needs some work)

This commit is contained in:
Aarav Shah
2021-03-27 12:00:20 -06:00
parent c4132c16be
commit 1b98d93cf9
27 changed files with 45 additions and 46 deletions
@@ -29,7 +29,7 @@ public class DriveStraightAtVelocityPID extends CommandBase {
// Called when the command is initially scheduled.
@Override
public void initialize() {
m_targetGyro = m_drive.m_rightFrontMotor.getSelectedSensorPosition(DriveConstants.PID_TURN);
m_targetGyro = (m_drive.m_rightFrontMotor.getSelectedSensorPosition(DriveConstants.PID_TURN));
}
// Called every time the scheduler runs while the command is scheduled.
@@ -46,7 +46,7 @@ public class GotoCoordinatesRobotRelative extends SequentialCommandGroup {
addCommands( new TurnDegrees(m_drive, m_currentAngle),
new Wait(m_drive, 0, 0),
new DriveStraightToPositionPID(m_drive, m_pneumatics, m_hypotDist),
new TurnDegrees(m_drive, m_endAngle - m_currentAngle));
new TurnDegrees(m_drive, (m_endAngle - m_currentAngle) % 360));
}
public GotoCoordinatesRobotRelative(Drive subsystem, Pneumatics subsystem2, double xTarget, double yTarget) {