Skip to content

# Class evam::SlidingWindowDecor

template <class Motor, unsigned short N>

ClassList > evam > SlidingWindowDecor

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

- `#include <evamSlidingWindowDecor.h>`

Inherits the following classes: Motor

## Public Functions

Type | Name
--- | ---
void | Go (signed short value) Apply the control value with moving average filtering.

## 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

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