Enum Class DifferentialSensorSourceValue

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

public enum DifferentialSensorSourceValue extends Enum<DifferentialSensorSourceValue>
Choose what sensor source is used for differential control of a mechanism. The default is Disabled. All other options require setting the DifferentialTalonFXSensorID, as the average of this Talon FX's sensor and the remote TalonFX's sensor is used for the differential controller's primary targets.

Choose RemoteTalonFX_HalfDiff to use another TalonFX on the same CAN bus. Talon FX will update its differential position and velocity whenever the remote TalonFX publishes its information on CAN bus. The differential controller will use half of the difference between this TalonFX's sensor and the remote Talon FX's sensor for the differential component of the output.

Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll to use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position to match the selected value whenever Pigeon2 publishes its information on CAN bus. Note that the Talon FX differential position will be in rotations and not degrees.

Choose RemoteCANcoder to use another CANcoder on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position and velocity to match the CANcoder whenever CANcoder publishes its information on CAN bus.

  • Enum Constant Details

    • Disabled

      public static final DifferentialSensorSourceValue Disabled
      Disable differential control.
    • RemoteTalonFX_HalfDiff

      public static final DifferentialSensorSourceValue RemoteTalonFX_HalfDiff
      Use another TalonFX on the same CAN bus. Talon FX will update its differential position and velocity whenever the remote TalonFX publishes its information on CAN bus. The differential controller will use half of the difference between this TalonFX's sensor and the remote Talon FX's sensor for the differential component of the output.
    • RemotePigeon2Yaw

      public static final DifferentialSensorSourceValue RemotePigeon2Yaw
      Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position to match the Pigeon2 yaw whenever Pigeon2 publishes its information on CAN bus. Note that the Talon FX differential position will be in rotations and not degrees.
    • RemotePigeon2Pitch

      public static final DifferentialSensorSourceValue RemotePigeon2Pitch
      Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position to match the Pigeon2 pitch whenever Pigeon2 publishes its information on CAN bus. Note that the Talon FX differential position will be in rotations and not degrees.
    • RemotePigeon2Roll

      public static final DifferentialSensorSourceValue RemotePigeon2Roll
      Use another Pigeon2 on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position to match the Pigeon2 roll whenever Pigeon2 publishes its information on CAN bus. Note that the Talon FX differential position will be in rotations and not degrees.
    • RemoteCANcoder

      public static final DifferentialSensorSourceValue RemoteCANcoder
      Use another CANcoder on the same CAN bus (this also requires setting DifferentialRemoteSensorID). Talon FX will update its differential position and velocity to match the CANcoder whenever CANcoder publishes its information on CAN bus.
    • RemoteCANdiPWM1

      public static final DifferentialSensorSourceValue RemoteCANdiPWM1
      Use a pulse-width encoder remotely attached to the Sensor Input 1 (S1IN) on the CTR Electronics' CANdi™ (this also requires setting the DifferentialRemoteSensorID). Talon FX will update its differential position and velocity to match the CTR Electronics' CANdi™ whenever the CTR Electronics' CANdi™ publishes its information on CAN bus.
    • RemoteCANdiPWM2

      public static final DifferentialSensorSourceValue RemoteCANdiPWM2
      Use a pulse-width encoder remotely attached to the Sensor Input 2 (S2IN) on the CTR Electronics' CANdi™ (this also requires setting the DifferentialRemoteSensorID). Talon FX will update its differential position and velocity to match the CTR Electronics' CANdi™ whenever the CTR Electronics' CANdi™ publishes its information on CAN bus.
    • RemoteCANdiQuadrature

      public static final DifferentialSensorSourceValue RemoteCANdiQuadrature
      Use a quadrature encoder remotely attached to the two Sensor Inputs on the CTR Electronics' CANdi™ (this also requires setting the DifferentialRemoteSensorID). Talon FX will update its differential position and velocity to match the CTR Electronics' CANdi™ whenever the CTR Electronics' CANdi™ publishes its information on CAN bus.
  • Field Details

    • value

      public final int value
      Unique integer value of this DifferentialSensorSourceValue.
  • Method Details

    • values

      public static DifferentialSensorSourceValue[] 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 DifferentialSensorSourceValue 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 DifferentialSensorSourceValue valueOf(int value)
      Gets DifferentialSensorSourceValue from specified value
      Parameters:
      value - Value of DifferentialSensorSourceValue
      Returns:
      DifferentialSensorSourceValue of specified value