Skip to content

# Class evam::LinearActuator

template <class Driver, int kMinValue, int kMaxValue>

ClassList > evam > LinearActuator

Linear actuator controller (position control). More...

- `#include <evamLinearActuator.h>`

Inherits the following classes: Driver

## Public Functions

Type | Name
--- | ---
int | GetMaxValue () const Get maximum output value (position at 1000 input).
int | GetMinValue () const Get minimum output value (position at 0 input).
void | Go (signed short aLevel) Apply the position control value.
| LinearActuator ()
| LinearActuator (LinearActuatorConfig config, Args... args)
void | SetMaxValue (int aValue) Set maximum output value (position at 1000 input).
void | SetMinValue (int aValue) Set minimum output value (position at 0 input).
void | SetupRange (int minValue, int maxValue) Configure the position range parameters at once.

## Detailed Description

Maps input range 0..1000 linearly to output values. 0 = minimum position, 1000 = maximum position.

Template parameters:

- `Driver` Driver class (must implement actUnipolar(unsigned short))
- `kMinValue` Output value at 0 input (minimum position)
- `kMaxValue` Output value at 1000 input (maximum position)

## Public Functions Documentation

### function GetMaxValue

Get maximum output value (position at 1000 input).

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

Returns:

Current maximum output value.

### function GetMinValue

Get minimum output value (position at 0 input).

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

Returns:

Current minimum output value.

### function Go

Apply the position control value.

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

Parameters:

- `aLevel` Input position, range 0..1000.

### function LinearActuator [1/2]

    inline evam::LinearActuator::LinearActuator ()

### function LinearActuator [2/2]

    template<typename... Args>
    inline evam::LinearActuator::LinearActuator (
        LinearActuatorConfig config,
        Args... args
    )

### function SetMaxValue

Set maximum output value (position at 1000 input).

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

Parameters:

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

### function SetMinValue

Set minimum output value (position at 0 input).

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

Parameters:

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

### function SetupRange

Configure the position range parameters at once.

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

Parameters:

- `aMinValue` Output value at 0 input (minimum position), range -1000..1000
- `aMaxValue` Output value at 1000 input (maximum position), range -1000..1000

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