Enum SwerveRequest.ForwardReference

java.lang.Object
java.lang.Enum<SwerveRequest.ForwardReference>
com.ctre.phoenix6.mechanisms.swerve.SwerveRequest.ForwardReference
All Implemented Interfaces:
Serializable, Comparable<SwerveRequest.ForwardReference>, java.lang.constant.Constable
Enclosing interface:
SwerveRequest

public static enum SwerveRequest.ForwardReference
extends Enum<SwerveRequest.ForwardReference>
The reference for "forward" is sometimes different if you're talking about field relative. This addresses which forward to use.
  • Enum Constant Details

    • RedAlliance

      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 SwerveDrivetrain object

  • Method Details

    • values

      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null