mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
PID: Fix test to respect integral updates being applied in the next iteration
Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
This commit is contained in:
parent
f9bcbc31ae
commit
a280d67be8
@ -125,5 +125,6 @@ TEST(PIDTest, InteralOpenLoop)
|
||||
EXPECT_FLOAT_EQ(pid.update(0.f, 0.1f, true), -.05f);
|
||||
EXPECT_FLOAT_EQ(pid.update(0.f, 0.1f, true), -.05f);
|
||||
pid.resetIntegral();
|
||||
EXPECT_FLOAT_EQ(pid.update(0.f, 0.1f, true), 0.f);
|
||||
EXPECT_FLOAT_EQ(pid.update(0.f, 0.1f, true), -.01f);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user