Skip to content

# Class evam::CurveDecor

template <class Motor, signed short kBend>

ClassList > evam > CurveDecor

Decorator that applies an S-curve (nonlinear) transformation to the control signal. More...

- `#include <evamCurveDecor.h>`

Inherits the following classes: Motor

## Public Functions

Type | Name
--- | ---
signed short | GetBend () const Get the current bend intensity value.
void | Go (signed short aValue) Apply the curved transformation and pass to the underlying motor.
void | SetBend (signed short aValue) Set the bend intensity at runtime.

## Detailed Description

Converts linear input into an S-shaped curve, useful for smoother starts and finer control in the mid-range. Positive bend values create a softer start, negative values create a sharper initial response.

Template parameters:

- `Motor` Base motor class (must implement Go(signed short))
- `kBend` Bend intensity. Range: -10..10. 0 = linear.

## Public Functions Documentation

### function GetBend

Get the current bend intensity value.

    inline signed short evam::CurveDecor::GetBend () const

Returns:

Current bend value in range -10..10.

### function Go

Apply the curved transformation and pass to the underlying motor.

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

Parameters:

- `aValue` Input control value, range -1000..1000.

### function SetBend

Set the bend intensity at runtime.

    inline void evam::CurveDecor::SetBend (
        signed short aValue
    )

Parameters:

- `aValue` Bend value, clamped to -10..10.

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