JMotor
Loading...
Searching...
No Matches
Public Member Functions | List of all members
JMotorCompDirect Class Reference

Converts from speed to driver input with a simple multiplier. More...

#include <JMotorCompDirect.h>

Inheritance diagram for JMotorCompDirect:
Inheritance graph
[legend]
Collaboration diagram for JMotorCompDirect:
Collaboration graph
[legend]

Public Member Functions

 JMotorCompDirect (float _multiplier)
 constructor
 
float compensate (float val)
 calculate
 
bool setMultiplier (float _multiplier)
 
float getMaxVel ()
 How fast of a motor speed setting would get adjusted to full motor power.
 
float getMinVel ()
 Slowest speed motor can go.
 
- 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
 

Detailed Description

Converts from speed to driver input with a simple multiplier.

Constructor & Destructor Documentation

◆ JMotorCompDirect()

JMotorCompDirect::JMotorCompDirect ( float  _multiplier)
inline

constructor

Parameters
_multiplier(float) driver units per speed units

Member Function Documentation

◆ compensate()

float JMotorCompDirect::compensate ( float  val)
inlinevirtual

calculate

Parameters
val(float) speed
Return values
(float)value to set driver

Reimplemented from JMotorCompensator.

◆ getMaxVel()

float JMotorCompDirect::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
(float)

Reimplemented from JMotorCompensator.

◆ getMinVel()

float JMotorCompDirect::getMinVel ( )
inlinevirtual

Slowest speed motor can go.

Return values
(float)

Reimplemented from JMotorCompensator.

◆ setMultiplier()

bool JMotorCompDirect::setMultiplier ( float  _multiplier)
inline
Parameters
_multiplier(float) driver units per speed units
Return values
(bool)true if multiplier changed

The documentation for this class was generated from the following file: