RobotCore
Robot Core Documentation
Public Member Functions | List of all members
edu.wpi.first.wpilibj2.command.button.JoystickButton Class Reference
Inheritance diagram for edu.wpi.first.wpilibj2.command.button.JoystickButton:
edu.wpi.first.wpilibj2.command.button.Button edu.wpi.first.wpilibj2.command.button.Trigger

Public Member Functions

 JoystickButton (GenericHID joystick, int buttonNumber)
 
boolean get ()
 
- Public Member Functions inherited from edu.wpi.first.wpilibj2.command.button.Button
 Button ()
 
 Button (BooleanSupplier isPressed)
 
Button whenPressed (final Command command, boolean interruptible)
 
Button whenPressed (final Command command)
 
Button whenPressed (final Runnable toRun, Subsystem... requirements)
 
Button whileHeld (final Command command, boolean interruptible)
 
Button whileHeld (final Command command)
 
Button whileHeld (final Runnable toRun, Subsystem... requirements)
 
Button whenHeld (final Command command, boolean interruptible)
 
Button whenHeld (final Command command)
 
Button whenReleased (final Command command, boolean interruptible)
 
Button whenReleased (final Command command)
 
Button whenReleased (final Runnable toRun, Subsystem... requirements)
 
Button toggleWhenPressed (final Command command, boolean interruptible)
 
Button toggleWhenPressed (final Command command)
 
Button cancelWhenPressed (final Command command)
 
- Public Member Functions inherited from edu.wpi.first.wpilibj2.command.button.Trigger
 Trigger (BooleanSupplier isActive)
 
 Trigger ()
 
Trigger whenActive (final Command command, boolean interruptible)
 
Trigger whenActive (final Command command)
 
Trigger whenActive (final Runnable toRun, Subsystem... requirements)
 
Trigger whileActiveContinuous (final Command command, boolean interruptible)
 
Trigger whileActiveContinuous (final Command command)
 
Trigger whileActiveContinuous (final Runnable toRun, Subsystem... requirements)
 
Trigger whileActiveOnce (final Command command, boolean interruptible)
 
Trigger whileActiveOnce (final Command command)
 
Trigger whenInactive (final Command command, boolean interruptible)
 
Trigger whenInactive (final Command command)
 
Trigger whenInactive (final Runnable toRun, Subsystem... requirements)
 
Trigger toggleWhenActive (final Command command, boolean interruptible)
 
Trigger toggleWhenActive (final Command command)
 
Trigger cancelWhenActive (final Command command)
 
Trigger and (Trigger trigger)
 
Trigger or (Trigger trigger)
 
Trigger negate ()
 

Detailed Description

A Button that gets its state from a GenericHID.

Constructor & Destructor Documentation

◆ JoystickButton()

edu.wpi.first.wpilibj2.command.button.JoystickButton.JoystickButton ( GenericHID  joystick,
int  buttonNumber 
)

Creates a joystick button for triggering commands.

Parameters
joystickThe GenericHID object that has the button (e.g. Joystick, KinectStick, etc)
buttonNumberThe button number (see GenericHID#getRawButton(int)

Member Function Documentation

◆ get()

boolean edu.wpi.first.wpilibj2.command.button.JoystickButton.get ( )

Gets the value of the joystick button.

Returns
The value of the joystick button

Reimplemented from edu.wpi.first.wpilibj2.command.button.Trigger.


The documentation for this class was generated from the following file: