Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
|
Value transformation for basic linear interpolation. More...
#include <LinearTransform.h>
Public Member Functions | |
LinearTransform (inputanalog_t fromLow, inputanalog_t fromHigh, inputanalog_t toLow, inputanalog_t toHigh) | |
Create a new value transformation. More... | |
inputanalog_t | transform (inputanalog_t raw) const |
Perform the value transformation. More... | |
![]() | |
IValueTransform (inputanalog_t fromLow, inputanalog_t fromHigh) | |
Create a new value transformation. More... | |
Additional Inherited Members | |
![]() | |
inputanalog_t | m_fromLow |
Lowest input value. | |
inputanalog_t | m_fromHigh |
Highest input value. | |
Value transformation for basic linear interpolation.
|
inline |
Create a new value transformation.
fromLow | Lowest mapped inout value |
fromHigh | Highest mapped input value |
toLow | Lowest mapped output value |
toHigh | Highest mapped output value |
|
inlinevirtual |
Perform the value transformation.
raw | Value to transform |
Performs basic linear interpolation.
Implements IValueTransform.