Converts from speed to driver input compensating for variable supply voltage.
More...
#include <JMotorCompBasic.h>
Converts from speed to driver input compensating for variable supply voltage.
◆ JMotorCompBasic()
JMotorCompBasic::JMotorCompBasic |
( |
JVoltageCompensator & |
_voltComp, |
|
|
float |
_voltsPerSpeed, |
|
|
float |
_minSpeed |
|
) |
| |
|
inline |
Converts from speed to driver input compensating for variable supply voltage.
- Parameters
-
_voltComp | reference to JVoltageCompensator to convert voltage to driver input |
_voltsPerSpeed | multiplier for speed input, units: voltage per speed |
_minSpeed | if the motor is told to go slower than this speed, just turn it off |
◆ compensate()
float JMotorCompBasic::compensate |
( |
float |
val | ) |
|
|
inlinevirtual |
calculate
- Parameters
-
- Return values
-
(float) | value to set driver |
Reimplemented from JMotorCompensator.
◆ getMaxVel()
float JMotorCompBasic::getMaxVel |
( |
| ) |
|
|
inlinevirtual |
How fast of a motor speed setting would get adjusted to full motor power.
- Note
- may change as battery voltage changes
- Return values
-
Reimplemented from JMotorCompensator.
◆ getMinVel()
float JMotorCompBasic::getMinVel |
( |
| ) |
|
|
inlinevirtual |
◆ getVoltsPerSpeed()
float JMotorCompBasic::getVoltsPerSpeed |
( |
| ) |
|
|
inline |
◆ setMinSpeed()
void JMotorCompBasic::setMinSpeed |
( |
float |
_speed | ) |
|
|
inline |
◆ setVoltsPerSpeed()
void JMotorCompBasic::setVoltsPerSpeed |
( |
float |
_voltsPerSpeed | ) |
|
|
inline |
The documentation for this class was generated from the following file: