CTRE Phoenix C++ 5.33.0
ctre::phoenix::motorcontrol::VictorSPXSimCollection Class Reference

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. More...
 
ErrorCode GetLastError ()
 Gets the last error generated by this object. More...
 
double GetMotorOutputLeadVoltage ()
 Gets the simulated output voltage across M+ and M- for the motor. More...
 
ErrorCode SetBusVoltage (double vbat)
 Sets the simulated bus voltage of the VictorSPX. More...
 

Detailed Description

Collection of simulation commands available to a VictorSPX motor controller.

Use the getSimCollection() routine inside your motor controller to create the respective sim collection.

Constructor & Destructor Documentation

◆ VictorSPXSimCollection()

ctre::phoenix::motorcontrol::VictorSPXSimCollection::VictorSPXSimCollection ( ctre::phoenix::motorcontrol::can::BaseMotorController motorController)

Constructor for VictorSPXSimCollection.

Parameters
motorControllerVictorSPX Motor Controller to connect Collection to

Member Function Documentation

◆ GetLastError()

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.

Returns
Last Error Code generated by a function.

◆ GetMotorOutputLeadVoltage()

double ctre::phoenix::motorcontrol::VictorSPXSimCollection::GetMotorOutputLeadVoltage ( )

Gets the simulated output voltage across M+ and M- for the motor.

Returns
applied voltage to the motor in volts

◆ SetBusVoltage()

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.

Parameters
vbatthe bus voltage in volts
Returns
error code

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