JMotor
|
Converts from speed to driver input compensating for motors not being perfect. More...
#include <JMotorCompStandard.h>
Public Member Functions | |
JMotorCompStandard (JVoltageCompensator &_voltComp, JMotorCompStandardConfig _config, float _multiplier=1.0) | |
Converts from speed to driver input compensating for motors not being perfect. | |
float | compensate (float val) |
calculate | |
void | setConfig (JMotorCompStandardConfig &_config) |
float | getMaxVel () |
How fast of a motor speed setting would get adjusted to full motor power. | |
float | getMinVel () |
Slowest speed motor can go. | |
void | setMultiplier (float _multiplier) |
Public Member Functions inherited from JMotorCompensator | |
void | setDriverRange (float _driverRange) |
set what value makes the driver output 100% of supply voltage | |
void | setMaxDriverRangeAmount (float _driverRangeAmount) |
set what fraction of driverRange can be used | |
float | getDriverRange () |
get what value makes the driver output 100% of supply voltage | |
float | getMaxDriverRangeAmount () |
get what fraction of driverRange can be used | |
Additional Inherited Members | |
Protected Attributes inherited from JMotorCompensator | |
float | driverRange = 1.0 |
float | maxDriverRange = 1.0 |
Converts from speed to driver input compensating for motors not being perfect.
|
inline |
Converts from speed to driver input compensating for motors not being perfect.
_voltComp | reference to JVoltageCompensator to convert voltage to driver input |
_config | JMotorCompStandardConfig (settings for your motor) |
_multiplier | multiplier for speed input, optional, default 1.0 |
|
inlinevirtual |
calculate
val | (float) speed |
(float) | value to set driver |
Reimplemented from JMotorCompensator.
|
inlinevirtual |
How fast of a motor speed setting would get adjusted to full motor power.
(float) |
Reimplemented from JMotorCompensator.
|
inlinevirtual |
|
inline |
|
inline |