15#include "../Math/Mathematics.h"
26template <
size_t memory>
Smooths data values using a weighted running average.
uint8_t currentAmount
The current number of valid entries in the buffer.
RunningAverageFilter()
Default constructor for RunningAverageFilter.
RunningAverageFilter(float gain)
Constructs a RunningAverageFilter with a specified gain.
float values[memory]
Buffer to store the recent values.
float Filter(float value)
Filters the input value using the running average.
float gain
The gain factor for the filter, controlling smoothing intensity.
void SetGain(float gain)
Sets the gain for the filter.