Class TwoButtonTrigger

  • All Implemented Interfaces:
    java.util.function.BooleanSupplier

    public class TwoButtonTrigger
    extends edu.wpi.first.wpilibj2.command.button.Trigger
    Only performs the action, when both buttons are pressed. Can be used to guard against dangerous actions or to setup a set of "shift" operations if you run out of buttons.
    • Constructor Summary

      Constructors 
      Constructor Description
      TwoButtonTrigger​(edu.wpi.first.wpilibj2.command.button.JoystickButton b1, edu.wpi.first.wpilibj2.command.button.JoystickButton b2)  
    • 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.Trigger

        and, cancelWhenActive, debounce, debounce, getAsBoolean, negate, or, toggleWhenActive, toggleWhenActive, whenActive, whenActive, whenActive, whenInactive, whenInactive, whenInactive, whileActiveContinuous, whileActiveContinuous, whileActiveContinuous, whileActiveOnce, whileActiveOnce
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TwoButtonTrigger

        public TwoButtonTrigger​(edu.wpi.first.wpilibj2.command.button.JoystickButton b1,
                                edu.wpi.first.wpilibj2.command.button.JoystickButton b2)
    • Method Detail

      • get

        public boolean get()
        Overrides:
        get in class edu.wpi.first.wpilibj2.command.button.Trigger