combines a LoadAdjust that has discrete steps with another LoadAdjust to get more precision
More...
#include <LoadAdjustCoarseFine.h>
combines a LoadAdjust that has discrete steps with another LoadAdjust to get more precision
◆ LoadAdjustCoarseFine()
LoadAdjustCoarseFine::LoadAdjustCoarseFine |
( |
LoadAdjust & |
_coarse, |
|
|
LoadAdjust & |
_fine, |
|
|
uint8_t |
_numCoarseSteps, |
|
|
float |
_maxResistance, |
|
|
float |
_fineResistance |
|
) |
| |
|
inline |
combines a LoadAdjust that has discrete steps with another LoadAdjust to get more precision
- Parameters
-
_coarse | reference to LoadAdjust object that has discrete steps (the coarse adjust) |
_fine | reference to LoadAdjust object that can be used for a fine adjust |
_numCoarseSteps | number of discrete steps the coarse adjust can make (two relays can make 4 different combos) |
_maxResistance | max resistance / lowest load, the value of the first step |
_fineResistance | max resistance of fine adjust, used to find how many coarse steps the fine adjust can cover, can be any value, but ideally causes a few coarse steps worth of load |
◆ begin()
void LoadAdjustCoarseFine::begin |
( |
| ) |
|
|
inlinevirtual |
◆ setLoad()
void LoadAdjustCoarseFine::setLoad |
( |
float |
load | ) |
|
|
inlinevirtual |
set a new value for the adjustable load
- Parameters
-
load | between 0.0 and 1.0 where 1.0 is the highest load |
Implements LoadAdjust.
◆ coarse
◆ fine
◆ fineResistance
float LoadAdjustCoarseFine::fineResistance |
|
protected |
◆ maxResistance
float LoadAdjustCoarseFine::maxResistance |
|
protected |
◆ numCoarseSteps
uint16_t LoadAdjustCoarseFine::numCoarseSteps |
|
protected |
◆ relayStepsInFine
float LoadAdjustCoarseFine::relayStepsInFine |
|
protected |
◆ relayValue
uint16_t LoadAdjustCoarseFine::relayValue = 0 |
|
protected |
The documentation for this class was generated from the following file: