mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] PIDController: Update field and method names for error and errorDerivative (#7088)
This commit is contained in:
committed by
GitHub
parent
64e5e6db59
commit
6281ec0810
@@ -28,23 +28,23 @@ TEST(PIDToleranceTest, AbsoluteTolerance) {
|
||||
|
||||
EXPECT_FALSE(controller.AtSetpoint())
|
||||
<< "Error was in tolerance when it should not have been. Error was "
|
||||
<< controller.GetPositionError();
|
||||
<< controller.GetError();
|
||||
|
||||
controller.Calculate(0.0);
|
||||
|
||||
EXPECT_FALSE(controller.AtSetpoint())
|
||||
<< "Error was in tolerance when it should not have been. Error was "
|
||||
<< controller.GetPositionError();
|
||||
<< controller.GetError();
|
||||
|
||||
controller.Calculate(kSetpoint + kTolerance / 2);
|
||||
|
||||
EXPECT_TRUE(controller.AtSetpoint())
|
||||
<< "Error was not in tolerance when it should have been. Error was "
|
||||
<< controller.GetPositionError();
|
||||
<< controller.GetError();
|
||||
|
||||
controller.Calculate(kSetpoint + 10 * kTolerance);
|
||||
|
||||
EXPECT_FALSE(controller.AtSetpoint())
|
||||
<< "Error was in tolerance when it should not have been. Error was "
|
||||
<< controller.GetPositionError();
|
||||
<< controller.GetError();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user