Class CommandStadiaController

java.lang.Object
edu.wpi.first.wpilibj2.command.button.CommandGenericHID
edu.wpi.first.wpilibj2.command.button.CommandStadiaController

A version of StadiaController with Trigger factories for command-based.
See Also:
  • Constructor Details

    • CommandStadiaController

      public CommandStadiaController(int port)
      Construct an instance of a controller.
      Parameters:
      port - The port index on the Driver Station that the controller is plugged into.
  • Method Details

    • getHID

      Get the underlying GenericHID object.
      Overrides:
      getHID in class CommandGenericHID
      Returns:
      the wrapped GenericHID object
    • a

      public Trigger a()
      Constructs a Trigger instance around the A button's digital signal.
      Returns:
      a Trigger instance representing the A button's digital signal attached to the default scheduler button loop.
      See Also:
    • a

      public Trigger a(EventLoop loop)
      Constructs a Trigger instance around the A button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the A button's digital signal attached to the given loop.
    • b

      public Trigger b()
      Constructs a Trigger instance around the B button's digital signal.
      Returns:
      a Trigger instance representing the B button's digital signal attached to the default scheduler button loop.
      See Also:
    • b

      public Trigger b(EventLoop loop)
      Constructs a Trigger instance around the B button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the B button's digital signal attached to the given loop.
    • x

      public Trigger x()
      Constructs a Trigger instance around the X button's digital signal.
      Returns:
      a Trigger instance representing the X button's digital signal attached to the default scheduler button loop.
      See Also:
    • x

      public Trigger x(EventLoop loop)
      Constructs a Trigger instance around the X button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the X button's digital signal attached to the given loop.
    • y

      public Trigger y()
      Constructs a Trigger instance around the Y button's digital signal.
      Returns:
      a Trigger instance representing the Y button's digital signal attached to the default scheduler button loop.
      See Also:
    • y

      public Trigger y(EventLoop loop)
      Constructs a Trigger instance around the Y button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Y button's digital signal attached to the given loop.
    • leftBumper

      public Trigger leftBumper()
      Constructs a Trigger instance around the left bumper button's digital signal.
      Returns:
      a Trigger instance representing the left bumper button's digital signal attached to the default scheduler button loop.
      See Also:
    • leftBumper

      public Trigger leftBumper(EventLoop loop)
      Constructs a Trigger instance around the left bumper button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the left bumper button's digital signal attached to the given loop.
    • rightBumper

      public Trigger rightBumper()
      Constructs a Trigger instance around the right bumper button's digital signal.
      Returns:
      a Trigger instance representing the right bumper button's digital signal attached to the default scheduler button loop.
      See Also:
    • rightBumper

      public Trigger rightBumper(EventLoop loop)
      Constructs a Trigger instance around the right bumper button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the right bumper button's digital signal attached to the given loop.
    • leftStick

      public Trigger leftStick()
      Constructs a Trigger instance around the left stick button's digital signal.
      Returns:
      a Trigger instance representing the left stick button's digital signal attached to the default scheduler button loop.
      See Also:
    • leftStick

      public Trigger leftStick(EventLoop loop)
      Constructs a Trigger instance around the left stick button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the left stick button's digital signal attached to the given loop.
    • rightStick

      public Trigger rightStick()
      Constructs a Trigger instance around the right stick button's digital signal.
      Returns:
      a Trigger instance representing the right stick button's digital signal attached to the default scheduler button loop.
      See Also:
    • rightStick

      public Trigger rightStick(EventLoop loop)
      Constructs a Trigger instance around the right stick button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the right stick button's digital signal attached to the given loop.
    • ellipses

      public Trigger ellipses()
      Constructs a Trigger instance around the ellipses button's digital signal.
      Returns:
      a Trigger instance representing the ellipses button's digital signal attached to the default scheduler button loop.
      See Also:
    • ellipses

      public Trigger ellipses(EventLoop loop)
      Constructs a Trigger instance around the ellipses button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the ellipses button's digital signal attached to the given loop.
    • hamburger

      public Trigger hamburger()
      Constructs a Trigger instance around the hamburger button's digital signal.
      Returns:
      a Trigger instance representing the hamburger button's digital signal attached to the default scheduler button loop.
      See Also:
    • hamburger

      public Trigger hamburger(EventLoop loop)
      Constructs a Trigger instance around the hamburger button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the hamburger button's digital signal attached to the given loop.
    • stadia

      public Trigger stadia()
      Constructs a Trigger instance around the stadia button's digital signal.
      Returns:
      a Trigger instance representing the stadia button's digital signal attached to the default scheduler button loop.
      See Also:
    • stadia

      public Trigger stadia(EventLoop loop)
      Constructs a Trigger instance around the stadia button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the stadia button's digital signal attached to the given loop.
    • rightTrigger

      Constructs a Trigger instance around the right trigger button's digital signal.
      Returns:
      a Trigger instance representing the right trigger button's digital signal attached to the default scheduler button loop.
      See Also:
    • rightTrigger

      Constructs a Trigger instance around the right trigger button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the right trigger button's digital signal attached to the given loop.
    • leftTrigger

      public Trigger leftTrigger()
      Constructs a Trigger instance around the left trigger button's digital signal.
      Returns:
      a Trigger instance representing the left trigger button's digital signal attached to the default scheduler button loop.
      See Also:
    • leftTrigger

      public Trigger leftTrigger(EventLoop loop)
      Constructs a Trigger instance around the left trigger button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the left trigger button's digital signal attached to the given loop.
    • google

      public Trigger google()
      Constructs a Trigger instance around the google button's digital signal.
      Returns:
      a Trigger instance representing the google button's digital signal attached to the default scheduler button loop.
      See Also:
    • google

      public Trigger google(EventLoop loop)
      Constructs a Trigger instance around the google button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the google button's digital signal attached to the given loop.
    • frame

      public Trigger frame()
      Constructs a Trigger instance around the frame button's digital signal.
      Returns:
      a Trigger instance representing the frame button's digital signal attached to the default scheduler button loop.
      See Also:
    • frame

      public Trigger frame(EventLoop loop)
      Constructs a Trigger instance around the frame button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the frame button's digital signal attached to the given loop.
    • getLeftX

      public double getLeftX()
      Get the X axis value of left side of the controller.
      Returns:
      The axis value.
    • getRightX

      public double getRightX()
      Get the X axis value of right side of the controller.
      Returns:
      The axis value.
    • getLeftY

      public double getLeftY()
      Get the Y axis value of left side of the controller.
      Returns:
      The axis value.
    • getRightY

      public double getRightY()
      Get the Y axis value of right side of the controller.
      Returns:
      The axis value.