convert voltage to value needed to set driver at to get that voltage, uses reference to variable that should be equal to measured supply voltage
More...
#include <JVoltageCompAdjust.h>
|
| JVoltageCompAdjust (float &_supplyVoltage) |
| constructor
|
|
float | adjust (float voltage, float driverRange) |
| do conversion
|
|
void | changeSupplyVoltageVariable (float &_supplyVoltage) |
| if for some reason you want to provide a new reference to a variable that contains the current voltage supplied to the motor controller
|
|
float | getSupplyVoltage () |
|
convert voltage to value needed to set driver at to get that voltage, uses reference to variable that should be equal to measured supply voltage
◆ JVoltageCompAdjust()
JVoltageCompAdjust::JVoltageCompAdjust |
( |
float & |
_supplyVoltage | ) |
|
|
inline |
constructor
- Parameters
-
_supplyVoltage | (float) reference to a variable that contains the current voltage supplied to the motor controller |
_driverRange | (float) what value makes the driver output 100% of supply voltage (default=1.0) |
- Return values
-
◆ adjust()
float JVoltageCompAdjust::adjust |
( |
float |
voltage, |
|
|
float |
driverRange |
|
) |
| |
|
inlinevirtual |
do conversion
- Parameters
-
voltage | (float) voltage wanted from motor driver output |
driverRange | (float) set what value makes the driver output 100% of supply voltage |
- Return values
-
(float) | value to set driver at |
Reimplemented from JVoltageCompensator.
◆ changeSupplyVoltageVariable()
void JVoltageCompAdjust::changeSupplyVoltageVariable |
( |
float & |
_supplyVoltage | ) |
|
|
inline |
if for some reason you want to provide a new reference to a variable that contains the current voltage supplied to the motor controller
- Parameters
-
◆ getSupplyVoltage()
float JVoltageCompAdjust::getSupplyVoltage |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: