Package com.marswars.swerve_lib
Enum Class ChassisRequest.XPositiveReference
java.lang.Object
java.lang.Enum<ChassisRequest.XPositiveReference>
com.marswars.swerve_lib.ChassisRequest.XPositiveReference
- All Implemented Interfaces:
Serializable,Comparable<ChassisRequest.XPositiveReference>,Constable
- Enclosing interface:
- ChassisRequest
public static enum ChassisRequest.XPositiveReference
extends Enum<ChassisRequest.XPositiveReference>
The reference for "forward" is sometimes different if you're talking about field relative.
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 ConstantsEnum ConstantDescriptionThis forward references makes it so "forward" (positive X) is determined from the operator's perspective.This forward reference makes it so "forward" (positive X) is always towards the red alliance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static ChassisRequest.XPositiveReference[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TowardsRedAlliance
This forward reference makes it so "forward" (positive X) is always towards the red alliance. This is important in situations such as path following where positive X is always towards the red alliance wall, regardless of where the operator physically are located. -
OperatorPerspective
This forward references makes it so "forward" (positive X) is determined from the operator's perspective. This is important for most teleop driven field-centric requests, where positive X really means to drive away from the operator.Important: Users must specify the OperatorPerspective with
SwerveDrivetrainobject
-
-
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
-