Replaced GotoCoordinate with Distance PID instead Motion Magic

This commit is contained in:
Aarav Shah
2020-02-29 11:08:38 -07:00
parent f62b51a108
commit f7d8d41445
4 changed files with 9 additions and 6 deletions
@@ -43,8 +43,9 @@ public class GotoCoordinates extends SequentialCommandGroup {
m_endAngle = endAngle;
addCommands( new TurnDegrees(m_drive, m_currentAngle),
new DriveStraightToPositionMM(m_drive, m_hypotDist),
addCommands( new TurnDegrees(m_drive, m_currentAngle),
new Wait(m_drive, 1),
new DriveStraightToPositionPID(m_drive, m_hypotDist),
new TurnDegrees(m_drive, m_endAngle - m_currentAngle));
}
@@ -21,7 +21,7 @@ public class Wait extends CommandBase {
/**
* Creates a new WaitCommand.
*/
public Wait(float seconds, SubsystemBase subsystem) {
public Wait(SubsystemBase subsystem, float seconds) {
// Use addRequirements() here to declare subsystem dependencies.
m_waitTime = (long) (seconds * 1000);