input correct constructor
authorEvanYap <evanyap.14@gmail.com>
Sat, 4 Feb 2017 21:33:06 +0000 (13:33 -0800)
committerEric Sandoval <harpnart@gmail.com>
Sun, 19 Feb 2017 18:37:05 +0000 (10:37 -0800)
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 582cd80b69abb799a89a7b3afdcd56432d22a738..ba7921e1f38d11bae650ebd9cf2d52dd54465296 100755 (executable)
@@ -36,8 +36,8 @@ public class DriveDistance extends Command {
     this.driveI = driveTrain.driveI;
     this.driveD = driveTrain.driveD;
     this.gyroP = driveTrain.driveStraightGyroP;
-    this.driveController = new PIDController(driveP, driveI, driveD);
-    this.driveController.setDoneRange(1.0);
+    this.driveController = driveTrain.getDriveController();
+    this.driveController.setDoneRange(0.5);
     this.driveController.setMaxOutput(1.0);
     this.driveController.setMinDoneCycles(5);
   }
index f6df50908c8136e57c2356308149ef01f9ea5e20..2adcc8a2f0065e6e5f2743ad6f11e053b8fa7d06 100644 (file)
@@ -42,7 +42,7 @@ public class DriveTrain extends Subsystem {
 
   private DriveTrain() {
 
-    driveController = new PIDController();
+    driveController = new PIDController(driveP, driveI, driveD);
 
     // MOTOR CONTROLLERS
     frontLeft = new CANTalon(Constants.DriveTrain.FRONT_LEFT);