Class VirtualJoystickButton

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

    public class VirtualJoystickButton
    extends JoystickButton
    Class to mock a joystick button from a hardware joystick axis.
    • Constructor Summary

      Constructors 
      Constructor Description
      VirtualJoystickButton​(JoystickAxis axis, double minimumValue, double maximumValue, boolean inverse)
      Constructs a VirtualJoystickButton.
    • Method Summary

      • 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, wait, wait, wait
    • Constructor Detail

      • VirtualJoystickButton

        public VirtualJoystickButton​(JoystickAxis axis,
                                     double minimumValue,
                                     double maximumValue,
                                     boolean inverse)
        Constructs a VirtualJoystickButton.
        Parameters:
        axis - The JoystickAxis to use as an input.
        minimumValue - The minimum value in [-1,1] (inclusive) the JoystickAxis can have for this to be considered pressed.
        maximumValue - The maximum value in [-1,1] (inclusive) the JoystickAxis can have for this to be considered pressed.
        inverse - If true, the button will be pressed *except* if it is between the minimum and maximum values.