Clean up PIDController interface in preparation for ProfiledPIDController

This commit is contained in:
Tyler Veness
2019-08-14 22:17:44 -07:00
committed by Peter Johnson
parent fdc098267e
commit fc98a79dbb
10 changed files with 226 additions and 319 deletions

View File

@@ -152,11 +152,11 @@ TEST_P(MotorEncoderTest, PositionPIDController) {
Wait(10.0);
pidRunner.Stop();
RecordProperty("PIDError", pidController.GetError());
RecordProperty("PIDError", pidController.GetPositionError());
EXPECT_TRUE(pidController.AtSetpoint())
<< "PID loop did not converge within 10 seconds. Goal was: " << goal
<< " Error was: " << pidController.GetError();
<< " Error was: " << pidController.GetPositionError();
}
/**
@@ -179,11 +179,11 @@ TEST_P(MotorEncoderTest, VelocityPIDController) {
pidRunner.StartPeriodic(pidController.GetPeriod());
Wait(10.0);
pidRunner.Stop();
RecordProperty("PIDError", pidController.GetError());
RecordProperty("PIDError", pidController.GetPositionError());
EXPECT_TRUE(pidController.AtSetpoint())
<< "PID loop did not converge within 10 seconds. Goal was: " << 600
<< " Error was: " << pidController.GetError();
<< " Error was: " << pidController.GetPositionError();
}
/**