[wpimath] Report error on negative PID gains (#6055)

Defaults PID gains to zero if any are invalid.
This commit is contained in:
Tyler Veness
2023-12-23 12:15:29 -08:00
committed by GitHub
parent 1dba26c937
commit 22a322c9f3
9 changed files with 92 additions and 48 deletions

View File

@@ -21,8 +21,7 @@ public class Robot extends TimedRobot {
static final double kHoldDistanceMillimeters = 1.0e3;
// proportional speed constant
// negative because applying positive voltage will bring us closer to the target
private static final double kP = -0.001;
private static final double kP = 0.001;
// integral speed constant
private static final double kI = 0.0;
// derivative speed constant