Class VictorSPXSimCollection

java.lang.Object
com.ctre.phoenix.motorcontrol.VictorSPXSimCollection

public class VictorSPXSimCollection
extends Object
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 Details

  • 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

      public double getMotorOutputLeadVoltage()
      Gets the simulated output voltage across M+ and M- for the motor.
      Returns:
      applied voltage to the motor in volts
    • setBusVoltage

      public ErrorCode 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:
      vbat - the bus voltage in volts
      Returns:
      error code