Package org.team1540.rooster.triggers
Class StrictDPadButton
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.button.Trigger
-
- edu.wpi.first.wpilibj2.command.button.Button
-
- org.team1540.rooster.triggers.StrictDPadButton
-
public class StrictDPadButton extends edu.wpi.first.wpilibj2.command.button.Button
Version ofDPadButton
that ignores diagonal inputs.
-
-
Constructor Summary
Constructors Constructor Description StrictDPadButton(@NotNull edu.wpi.first.wpilibj.GenericHID stick, int pad, DPadAxis axis)
Constructs aStrictDPadButton
.
-
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 aStrictDPadButton
.- Parameters:
stick
- The joystick with the button.pad
- The ID of the d-pad.axis
- The axis of the button.- Throws:
NullPointerException
- Ifstick
oraxis
isnull
.IllegalArgumentException
- Ifpad
is negative.
-
-