Class JoystickButton

java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
edu.wpi.first.wpilibj2.command.button.JoystickButton
All Implemented Interfaces:
BooleanSupplier

public class JoystickButton extends Trigger
A Trigger that gets its state from a GenericHID.

This class is provided by the NewCommands VendorDep

  • Constructor Details

    • JoystickButton

      public JoystickButton(GenericHID joystick, int buttonNumber)
      Creates a joystick button for triggering commands.
      Parameters:
      joystick - The GenericHID object that has the button (e.g. Joystick, KinectStick, etc)
      buttonNumber - The button number (see GenericHID.getRawButton(int)