Skip to content

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)
unsigned short GetAlpha () const
void Go (signed short value)
Set the target control value.
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:

  • TMotor Base motor class (must implement Go(signed short))
  • tAlpha Default 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 GetAlpha

inline unsigned short evam::ExponentialSmoothDecor::GetAlpha () const

function Go

Set the target control value.

inline void evam::ExponentialSmoothDecor::Go (
    signed short value
) 

Parameters:

  • value Target control value, range -1000..1000

function SetAlpha

inline void evam::ExponentialSmoothDecor::SetAlpha (
    unsigned short alpha
) 


The documentation for this class was generated from the following file src/evamExponentialSmoothDecor.h