JoystickButton
- class commands2.button.JoystickButton(joystick: GenericHID, button_number: int)[source]
Bases:
TriggerA Button that gets its state from a
wpilib.GenericHID.Creates a joystick button for triggering commands.
- Parameters:
joystick – The GenericHID object that has the button (e.g. Joystick, KinectStick, etc)
button_number – The button number (see
wpilib.GenericHID.get_raw_button()