Skip to content

🛠️ Fixer: Mute FFB on session end or AI takeover (Fixes #79)#87

Open
google-labs-jules[bot] wants to merge 1 commit intomainfrom
fix/issue-79-ffb-jolt-mute-9698995554003029321
Open

🛠️ Fixer: Mute FFB on session end or AI takeover (Fixes #79)#87
google-labs-jules[bot] wants to merge 1 commit intomainfrom
fix/issue-79-ffb-jolt-mute-9698995554003029321

Conversation

@google-labs-jules
Copy link
Contributor

This PR addresses Issue #79, where users reported violent FFB jolts when crossing the finish line in offline sessions.

The root cause was that lmuFFB continued to process telemetry and output forces even after the game engine took control of the vehicle (AI takeover) or marked the player as finished. During these transitions, the game often sends extreme telemetry values that cause sudden spikes in force feedback.

The fix introduces a safety check in the high-frequency FFB thread (src/main.cpp) that consults the shared memory scoring data. FFB is now explicitly zeroed out if the player is not in control or if the session status is anything other than 'None' (e.g., Finished, DNF, DQ).

Logic was verified via a new comprehensive unit test (tests/test_issue_79.cpp) and manual code review. All existing physics and system tests passed.


PR created automatically by Jules for task 9698995554003029321 started by @coasting-nc

- Added mandatory FFB muting in src/main.cpp when the player is no longer in control (mControl != 0) or the session has finished (mFinishStatus != 0).
- Implemented robust bounds checking for vehicle indexing in scoring data.
- Added a new unit test suite (tests/test_issue_79.cpp) to verify the muting logic across multiple scenarios.
- Updated VERSION and CHANGELOG_DEV.md to v0.7.22.
- All 788 tests passing on Linux (headless).
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

0 participants