Package com.ctre.phoenix6.swerve
Enum Class SwerveRequest.ForwardPerspectiveValue
java.lang.Object
java.lang.Enum<SwerveRequest.ForwardPerspectiveValue>
com.ctre.phoenix6.swerve.SwerveRequest.ForwardPerspectiveValue
- All Implemented Interfaces:
Serializable
,Comparable<SwerveRequest.ForwardPerspectiveValue>
,java.lang.constant.Constable
- Enclosing interface:
- SwerveRequest
public static enum SwerveRequest.ForwardPerspectiveValue
extends Enum<SwerveRequest.ForwardPerspectiveValue>
In field-centric control, the direction of "forward" is sometimes different
depending on perspective. This addresses which forward to use.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription"Forward" (positive X) is always from the perspective of the blue alliance (i.e."Forward" (positive X) is determined from the operator's perspective. -
Field Summary
-
Method Summary
-
Enum Constant Details
-
OperatorPerspective
"Forward" (positive X) is determined from the operator's perspective. This is important for most teleop driven field-centric requests, where positive X means to drive away from the operator.Important: Users must specify the OperatorPerspective in the SwerveDrivetrain object
-
BlueAlliance
"Forward" (positive X) is always from the perspective of the blue alliance (i.e. towards the red alliance). This is important in situations such as path following where positive X is always from the blue alliance perspective, regardless of where the operator is physically located.
-
-
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 ForwardPerspectiveValue from specified value- Parameters:
value
- Value of ForwardPerspectiveValue- Returns:
- ForwardPerspectiveValue of specified value
-