@@ -253,13 +253,20 @@ public static final class Drivetrainc {
253253 // kP, kI, and kD constants for turn motor controllers in the order of
254254 // front-left, front-right, back-left, back-right.
255255 // Determine correct turn PID constants
256- public static final double [] turnkP = { 51.078 , 60.885 , 60.946 , 60.986 }; // {0.00374, 0.00374, 0.00374,
256+ public static final double [] turnkP = { 51.078 , 60.885 , 65.946 , 100.986 }; // {0.00374, 0.00374,
257+ // 0.00374,
257258 // 0.00374};
258259 public static final double [] turnkI = { 0 , 0 , 0 , 0 };
259- public static final double [] turnkD = { 0 /* dont edit */ , 0.5 , 0.42 , 1 }; // todo: use d
260+ public static final double [] turnkD = { 0 /* dont edit */ , 0.5 , 0.42 , 0.5 };
261+ // public static final double[] turnkD = { 0/* dont edit */, 0.9, 0.9, /* 1.5879
262+ // */ 5.0 };
263+ // // todo: use d
264+ // // todo: use d
260265 // public static final double[] turnkS = {0.2, 0.2, 0.2, 0.2};
261266 public static final double [] turnkS = { 0.13027 , 0.17026 , 0.2 , 0.23262 };
262267
268+ // Changed index 3 of D from 1 to 0.92
269+ // last one back right
263270 // V = kS + kV * v + kA * a
264271 // 12 = 0.2 + 0.00463 * v
265272 // v = (12 - 0.2) / 0.00463 = 2548.596 degrees/s
@@ -279,7 +286,8 @@ public static final class Drivetrainc {
279286 ? new boolean [] { false , false , false , false }
280287 : new boolean [] { true , false , true , false });
281288 public static final boolean [] turnInversion =
282- { true , true , true , true };
289+ { false , false , false , false };
290+ // {true, true, true, true };
283291 // kS
284292 public static final double [] kForwardVolts = { 0.26744 , 0.31897 , 0.27967 , 0.2461 };
285293 public static final double [] kBackwardVolts = kForwardVolts ;
0 commit comments