Enum Class SensorPhaseValue

java.lang.Object
java.lang.Enum<SensorPhaseValue>
com.ctre.phoenix6.signals.SensorPhaseValue
All Implemented Interfaces:
Serializable, Comparable<SensorPhaseValue>, java.lang.constant.Constable

The relationship between the motor controlled by a Talon and the external sensor connected to the data port. This does not affect the commutation sensor or remote sensors.

To determine the sensor phase, set this config to Aligned and drive the motor with positive output. If the reported sensor velocity is positive, then the phase is Aligned. If the reported sensor velocity is negative, then the phase is Opposed.

The sensor direction is automatically inverted along with motor invert, so the sensor phase does not need to be changed when motor invert changes.

  • Enum Constant Details

  • Field Details

    • value

      public final int value
  • Method Details

    • values

      public static SensorPhaseValue[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SensorPhaseValue valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static SensorPhaseValue valueOf(int value)
      Gets SensorPhaseValue from specified value
      Parameters:
      value - Value of SensorPhaseValue
      Returns:
      SensorPhaseValue of specified value