update code
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / driving / DriveDistance.java
index cb8227f16017bdde5ef8c0c04c54ed645faad3a6..ccefba03f9197d799a8aef89a4773592507769a1 100755 (executable)
@@ -17,7 +17,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
  */
 public class DriveDistance extends Command {
   private DriveTrain driveTrain = Robot.getDriveTrain();
-  private double maxTimeOut = 10;
+  private double maxTimeOut;
   private double target;
   private double zeroAngle;
   private Preferences prefs;
@@ -28,12 +28,13 @@ public class DriveDistance extends Command {
   public DriveDistance(double distance, double maxTimeOut) {
     requires(driveTrain);
     this.target = distance;
+    this.maxTimeOut = maxTimeOut;
     driveStraightGyroP = SmartDashboard.getNumber(driveTrain.DRIVE_GYRO_P_Val,
         driveTrain.PID_ERROR);
 
     this.driveController = driveTrain.getDriveController();
     this.driveController.setDoneRange(0.5);
-    this.driveController.setMaxOutput(1.1);
+    this.driveController.setMaxOutput(1.0);
     this.driveController.setMinDoneCycles(5);
   }