|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <ewma.hpp>
Public Member Functions | |
| Ewma (uint8_t shift=3) | |
| Construct EWMA filter. | |
| uint16_t | update (uint16_t raw) |
| Feed a new sample and return the smoothed value. | |
| uint16_t | value () const |
| Return current smoothed value without updating. | |
| void | reset () |
| Reset filter state (next update will re-seed) | |
|
inlineexplicit |
|
inline |
Reset filter state (next update will re-seed)
Definition at line 68 of file ewma.hpp.
Referenced by sbl::components::cv::CvInput::reset().
|
inline |
Feed a new sample and return the smoothed value.
First call seeds the filter (no smoothing on first sample). Internal state uses Q16 fixed-point for sub-LSB precision.
| raw | Raw input value (16-bit) |
Definition at line 46 of file ewma.hpp.
Referenced by sbl::components::cv::CvInput::update().
|
inline |
Return current smoothed value without updating.
Definition at line 63 of file ewma.hpp.
Referenced by sbl::components::cv::CvInput::scaled(), sbl::components::cv::CvInput::scaled_curved(), and sbl::components::cv::CvInput::value().