gyroP should get gyroController's p
authorEvanYap <evanyap.14@gmail.com>
Sat, 4 Feb 2017 23:31:14 +0000 (15:31 -0800)
committerEric Sandoval <harpnart@gmail.com>
Sun, 19 Feb 2017 18:38:42 +0000 (10:38 -0800)
src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java
src/org/usfirst/frc/team3501/robot/utils/PIDController.java

index 98628f34c9df8260dafcaab43d51dd05aa1d7508..fda39287097718d31923a28362c5892923a0499e 100755 (executable)
@@ -29,6 +29,8 @@ public class DriveDistance extends Command {
     this.maxTimeOut = maxTimeOut;
     this.target = distance;
 
+    this.gyroP = driveTrain.getGyroController().getP();
+
     this.driveController = driveTrain.getDriveController();
     this.driveController.setDoneRange(0.5);
     this.driveController.setMaxOutput(1.0);
index c6ab0fb7b14d632bd987714b890525c025273221..073eee22382db5d391b445f3da768c653abe0d71 100644 (file)
@@ -169,4 +169,16 @@ public class PIDController {
 
     return this.doneCycleCount >= this.minDoneCycleCount;
   }
+
+  public double getP() {
+    return this.pConst;
+  }
+
+  public double getI() {
+    return this.iConst;
+  }
+
+  public double getD() {
+    return this.dConst;
+  }
 }