Package com.ctre.phoenix.motorcontrol
Class VictorSPXSimCollection
java.lang.Object
com.ctre.phoenix.motorcontrol.VictorSPXSimCollection
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 Summary
ConstructorDescriptionVictorSPXSimCollection
(BaseMotorController motorController) Constructor for VictorSPXSimCollection -
Method Summary
Modifier and TypeMethodDescriptionGets the last error generated by this object.double
Gets the simulated output voltage across M+ and M- for the motor.setBusVoltage
(double vbat) Sets the simulated bus voltage of the VictorSPX.
-
Constructor Details
-
VictorSPXSimCollection
Constructor for VictorSPXSimCollection- Parameters:
motorController
- Motor Controller to connect Collection to
-
-
Method Details
-
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
Gets the simulated output voltage across M+ and M- for the motor.- Returns:
- applied voltage to the motor in volts
-
setBusVoltage
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:
vbat
- the bus voltage in volts- Returns:
- error code
-