mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
unit test fix
This commit is contained in:
parent
17a995e03e
commit
e63cb48adf
1 changed files with 1 additions and 3 deletions
|
@ -589,15 +589,13 @@ TEST(pidControllerTest, testAbsoluteControl) {
|
||||||
pidStabilisationState(PID_STABILISATION_ON);
|
pidStabilisationState(PID_STABILISATION_ON);
|
||||||
|
|
||||||
float gyroRate = 0;
|
float gyroRate = 0;
|
||||||
bool itermRelaxIsEnabled = false;
|
|
||||||
float setpointLpf = 6;
|
float setpointLpf = 6;
|
||||||
float setpointHpf = 30;
|
float setpointHpf = 30;
|
||||||
|
|
||||||
float itermErrorRate = 10;
|
float itermErrorRate = 10;
|
||||||
float currentPidSetpoint = 10;
|
float currentPidSetpoint = 10;
|
||||||
|
|
||||||
applyAbsoluteControl(FD_PITCH, gyroRate, itermRelaxIsEnabled, setpointLpf, setpointHpf,
|
applyAbsoluteControl(FD_PITCH, gyroRate, ¤tPidSetpoint, &itermErrorRate);
|
||||||
¤tPidSetpoint, &itermErrorRate);
|
|
||||||
|
|
||||||
ASSERT_NEAR(10.8, itermErrorRate, calculateTolerance(10.8));
|
ASSERT_NEAR(10.8, itermErrorRate, calculateTolerance(10.8));
|
||||||
ASSERT_NEAR(10.8, currentPidSetpoint, calculateTolerance(10.8));
|
ASSERT_NEAR(10.8, currentPidSetpoint, calculateTolerance(10.8));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue