Hysteresis Filter¶
-
template<typename T, T LowThreshold, T HighThreshold>
struct Hysteresis¶ Filter with hysteresis (dead zone) to prevent oscillation.
This filter implements a hysteresis window with upper and lower thresholds, propagating only when crossing these thresholds and ignoring changes within the dead zone to prevent rapid toggling.
- Since
v0.1.0
// Example: Hysteresis for button debouncing (10-90 range) Signal<int, 10, Hysteresis<int, 10, 90>> button(0);Note
Propagates when crossing thresholds, suppresses changes within dead zone.
Warning
Only accepts arithmetic types (integral and floating-point).
LowThresholdmust be less thanHighThreshold.
See Also¶
Numerical Filters - Overview