Class GamepadButton

java.lang.Object
org.wpilib.command2.button.Trigger
org.wpilib.command2.button.GamepadButton
All Implemented Interfaces:
BooleanSupplier

public class GamepadButton extends Trigger
A Trigger that gets its state from a Gamepad.

This class is provided by the Commands v2 VendorDep

  • Constructor Details

    • GamepadButton

      public GamepadButton(Gamepad gamepad, Gamepad.Button button)
      Creates a gamepad button for triggering commands.
      Parameters:
      gamepad - The gamepad on which the button is located.
      button - The button