Class POVButton

    • Constructor Detail

      • POVButton

        public POVButton​(GenericHID joystick,
                         int angle,
                         int povNumber)
        Creates a POV button for triggering commands.
        Parameters:
        joystick - The GenericHID object that has the POV
        angle - The desired angle in degrees (e.g. 90, 270)
        povNumber - The POV number (see GenericHID.getPOV(int))
      • POVButton

        public POVButton​(GenericHID joystick,
                         int 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 (e.g. 90, 270)
    • Method Detail

      • get

        public boolean get()
        Checks whether the current value of the POV is the target angle.
        Specified by:
        get in class Trigger
        Returns:
        Whether the value of the POV matches the target angle