Skip to content

Add configurable rumble rate limiting - #587

Open
KillianG wants to merge 1 commit into
ClassicOldSong:moonlight-noirfrom
KillianG:feature/rumble-rate-limit
Open

Add configurable rumble rate limiting#587
KillianG wants to merge 1 commit into
ClassicOldSong:moonlight-noirfrom
KillianG:feature/rumble-rate-limit

Conversation

@KillianG

@KillianG KillianG commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • add a configurable 0-100 ms minimum interval for normal and trigger rumble updates
  • coalesce bursts to the latest motor values while delivering zero-strength stop commands immediately
  • clear queued updates when controllers disconnect or streaming stops
  • make trigger rumble honor the existing Enable Rumble setting

Motivation

An XGIMI XR13A running Android 14 reproducibly restarts its Android framework during Artemis sessions with a DualSense controller. The native tombstone shows system_server aborting in the input stack:

Fatal signal 6 (SIGABRT) in InputReader
std::__1::__throw_bad_variant_access()
android::QueuedInputListener::flush()
android::InputReader::loopOnce()

Immediately before the crash, Artemis logs a dense burst of rumble updates. Disabling Apollo's forward_rumble option prevents the restart, but removes vibration entirely. This setting provides a client-side compatibility workaround without disabling rumble.

The default is 0 ms, preserving existing behavior. Stop commands bypass the limiter to avoid stuck vibration.

Testing

  • ANDROID_HOME=/usr/lib/android-sdk ./gradlew :app:compileNonRoot_gameDebugJavaWithJavac
  • ANDROID_HOME=/usr/lib/android-sdk ./gradlew :app:testNonRoot_gameDebugUnitTest --tests com.limelight.binding.input.RumbleRateLimiterTest --tests com.limelight.preferences.PreferenceConfigurationTest

The focused tests cover disabled behavior, latest-value coalescing, immediate stops, controller cancellation, and preference loading. The complete existing unit suite was also run; it retains five unrelated baseline failures in layout/startup/profile navigation tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant