Change turning to using arcade drive turning to be smoother
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / TurnForTime.java
index a613da8efc7c02aee927068c16ade3001f523517..f0f2ecf6fca6c79e39d7879010832abcbd1506a3 100755 (executable)
@@ -1,6 +1,6 @@
 package org.usfirst.frc.team3501.robot.commands.driving;
 
-import org.usfirst.frc.team3501.robot.Constants.DeadReckoning;
+import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.Constants.Direction;
 import org.usfirst.frc.team3501.robot.Robot;
 
@@ -36,7 +36,7 @@ public class TurnForTime extends Command {
   }
 
   public TurnForTime(double seconds, Direction direction) {
-    this(seconds, direction, DeadReckoning.DEFAULT_SPEED);
+    this(seconds, direction, Constants.Auton.DEFAULT_SPEED);
   }
 
   @Override
@@ -45,9 +45,11 @@ public class TurnForTime extends Command {
     timer.start();
 
     if (direction == Direction.RIGHT) {
-      Robot.driveTrain.drive(speed, -speed);
+      // Robot.driveTrain.drive(speed, -speed);
+      Robot.driveTrain.arcadeDrive(0, speed);
     } else if (direction == Direction.LEFT) {
-      Robot.driveTrain.drive(-speed, speed);
+      // Robot.driveTrain.drive(-speed, speed);
+      Robot.driveTrain.arcadeDrive(0, speed);
     }
   }
 
@@ -68,5 +70,6 @@ public class TurnForTime extends Command {
 
   @Override
   protected void interrupted() {
+    end();
   }
 }