mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Fix Debouncer type-changing behavior (#7870)
Closes #7867 Properly resets the baseline upon switching the debounce type, and adds a test for such. Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
@@ -72,4 +72,6 @@ TEST_F(DebouncerTest, DebounceParams) {
|
||||
|
||||
EXPECT_TRUE(debouncer.GetDebounceType() ==
|
||||
frc::Debouncer::DebounceType::kFalling);
|
||||
|
||||
EXPECT_TRUE(debouncer.Calculate(false));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user