Class MockXboxControllerAdapter

java.lang.Object
xbot.common.controls.sensors.XJoystick
xbot.common.controls.sensors.XXboxController
xbot.common.controls.sensors.mock_adapters.MockXboxControllerAdapter
All Implemented Interfaces:
IGamepad, IRumbler

public class MockXboxControllerAdapter extends XXboxController
  • Constructor Details

  • Method Details

    • setLeftStick

      public void setLeftStick(double x, double y)
    • setLeftStick

      public void setLeftStick(XYPair xy)
    • setRightStick

      public void setRightStick(double x, double y)
    • setRightStick

      public void setRightStick(XYPair xy)
    • setRawLeftStick

      public void setRawLeftStick(XYPair xy)
      Needed for a few scenarios where we want to emulate the underlying joystick behavior and not the intent after inversion.
      Parameters:
      xy - XYPair to directly set. (Remember that by default, most joysticks have an inverted Y axis!)
    • setRawRightStick

      public void setRawRightStick(XYPair xy)
      Needed for a few scenarios where we want to emulate the underlying joystick behavior and not the intent after inversion.
      Parameters:
      xy - XYPair to directly set. (Remember that by default, most joysticks have an inverted Y axis!)
    • setLeftTrigger

      public void setLeftTrigger(double left)
    • setRightTrigger

      public void setRightTrigger(double right)
    • setButton

      public void setButton(org.wpilib.driverstation.XboxController.Button button, boolean pressed)
    • getButton

      public boolean getButton(int button)
      Specified by:
      getButton in class XJoystick
    • getButton

      public boolean getButton(org.wpilib.driverstation.XboxController.Button button)
      Specified by:
      getButton in class XXboxController
    • getRawAxis

      public double getRawAxis(int axis)
      Specified by:
      getRawAxis in class XJoystick
    • getAxis

      public double getAxis(org.wpilib.driverstation.XboxController.Axis axis)
      Specified by:
      getAxis in class XXboxController
    • getPOV

      public org.wpilib.driverstation.POVDirection getPOV()
      Specified by:
      getPOV in class XJoystick
    • getHID

      public org.wpilib.driverstation.GenericHID getHID()
      Specified by:
      getHID in class XJoystick
    • getRumbleManager

      public XRumbleManager getRumbleManager()
      Specified by:
      getRumbleManager in interface IRumbler
      Overrides:
      getRumbleManager in class XXboxController
    • getLeftTrigger

      public double getLeftTrigger()
    • getRightTrigger

      public double getRightTrigger()
    • getLeftX

      protected double getLeftX()
      Specified by:
      getLeftX in class XXboxController
    • getLeftY

      protected double getLeftY()
      Specified by:
      getLeftY in class XXboxController
    • getRightX

      protected double getRightX()
      Specified by:
      getRightX in class XXboxController
    • getRightY

      protected double getRightY()
      Specified by:
      getRightY in class XXboxController