Class CANrangeSimState

java.lang.Object
com.ctre.phoenix6.sim.CANrangeSimState

public class CANrangeSimState extends Object
Class to control the state of a simulated CANrange.
  • Constructor Details

  • Method Details

    • setSupplyVoltage

      public final StatusCode setSupplyVoltage(double volts)
      Sets the simulated supply voltage of the CANrange.

      The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.

      Parameters:
      volts - The supply voltage in Volts
      Returns:
      Status code
    • setSupplyVoltage

      public final StatusCode setSupplyVoltage(Voltage voltage)
      Sets the simulated supply voltage of the CANrange.

      The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.

      Parameters:
      voltage - The supply voltage
      Returns:
      Status code
    • setDistance

      public final StatusCode setDistance(double meters)
      Sets the simulated distance of the CANrange.
      Parameters:
      meters - The distance in meters
      Returns:
      Status code
    • setDistance

      public final StatusCode setDistance(Distance distance)
      Sets the simulated distance of the CANrange.
      Parameters:
      distance - The distance
      Returns:
      Status code