Skip to content

Class evam::ForwardMotor

template <class Driver, int kMinValue, int kMaxValue>

ClassList > evam > ForwardMotor

Unidirectional forward-only motor controller (e.g., aircraft ESC, throttle). More...

  • #include <evamForwardMotor.h>

Inherits the following classes: Driver

Public Functions

Type Name
ForwardMotor ()
ForwardMotor (ForwardConfig config, Args... args)
int GetMaxValue () const
Get maximum output value.
int GetMinValue () const
Get minimum output value.
void Go (signed short aLevel)
Apply the control value.
void SetMaxValue (int aValue)
Set maximum output value.
void SetMinValue (int aValue)
Set minimum output value.
void SetupRange (int minValue, int maxValue)
Configure the output range parameters at once.

Detailed Description

Maps input range 0..1000 to driver output. Negative inputs are treated as stop (0).

Template parameters:

  • Driver Driver class (must implement actUnipolar(unsigned short))
  • kMinValue Minimum output value (e.g., 20 = stop)
  • kMaxValue Maximum output value (e.g., 1000 = full throttle)

Public Functions Documentation

function ForwardMotor [1/2]

inline evam::ForwardMotor::ForwardMotor () 

function ForwardMotor [2/2]

template<typename... Args>
inline evam::ForwardMotor::ForwardMotor (
    ForwardConfig config,
    Args... args
) 

function GetMaxValue

Get maximum output value.

inline int evam::ForwardMotor::GetMaxValue () const

Returns:

Current maximum output value.


function GetMinValue

Get minimum output value.

inline int evam::ForwardMotor::GetMinValue () const

Returns:

Current minimum output value.


function Go

Apply the control value.

inline void evam::ForwardMotor::Go (
    signed short aLevel
) 

Parameters:

  • aLevel Input control value, range 0..1000 (negative treated as 0).

function SetMaxValue

Set maximum output value.

inline void evam::ForwardMotor::SetMaxValue (
    int aValue
) 

Parameters:

  • aValue Output value, clamped to -1000..1000.

function SetMinValue

Set minimum output value.

inline void evam::ForwardMotor::SetMinValue (
    int aValue
) 

Parameters:

  • aValue Output value, clamped to -1000..1000.

function SetupRange

Configure the output range parameters at once.

inline void evam::ForwardMotor::SetupRange (
    int minValue,
    int maxValue
) 

Parameters:

  • aMinValue Minimum output value (stop position)
  • aMaxValue Maximum output value (full throttle)


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