JoystickButton
- class commands2.button.JoystickButton(joystick: GenericHID, buttonNumber: int)[source]
Bases:
Trigger
A Button that gets its state from a
wpilib.interfaces.GenericHID
.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
wpilib.interfaces.GenericHID.getRawButton()