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:
Matthias Grob 2024-11-26 14:03:31 +01:00
parent f9bcbc31ae
commit a280d67be8

View File

@ -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);
}