Package org.wpilib.commands3.button
Class POVButton
java.lang.Object
org.wpilib.commands3.Trigger
org.wpilib.commands3.button.POVButton
- All Implemented Interfaces:
BooleanSupplier
A
Trigger that gets its state from a POV on a GenericHID.-
Constructor Summary
ConstructorsConstructorDescriptionPOVButton(GenericHID joystick, DriverStation.POVDirection angle) Creates a POV button for triggering commands.POVButton(GenericHID joystick, DriverStation.POVDirection angle, int povNumber) Creates a POV button for triggering commands. -
Method Summary
Methods inherited from class org.wpilib.commands3.Trigger
and, debounce, debounce, getAsBoolean, negate, onFalse, onTrue, or, toggleOnFalse, toggleOnTrue, whileFalse, whileTrue
-
Constructor Details
-
POVButton
Creates a POV button for triggering commands.- Parameters:
joystick- The GenericHID object that has the POVangle- The desired anglepovNumber- The POV number (seeGenericHID.getPOV(int))
-
POVButton
Creates a POV button for triggering commands. By default, acts on POV 0- Parameters:
joystick- The GenericHID object that has the POVangle- The desired angle
-