Package edu.wpi.first.wpilibj.buttons
Class JoystickButton
- java.lang.Object
-
- edu.wpi.first.wpilibj.buttons.Trigger
-
- edu.wpi.first.wpilibj.buttons.Button
-
- edu.wpi.first.wpilibj.buttons.JoystickButton
-
- All Implemented Interfaces:
Sendable
public class JoystickButton extends Button
AButtonthat gets its state from aGenericHID.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.buttons.Trigger
Trigger.ButtonScheduler
-
-
Constructor Summary
Constructors Constructor Description JoystickButton(GenericHID joystick, int buttonNumber)Create a joystick button for triggering commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanget()Gets the value of the joystick button.-
Methods inherited from class edu.wpi.first.wpilibj.buttons.Button
cancelWhenPressed, toggleWhenPressed, whenPressed, whenReleased, whileHeld
-
Methods inherited from class edu.wpi.first.wpilibj.buttons.Trigger
cancelWhenActive, initSendable, toggleWhenActive, whenActive, whenInactive, whileActive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wpi.first.wpilibj.Sendable
addChild, getName, getSubsystem, setName, setName, setName, setName, setSubsystem
-
-
-
-
Constructor Detail
-
JoystickButton
public JoystickButton(GenericHID joystick, int buttonNumber)
Create 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)
-
-