java.lang.Object
com.stuypulse.stuylib.input.Gamepad
com.stuypulse.stuylib.input.gamepads.Xbox
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
Direct Known Subclasses:
Logitech.XMode

public class Xbox extends Gamepad
A wrapper for the XboxController class to work with the Gamepad interface.
  • Constructor Details

    • Xbox

      public Xbox(edu.wpi.first.wpilibj.XboxController joystick)
    • Xbox

      protected Xbox(edu.wpi.first.wpilibj.XboxController joystick, boolean flipped)
    • Xbox

      public Xbox(int port)
  • Method Details

    • getJoystick

      public edu.wpi.first.wpilibj.XboxController getJoystick()
    • getGamepadName

      public String getGamepadName()
      Overrides:
      getGamepadName in class Gamepad
      Returns:
      The name of the gamepad being used
    • getLeftX

      public double getLeftX()
      Overrides:
      getLeftX in class Gamepad
      Returns:
      The X position of the left analog stick
    • getLeftY

      public double getLeftY()
      Overrides:
      getLeftY in class Gamepad
      Returns:
      The Y position of the left analog stick
    • getRightX

      public double getRightX()
      Overrides:
      getRightX in class Gamepad
      Returns:
      The X position of the right analog stick
    • getRightY

      public double getRightY()
      Overrides:
      getRightY in class Gamepad
      Returns:
      The Y position of the right analog stick
    • getRawDPadUp

      public boolean getRawDPadUp()
      Overrides:
      getRawDPadUp in class Gamepad
      Returns:
      If the up d-pad button is pressed
    • getRawDPadDown

      public boolean getRawDPadDown()
      Overrides:
      getRawDPadDown in class Gamepad
      Returns:
      If the down d-pad button is pressed
    • getRawDPadLeft

      public boolean getRawDPadLeft()
      Overrides:
      getRawDPadLeft in class Gamepad
      Returns:
      If the left d-pad button is pressed
    • getRawDPadRight

      public boolean getRawDPadRight()
      Overrides:
      getRawDPadRight in class Gamepad
      Returns:
      If the right d-pad button is pressed
    • getRawLeftBumper

      public boolean getRawLeftBumper()
      Overrides:
      getRawLeftBumper in class Gamepad
      Returns:
      If the left bumper is pressed
    • getRawRightBumper

      public boolean getRawRightBumper()
      Overrides:
      getRawRightBumper in class Gamepad
      Returns:
      If the right bumper is pressed
    • getLeftTrigger

      public double getLeftTrigger()
      Overrides:
      getLeftTrigger in class Gamepad
      Returns:
      The amount that the left trigger is pressed
    • getRightTrigger

      public double getRightTrigger()
      Overrides:
      getRightTrigger in class Gamepad
      Returns:
      The amount that the right trigger is pressed
    • getRawLeftButton

      public boolean getRawLeftButton()
      Overrides:
      getRawLeftButton in class Gamepad
      Returns:
      If the face button on the left is pressed
    • getRawBottomButton

      public boolean getRawBottomButton()
      Overrides:
      getRawBottomButton in class Gamepad
      Returns:
      If the face button on the bottom is pressed
    • getRawRightButton

      public boolean getRawRightButton()
      Overrides:
      getRawRightButton in class Gamepad
      Returns:
      If the face button on the right is pressed
    • getRawTopButton

      public boolean getRawTopButton()
      Overrides:
      getRawTopButton in class Gamepad
      Returns:
      If the face button on the top is pressed
    • getRawLeftMenuButton

      public boolean getRawLeftMenuButton()
      Overrides:
      getRawLeftMenuButton in class Gamepad
      Returns:
      If the left menu button is pressed
    • getRawRightMenuButton

      public boolean getRawRightMenuButton()
      Overrides:
      getRawRightMenuButton in class Gamepad
      Returns:
      If the right menu button is pressed
    • getRawLeftStickButton

      public boolean getRawLeftStickButton()
      Overrides:
      getRawLeftStickButton in class Gamepad
      Returns:
      If the left analog stick is pressed down
    • getRawRightStickButton

      public boolean getRawRightStickButton()
      Overrides:
      getRawRightStickButton in class Gamepad
      Returns:
      If the right analog stick is pressed down
    • setRumble

      public void setRumble(double intensity)
      Overrides:
      setRumble in class Gamepad
      Parameters:
      intensity - amount to make the gamepad rumble
    • flipped

      public Xbox flipped()