Skip to content

Class evam::SlidingWindowDecor

template <class TMotor, unsigned short N>

ClassList > evam > SlidingWindowDecor

Decorator that applies a simple moving average (sliding window) filter. More...

  • #include <evamSlidingWindowDecor.h>

Inherits the following classes: TMotor

Public Functions

Type Name
void Go (signed short value)
Apply the control value with moving average filtering.
SlidingWindowDecor ()
SlidingWindowDecor (SlidingWindowConfig config, Args... args)

Detailed Description

Template parameters:

  • Motor Base motor class (must implement Go(signed short))
  • N Window size (number of values to average). Must be >= 1.

Note:

The filter only produces filtered output after the buffer is full. Before that, values pass through unchanged. For N=1, the filter passes values through without any averaging (no effect).

Public Functions Documentation

function Go

Apply the control value with moving average filtering.

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

Parameters:

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

function SlidingWindowDecor [1/2]

inline evam::SlidingWindowDecor::SlidingWindowDecor () 

function SlidingWindowDecor [2/2]

template<typename... Args>
inline evam::SlidingWindowDecor::SlidingWindowDecor (
    SlidingWindowConfig config,
    Args... args
) 


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