Class evam::ExponentialSmoothDecor¶
template <class TMotor, unsigned short tAlpha>
ClassList > evam > ExponentialSmoothDecor
Decorator applying Exponential Moving Average (EMA) filtering. More...
#include <evamExponentialSmoothDecor.h>
Inherits the following classes: TMotor
Public Functions¶
| Type | Name |
|---|---|
| ExponentialSmoothDecor () |
|
| ExponentialSmoothDecor (ExponentialSmoothConfig config, Args... args) |
|
| void | Go (signed short value) Set the target control value. |
| unsigned short | getAlpha () const |
| void | setAlpha (unsigned short alpha) |
Detailed Description¶
This decorator does not own a heartbeat; it only transforms the value. Wrap it with SampledDecor to get periodic output:
Template parameters:
TMotorBase motor class (must implement Go(signed short))tAlphaDefault smoothing factor (1..1000). Default: 200
Public Functions Documentation¶
function ExponentialSmoothDecor [1/2]¶
inline evam::ExponentialSmoothDecor::ExponentialSmoothDecor ()
function ExponentialSmoothDecor [2/2]¶
template<typename... Args>
inline evam::ExponentialSmoothDecor::ExponentialSmoothDecor (
ExponentialSmoothConfig config,
Args... args
)
function Go¶
Set the target control value.
inline void evam::ExponentialSmoothDecor::Go (
signed short value
)
Parameters:
valueTarget control value, range -1000..1000
function getAlpha¶
inline unsigned short evam::ExponentialSmoothDecor::getAlpha () const
function setAlpha¶
inline void evam::ExponentialSmoothDecor::setAlpha (
unsigned short alpha
)
The documentation for this class was generated from the following file src/evamExponentialSmoothDecor.h