Class JoystickButton
java.lang.Object
org.wpilib.command3.Trigger
org.wpilib.command3.button.JoystickButton
- All Implemented Interfaces:
BooleanSupplier
A
Trigger that gets its state from a GenericHID.-
Constructor Summary
ConstructorsConstructorDescriptionJoystickButton(GenericHID joystick, int buttonNumber) Creates a joystick button for triggering commands.JoystickButton(HIDDevice joystick, int buttonNumber) Creates a joystick button for triggering commands. -
Method Summary
Methods inherited from class Trigger
and, debounce, debounce, fallingEdge, getAsBoolean, multiPress, negate, onFalse, onTrue, or, retryWhileFalse, retryWhileTrue, risingEdge, toggleOnFalse, toggleOnTrue, unbind, whileFalse, whileTrue
-
Constructor Details
-
JoystickButton
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 (seeGenericHID.getRawButton(int)
-
JoystickButton
Creates a joystick button for triggering commands.- Parameters:
joystick- The HIDDevice object that has the buttonbuttonNumber- The button number (seeGenericHID.getRawButton(int)
-