Class XXboxController

java.lang.Object
xbot.common.controls.sensors.XJoystick
xbot.common.controls.sensors.XXboxController
All Implemented Interfaces:
IGamepad, IRumbler
Direct Known Subclasses:
MockXboxControllerAdapter, XboxControllerWpiAdapter

public abstract class XXboxController extends XJoystick implements IRumbler, IGamepad
  • Field Details

    • port

      protected final int port
    • leftXInversion

      protected boolean leftXInversion
    • leftYInversion

      protected boolean leftYInversion
    • rightXInversion

      protected boolean rightXInversion
    • rightYInversion

      protected boolean rightYInversion
    • rumbleManager

      protected final XRumbleManager rumbleManager
  • Constructor Details

  • Method Details

    • getRumbleManager

      public XRumbleManager getRumbleManager()
      Specified by:
      getRumbleManager in interface IRumbler
    • getXboxButtonIfAvailable

      public AdvancedXboxButtonTrigger getXboxButtonIfAvailable(org.wpilib.driverstation.XboxController.Button button)
    • onPovAllocated

      protected void onPovAllocated(org.wpilib.driverstation.POVDirection direction)
      Overrides:
      onPovAllocated in class XJoystick
    • getXboxAxisButtonIfAvailable

      public AdvancedXboxAxisTrigger getXboxAxisButtonIfAvailable(XXboxController.XboxAxisButton button)
    • getLeftVector

      public org.wpilib.math.geometry.Translation2d getLeftVector()
      Specified by:
      getLeftVector in interface IGamepad
    • getRightVector

      public org.wpilib.math.geometry.Translation2d getRightVector()
      Specified by:
      getRightVector in interface IGamepad
    • getLeftFieldOrientedVector

      public org.wpilib.math.geometry.Translation2d getLeftFieldOrientedVector()
      Specified by:
      getLeftFieldOrientedVector in interface IGamepad
    • getRightFieldOrientedVector

      public org.wpilib.math.geometry.Translation2d getRightFieldOrientedVector()
      Specified by:
      getRightFieldOrientedVector in interface IGamepad
    • setLeftInversion

      public void setLeftInversion(boolean xInverted, boolean yInverted)
      Specified by:
      setLeftInversion in interface IGamepad
    • setRightInversion

      public void setRightInversion(boolean xInverted, boolean yInverted)
      Specified by:
      setRightInversion in interface IGamepad
    • getLeftStickX

      public double getLeftStickX()
    • getRightStickX

      public double getRightStickX()
    • getLeftStickY

      public double getLeftStickY()
    • getRightStickY

      public double getRightStickY()
    • getButton

      public abstract boolean getButton(org.wpilib.driverstation.XboxController.Button button)
    • getAxis

      public abstract double getAxis(org.wpilib.driverstation.XboxController.Axis axis)
    • getLeftX

      protected abstract double getLeftX()
    • getLeftY

      protected abstract double getLeftY()
    • getRightX

      protected abstract double getRightX()
    • getRightY

      protected abstract double getRightY()