Fix some errors mevan/live-pidtuning
authorEvanYap <evanyap.14@gmail.com>
Sat, 4 Feb 2017 22:25:38 +0000 (14:25 -0800)
committerEvanYap <evanyap.14@gmail.com>
Sat, 4 Feb 2017 22:25:38 +0000 (14:25 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/utils/PIDController.java

index ce83d2cb9c017c8706776a7a8e98532c62887497..6fd0812dbbb6a38f88ccd255f05d6b35b4a738ed 100644 (file)
@@ -54,7 +54,6 @@ public class Constants {
     public static final String P_VAL = "P";
     public static final String I_VAL = "I";
     public static final String D_VAL = "D";
-    public static final String MOTOR_VAL = "F";
     public static final String SETPOINT = "SETPOINT";
 
     public static final SPI.Port GYRO_PORT = SPI.Port.kOnboardCS0;
index 2e40d7a514f0176ba9dd1bad50c368ff004670dc..5077fc084bc5fbce81d6ed78614b5ad285aceef1 100644 (file)
@@ -179,15 +179,13 @@ public class PIDController implements LiveWindowSendable {
   private final ITableListener m_listener = (table, key, value, isNew) -> {
     if (key.equals(Constants.DriveTrain.P_VAL)
         || key.equals(Constants.DriveTrain.I_VAL)
-        || key.equals(Constants.DriveTrain.D_VAL)
-        || key.equals(Constants.DriveTrain.MOTOR_VAL)) {
+        || key.equals(Constants.DriveTrain.D_VAL)) {
       if (getP() != table.getNumber(Constants.DriveTrain.P_VAL, 0.0)
           || getP() != table.getNumber(Constants.DriveTrain.I_VAL, 0.0)
           || getD() != table.getNumber(Constants.DriveTrain.D_VAL, 0.0)) {
         setConstants(table.getNumber(Constants.DriveTrain.P_VAL, 0.0),
             table.getNumber(Constants.DriveTrain.I_VAL, 0.0),
-            table.getNumber(Constants.DriveTrain.D_VAL, 0.0),
-            table.getNumber(Constants.DriveTrain.MOTOR_VAL, 0.0));
+            table.getNumber(Constants.DriveTrain.D_VAL, 0.0));
       }
     } else if (key.equals(Constants.DriveTrain.SETPOINT)) {
       if (getSetpoint() != (Double) value) {