Package xbot.common.subsystems.feedback
Class RumbleManager
java.lang.Object
xbot.common.subsystems.feedback.RumbleManager
- All Implemented Interfaces:
XRumbleManager
Wrappers around gamepad rumble behavior to control intensity and duration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface xbot.common.subsystems.feedback.XRumbleManager
XRumbleManager.XRumbleManagerFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the current rumble state.void
periodic()
Called periodically to update the rumble state.void
rumbleGamepad
(double intensity, double length) Rumbles the gamepad at the specified intensity for the given duration.void
Immediately stops rumbling on the gamepad.
-
Constructor Details
-
RumbleManager
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 interfaceXRumbleManager
-
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 interfaceXRumbleManager
- 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 interfaceXRumbleManager
- 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 interfaceXRumbleManager
-