Class POVButton
java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
edu.wpi.first.wpilibj2.command.button.POVButton
- All Implemented Interfaces:
BooleanSupplier
A
Trigger that gets its state from a POV on a GenericHID.
This class is provided by the NewCommands VendorDep
-
Constructor Summary
ConstructorsConstructorDescriptionPOVButton(GenericHID joystick, int angle) Creates a POV button for triggering commands.POVButton(GenericHID joystick, int angle, int povNumber) Creates a POV button for triggering commands. -
Method Summary
Methods inherited from class edu.wpi.first.wpilibj2.command.button.Trigger
and, debounce, debounce, getAsBoolean, negate, onChange, 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 angle in degrees (e.g. 90, 270)povNumber- 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 (e.g. 90, 270)
-