1#ifndef J_MOTOR_COMP_BASIC_H
2#define J_MOTOR_COMP_BASIC_H
25 multiplier = _voltsPerSpeed;
26 minSpeed = abs(_minSpeed);
30 if (val == 0 || abs(val) < minSpeed) {
46 multiplier = _voltsPerSpeed;
54 minSpeed = abs(_speed);
Converts from speed to driver input compensating for variable supply voltage.
Definition JMotorCompBasic.h:9
JMotorCompBasic(JVoltageCompensator &_voltComp, float _voltsPerSpeed, float _minSpeed)
Converts from speed to driver input compensating for variable supply voltage.
Definition JMotorCompBasic.h:22
float getMaxVel()
How fast of a motor speed setting would get adjusted to full motor power.
Definition JMotorCompBasic.h:35
void setMinSpeed(float _speed)
Definition JMotorCompBasic.h:52
float getVoltsPerSpeed()
Definition JMotorCompBasic.h:48
float getMinVel()
Slowest speed motor can go.
Definition JMotorCompBasic.h:39
void setVoltsPerSpeed(float _voltsPerSpeed)
Definition JMotorCompBasic.h:44
float compensate(float val)
calculate
Definition JMotorCompBasic.h:28
This class defines a common interface for converting from speed to driver input. It should compensate...
Definition JMotorCompensator.h:9
float maxDriverRange
Definition JMotorCompensator.h:12
float driverRange
Definition JMotorCompensator.h:11
convert voltage to value needed to set driver at to get that voltage
Definition JVoltageCompensator.h:7
virtual float getSupplyVoltage()
virtual float adjust(float voltage, float driverRange)
do conversion