Enum Class Gamepad.Mapping

java.lang.Object
java.lang.Enum<Gamepad.Mapping>
frc.spectrumLib.gamepads.Gamepad.Mapping
All Implemented Interfaces:
Serializable, Comparable<Gamepad.Mapping>, Constable
Enclosing class:
Gamepad

public static enum Gamepad.Mapping extends Enum<Gamepad.Mapping>
Which Driver Station's controller layout to read (see GamepadLayout).

NI_DS is the default because the 2026 FMS only takes the 2026 NI Driver Station.

  • Enum Constant Details

    • NI_DS

      public static final Gamepad.Mapping NI_DS
      The 2026 NI FRC Driver Station (the legacy XInput order, D-pad on the POV).
    • WPILIB_DS

      public static final Gamepad.Mapping WPILIB_DS
      The 2027 WPILib Driver Station (the 2027 Gamepad order, D-pad as buttons).
    • AUTO

      public static final Gamepad.Mapping AUTO
      Follow GamepadLayout.detect(GenericHID), starting from NI_DS and keeping the last recognised layout. The detection is a heuristic; bench-test it before using this.
  • Method Details

    • values

      public static Gamepad.Mapping[] 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 Gamepad.Mapping 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