Class RumbleManager

java.lang.Object
xbot.common.subsystems.feedback.RumbleManager
All Implemented Interfaces:
XRumbleManager

public class RumbleManager extends Object implements XRumbleManager
Wrappers around gamepad rumble behavior to control intensity and duration.
  • Constructor Details

    • RumbleManager

      @AssistedInject public RumbleManager(@Assisted("gamepad") XJoystick gamepad)
      Creates a new RumbleManager instance.
      Parameters:
      gamepad - The gamepad in which to control rumble on.
  • Method Details

    • stopGamepadRumble

      public void stopGamepadRumble()
      Description copied from interface: XRumbleManager
      Immediately stops rumbling on the gamepad.
      Specified by:
      stopGamepadRumble in interface XRumbleManager
    • rumbleGamepad

      public void rumbleGamepad(double intensity, double length)
      Description copied from interface: XRumbleManager
      Rumbles the gamepad at the specified intensity for the given duration.
      Specified by:
      rumbleGamepad in interface XRumbleManager
      Parameters:
      intensity - Rumble intensity, between 0 and 1.
      length - Rumble duration, in seconds
    • getIsRumbling

      public boolean getIsRumbling()
      Description copied from interface: XRumbleManager
      Gets the current rumble state.
      Specified by:
      getIsRumbling in interface XRumbleManager
      Returns:
      true if the gamepad is currently rumbling.
    • periodic

      public void periodic()
      Description copied from interface: XRumbleManager
      Called periodically to update the rumble state.
      Specified by:
      periodic in interface XRumbleManager