remove unnecessary code from autonInit and autonPeriodic, fix maxTimeOut bug, and...
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / driving / DriveDistance.java
index ccbe5fd25c7056e86e15d7f00b42e05fa91107e9..f6e11f4c94268c7190d540edb3045e618f2e5488 100755 (executable)
@@ -16,7 +16,7 @@ import edu.wpi.first.wpilibj.command.Command;
  */
 public class DriveDistance extends Command {
   private DriveTrain driveTrain = Robot.getDriveTrain();
-  private double maxTimeOut;
+  private double maxTimeOut = 10;
   private double target;
   private double zeroAngle;
   private Preferences prefs;
@@ -26,11 +26,10 @@ public class DriveDistance extends Command {
 
   public DriveDistance(double distance, double maxTimeOut) {
     requires(driveTrain);
-    this.maxTimeOut = maxTimeOut;
     this.target = distance;
     this.driveController = driveTrain.getDriveController();
     this.driveController.setDoneRange(0.5);
-    this.driveController.setMaxOutput(1.0);
+    this.driveController.setMaxOutput(motorVal);
     this.driveController.setMinDoneCycles(5);
   }