RateOfChange Filter¶
-
template<typename T, T MaxRatePerSecond>
struct RateOfChange¶ Filter that limits the rate of change per second.
This stateful filter tracks the rate of change over time and propagates only when the rate of change is within the specified limit, preventing rapid fluctuations.
- Since
v0.1.0
// Example: Limit temperature change to 5 degrees per second Signal<float, 10, RateOfChange<float, 5>> temp(20.0);Note
Stateful filter. Uses
millis()for timing.Warning
Only accepts arithmetic types (integral and floating-point).
MaxRatePerSecondmust be positive.
See Also¶
Numerical Filters - Overview