Recode everything for new robot
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / TurnForTime.java
index 909bd9d89b36a93c92795172f16b6157753737ab..368d10459f2289f94a406ff3ecc1ece79653592b 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
@@ -46,9 +46,8 @@ public class TurnForTime extends Command {
 
     if (direction == Direction.RIGHT) {
       Robot.driveTrain.drive(speed, -speed);
-      ;
     } else if (direction == Direction.LEFT) {
-      Robot.driveTrain.setMotorSpeeds(-speed, speed);
+      Robot.driveTrain.drive(-speed, speed);
     }
   }
 
@@ -69,5 +68,6 @@ public class TurnForTime extends Command {
 
   @Override
   protected void interrupted() {
+    end();
   }
 }