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

convert voltage to value needed to set driver at to get that voltage, with constant value for what supply voltage is More...

#include <JVoltageCompConst.h>

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

Public Member Functions

 JVoltageCompConst (float _supplyVoltage=1.0)
 constructor
 
float adjust (float voltage, float driverRange)
 do conversion
 
bool changeSupplyVoltageSetting (float _supplyVoltage)
 adjust the setting of what the motor controller supply voltage is
 
float getSupplyVoltage ()
 

Detailed Description

convert voltage to value needed to set driver at to get that voltage, with constant value for what supply voltage is

Constructor & Destructor Documentation

◆ JVoltageCompConst()

JVoltageCompConst::JVoltageCompConst ( float  _supplyVoltage = 1.0)
inline

constructor

Parameters
_supplyVoltage(float) default: 1.0
_driverRange(float) what value makes the driver output 100% of supply voltage (default=1.0)

Member Function Documentation

◆ adjust()

float JVoltageCompConst::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.

◆ changeSupplyVoltageSetting()

bool JVoltageCompConst::changeSupplyVoltageSetting ( float  _supplyVoltage)
inline

adjust the setting of what the motor controller supply voltage is

Parameters
_supplyVoltage(float) new setting for what the supply voltage is
Return values
(bool)true if value changed

◆ getSupplyVoltage()

float JVoltageCompConst::getSupplyVoltage ( )
inlinevirtual
Return values
(float)returns current supply voltage

Reimplemented from JVoltageCompensator.


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