Send steering as a single button/state pair (fixes right paddle) - #4871
Merged
Conversation
Paddle steering went through sendSteering(), which packed *both* steer buttons into one button-state message, always with SteerLeft (0x18) first and SteerRight (0x19) second: left paddle -> "01 18 01 19 00" right paddle -> "01 18 00 19 01" If the app only acts on the leading button/state pair, a left press reads as "SteerLeft pressed" and works, while a right press reads as "SteerLeft released" and the trailing SteerRight pair is ignored -- so the right paddle silently does nothing. This matches exactly what @sondregronas reported in #4717 ("Right paddle only - it doesn't steer right as expected. Only left paddle does. Assigning to buttons and restarting app then it works as expected") and what his debug log shows: button-mapped steering goes through sendAction() and emits a single pair ("01 19 01"), and works in both directions; only the paddle path emits the packed two-pair message, and only its right direction fails. Route the paddles through the same single-pair path the working button mapping already uses.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #4869 (GitHub refused to reopen it after the branch was rewritten — that PR's original approach was wrong and caused a regression, see the analysis there).
Fixes the original report in #4717: "Right paddle only - it doesn't steer right as expected. Only left paddle does. Assigning to buttons and restarting app then it works as expected."
Root cause
Paddle steering went through
sendSteering(), which packed both steer buttons into a single button-state message, always with SteerLeft (0x18) first and SteerRight (0x19) second. From @sondregronas's debug log in #4717:0118 0119 000118 0019 01sendAction)01 18 01/01 19 01(single pair)If the app only acts on the leading button/state pair, a left press reads as "SteerLeft pressed" and works, while a right press reads as "SteerLeft released" — and the trailing
SteerRightpair is ignored, so the right paddle silently does nothing.This is the only explanation consistent with all three observed cases, in particular why assigning steering to regular buttons works in both directions (that path already emits a single pair).
Fix
Route the paddles through the same single-pair path the working button mapping already uses.
Test plan
mywhooshlink.ocompiles cleanly