CTRE_Phoenix 5.20.2
|
#include <VictorSPXSimCollection.h>
Public Member Functions | |
VictorSPXSimCollection (ctre::phoenix::motorcontrol::can::BaseMotorController &motorController) | |
ErrorCode | GetLastError () |
double | GetMotorOutputLeadVoltage () |
ErrorCode | SetBusVoltage (double vbat) |
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 |