Skip to content

Commit

Permalink
PID: Fix test to respect integral updates being applied in the next i…
Browse files Browse the repository at this point in the history
…teration

Co-authored-by: chfriedrich98 <[email protected]>
  • Loading branch information
MaEtUgR and chfriedrich98 committed Nov 26, 2024
1 parent f9bcbc3 commit a280d67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/pid/PIDTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit a280d67

Please sign in to comment.