Class POVButton

java.lang.Object
org.wpilib.command2.button.Trigger
org.wpilib.command2.button.POVButton
All Implemented Interfaces:
BooleanSupplier

public class POVButton extends Trigger
A Trigger that gets its state from a POV on a GenericHID.

This class is provided by the Commands v2 VendorDep

  • Constructor Details

    • POVButton

      public POVButton(GenericHID joystick, POVDirection angle, int povNumber)
      Creates a POV button for triggering commands.
      Parameters:
      joystick - The GenericHID object that has the POV
      angle - The desired angle
      povNumber - The POV number (see GenericHID.getPOV(int))
    • POVButton

      public POVButton(GenericHID joystick, POVDirection angle)
      Creates a POV button for triggering commands. By default, acts on POV 0
      Parameters:
      joystick - The GenericHID object that has the POV
      angle - The desired angle