Class StrictDPadButton


  • public class StrictDPadButton
    extends edu.wpi.first.wpilibj2.command.button.Button
    Version of DPadButton that ignores diagonal inputs.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean get()  
      • Methods inherited from class edu.wpi.first.wpilibj2.command.button.Button

        cancelWhenPressed, toggleWhenPressed, toggleWhenPressed, whenHeld, whenHeld, whenPressed, whenPressed, whenPressed, whenReleased, whenReleased, whenReleased, whileHeld, whileHeld, whileHeld
      • Methods inherited from class edu.wpi.first.wpilibj2.command.button.Trigger

        and, cancelWhenActive, negate, or, toggleWhenActive, toggleWhenActive, whenActive, whenActive, whenActive, whenInactive, whenInactive, whenInactive, whileActiveContinuous, whileActiveContinuous, whileActiveContinuous, whileActiveOnce, whileActiveOnce
    • Constructor Detail

      • StrictDPadButton

        public StrictDPadButton​(@NotNull
                                @NotNull edu.wpi.first.wpilibj.GenericHID stick,
                                int pad,
                                @NotNull
                                DPadAxis axis)
        Constructs a StrictDPadButton.
        Parameters:
        stick - The joystick with the button.
        pad - The ID of the d-pad.
        axis - The axis of the button.
        Throws:
        NullPointerException - If stick or axis is null.
        IllegalArgumentException - If pad is negative.
    • Method Detail

      • get

        @Contract(pure=true)
        public boolean get()
        Overrides:
        get in class edu.wpi.first.wpilibj2.command.button.Trigger