Package com.ctre.phoenix6.signals
Enum Class 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SensorPhaseValue
valueOf
(int value) Gets SensorPhaseValue from specified valuestatic SensorPhaseValue
Returns the enum constant of this class with the specified name.static SensorPhaseValue[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Aligned
The sensor direction is normally aligned with the motor. -
Opposed
The sensor direction is normally opposed to the motor.
-
-
Field Details
-
value
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
valueOf
Gets SensorPhaseValue from specified value- Parameters:
value
- Value of SensorPhaseValue- Returns:
- SensorPhaseValue of specified value
-