Skip to content

# Class evam::SteeringActuator

template <class Driver, signed short kLeftPos, signed short kCenterPos, signed short kRightPos>

ClassList > evam > SteeringActuator

Steering actuator (centered servo) controller. More...

- `#include <evamSteeringActuator.h>`

Inherits the following classes: Driver

## Public Functions

Type | Name
--- | ---
signed short | GetCenterPos () const Get center position output value.
signed short | GetLeftPos () const Get leftmost position output value.
signed short | GetRightPos () const Get rightmost position output value.
void | Go (signed short aLevel) Apply the steering control value.
void | SetCenterPos (signed short aValue) Set center position output value.
void | SetLeftPos (signed short aValue) Set leftmost position output value.
void | SetRightPos (signed short aValue) Set rightmost position output value.
void | SetupRange (signed short aLeftPos, signed short aCenterPos, signed short aRightPos) Configure all position parameters at once.

## Detailed Description

Maps input range -1000..1000 to output positions: -1000 = left position, 0 = center, 1000 = right position.

Template parameters:

- `Driver` Driver class (must implement actBipolar(signed short))
- `kLeftPos` Output value at -1000 input (leftmost position)
- `kCenterPos` Output value at 0 input (center position)
- `kRightPos` Output value at 1000 input (rightmost position)

## Public Functions Documentation

### function GetCenterPos

Get center position output value.

    inline signed short evam::SteeringActuator::GetCenterPos () const

Returns:

Current center position output value.

### function GetLeftPos

Get leftmost position output value.

    inline signed short evam::SteeringActuator::GetLeftPos () const

Returns:

Current leftmost position output value.

### function GetRightPos

Get rightmost position output value.

    inline signed short evam::SteeringActuator::GetRightPos () const

Returns:

Current rightmost position output value.

### function Go

Apply the steering control value.

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

Parameters:

- `aLevel` Input steering value, range -1000..1000.

### function SetCenterPos

Set center position output value.

    inline void evam::SteeringActuator::SetCenterPos (
        signed short aValue
    )

Parameters:

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

### function SetLeftPos

Set leftmost position output value.

    inline void evam::SteeringActuator::SetLeftPos (
        signed short aValue
    )

Parameters:

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

### function SetRightPos

Set rightmost position output value.

    inline void evam::SteeringActuator::SetRightPos (
        signed short aValue
    )

Parameters:

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

### function SetupRange

Configure all position parameters at once.

    inline void evam::SteeringActuator::SetupRange (
        signed short aLeftPos,
        signed short aCenterPos,
        signed short aRightPos
    )

Parameters:

- `aLeftPos` Output value at -1000 input (leftmost position), range -1000..1000
- `aCenterPos` Output value at 0 input (center position), range -1000..1000
- `aRightPos` Output value at 1000 input (rightmost position), range -1000..1000

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