fix stuff
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / driving / DriveDistance.java
index 582cd80b69abb799a89a7b3afdcd56432d22a738..d297e66a1dcb1ecb55445b8291ce089d7d4f24ea 100755 (executable)
@@ -47,12 +47,13 @@ public class DriveDistance extends Command {
     this.driveTrain.resetEncoders();
     this.driveController.setSetPoint(this.target);
     this.zeroAngle = driveTrain.getAngle();
+    System.out.println("drive " + target);
   }
 
   @Override
   protected void execute() {
     double xVal = gyroP * (driveTrain.getAngle() - zeroAngle);
-    double yVal = driveController.calcPID(driveTrain.getAvgEncoderDistance());
+    double yVal = driveController.calcPID(driveTrain.getLeftEncoderDistance());
 
     double leftDrive = yVal - xVal;
     double rightDrive = yVal + xVal;