CTRE_Phoenix 5.20.2
com.ctre.phoenix.motorcontrol.VictorSPXSimCollection Class Reference

Public Member Functions

 VictorSPXSimCollection (BaseMotorController motorController)
 
ErrorCode getLastError ()
 
double getMotorOutputLeadVoltage ()
 
ErrorCode setBusVoltage (double vbat)
 

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()

com.ctre.phoenix.motorcontrol.VictorSPXSimCollection.VictorSPXSimCollection ( BaseMotorController  motorController)
inline

Constructor for VictorSPXSimCollection

Parameters
motorControllerMotor Controller to connect Collection to

Member Function Documentation

◆ getLastError()

ErrorCode com.ctre.phoenix.motorcontrol.VictorSPXSimCollection.getLastError ( )
inline

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 com.ctre.phoenix.motorcontrol.VictorSPXSimCollection.getMotorOutputLeadVoltage ( )
inline

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

Returns
applied voltage to the motor in volts

◆ setBusVoltage()

ErrorCode com.ctre.phoenix.motorcontrol.VictorSPXSimCollection.setBusVoltage ( double  vbat)
inline

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: