|
CTRE Phoenix C++ 5.36.0
|
Collection of simulation commands available to a VictorSPX motor controller. More...
#include <ctre/phoenix/motorcontrol/VictorSPXSimCollection.h>
Public Member Functions | |
| VictorSPXSimCollection (ctre::phoenix::motorcontrol::can::BaseMotorController &motorController) | |
| Constructor for VictorSPXSimCollection. | |
| ErrorCode | GetLastError () |
| Gets the last error generated by this object. | |
| double | GetMotorOutputLeadVoltage () |
| Gets the simulated output voltage across M+ and M- for the motor. | |
| ErrorCode | SetBusVoltage (double vbat) |
| Sets the simulated bus voltage of the VictorSPX. | |
Collection of simulation commands available to a VictorSPX motor controller.
Use the getSimCollection() routine inside your motor controller to create the respective sim collection.
| ctre::phoenix::motorcontrol::VictorSPXSimCollection::VictorSPXSimCollection | ( | ctre::phoenix::motorcontrol::can::BaseMotorController & | motorController | ) |
Constructor for VictorSPXSimCollection.
| motorController | VictorSPX Motor Controller to connect Collection to |
| ErrorCode ctre::phoenix::motorcontrol::VictorSPXSimCollection::GetLastError | ( | ) |
Gets the last error generated by this object.
Not all functions return an error code but can potentially report errors. This function can be used to retrieve those error codes.
| double ctre::phoenix::motorcontrol::VictorSPXSimCollection::GetMotorOutputLeadVoltage | ( | ) |
Gets the simulated output voltage across M+ and M- for the motor.
| ErrorCode ctre::phoenix::motorcontrol::VictorSPXSimCollection::SetBusVoltage | ( | double | vbat | ) |
Sets the simulated bus voltage of the VictorSPX.
The minimum allowed bus voltage is 4 V - values below this will be promoted to 4 V.
| vbat | the bus voltage in volts |