Skip to content

Class evam::AdaptiveSmoothDecor

template <class TMotor, unsigned short tMinTimeConstantMs, unsigned short tMaxTimeConstantMs>

ClassList > evam > AdaptiveSmoothDecor

Decorator with adaptive smoothing based on input rate of change. More...

  • #include <evamAdaptiveSmoothDecor.h>

Inherits the following classes: Heartbeat, TMotor

Public Functions

Type Name
AdaptiveSmoothDecor ()
AdaptiveSmoothDecor (AdaptiveSmoothConfig config, Args... args)
unsigned short GetMaxTimeConstantMs () const
unsigned short GetMinTimeConstantMs () const
void Go (signed short aValue)
void SetMaxTimeConstantMs (unsigned short value)
void SetMinTimeConstantMs (unsigned short value)
void SetupRange (unsigned short minTimeConstantMs, unsigned short maxTimeConstantMs)

Protected Functions

Type Name
void onHeartbeat () override

Detailed Description

Automatically adjusts smoothing based on how fast the input is changing. Uses fixed time base from Heartbeat for consistent behavior.

Template parameters:

  • Motor Base motor class (must implement Go(signed short))
  • kMinTimeConstantMs Minimum time constant (fast response). Default: 10ms
  • kMaxTimeConstantMs Maximum time constant (heavy smoothing). Default: 150ms

Public Functions Documentation

function AdaptiveSmoothDecor [1/2]

inline evam::AdaptiveSmoothDecor::AdaptiveSmoothDecor () 

function AdaptiveSmoothDecor [2/2]

template<typename... Args>
inline evam::AdaptiveSmoothDecor::AdaptiveSmoothDecor (
    AdaptiveSmoothConfig config,
    Args... args
) 

function GetMaxTimeConstantMs

inline unsigned short evam::AdaptiveSmoothDecor::GetMaxTimeConstantMs () const

function GetMinTimeConstantMs

inline unsigned short evam::AdaptiveSmoothDecor::GetMinTimeConstantMs () const

function Go

inline void evam::AdaptiveSmoothDecor::Go (
    signed short aValue
) 

function SetMaxTimeConstantMs

inline void evam::AdaptiveSmoothDecor::SetMaxTimeConstantMs (
    unsigned short value
) 

function SetMinTimeConstantMs

inline void evam::AdaptiveSmoothDecor::SetMinTimeConstantMs (
    unsigned short value
) 

function SetupRange

inline void evam::AdaptiveSmoothDecor::SetupRange (
    unsigned short minTimeConstantMs,
    unsigned short maxTimeConstantMs
) 

Protected Functions Documentation

function onHeartbeat

inline void evam::AdaptiveSmoothDecor::onHeartbeat () override


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