[wpimath] PIDController: Update field and method names for error and errorDerivative (#7088)

This commit is contained in:
Nicholas Armstrong
2024-09-23 13:57:20 -04:00
committed by GitHub
parent 64e5e6db59
commit 6281ec0810
9 changed files with 192 additions and 91 deletions

View File

@@ -36,28 +36,28 @@ class PIDToleranceTest {
assertFalse(
controller.atSetpoint(),
"Error was in tolerance when it should not have been. Error was "
+ controller.getPositionError());
+ controller.getError());
controller.calculate(0.0);
assertFalse(
controller.atSetpoint(),
"Error was in tolerance when it should not have been. Error was "
+ controller.getPositionError());
+ controller.getError());
controller.calculate(kSetpoint + kTolerance / 2);
assertTrue(
controller.atSetpoint(),
"Error was not in tolerance when it should have been. Error was "
+ controller.getPositionError());
+ controller.getError());
controller.calculate(kSetpoint + 10 * kTolerance);
assertFalse(
controller.atSetpoint(),
"Error was in tolerance when it should not have been. Error was "
+ controller.getPositionError());
+ controller.getError());
}
}
}