Skip to content

Send steering as a single button/state pair (fixes right paddle) - #4871

Merged
cagnulein merged 1 commit into
masterfrom
fix-zwiftplay-duplicate-left-right-signals
Aug 1, 2026
Merged

Send steering as a single button/state pair (fixes right paddle)#4871
cagnulein merged 1 commit into
masterfrom
fix-zwiftplay-duplicate-left-right-signals

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

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:

input message sent result
left paddle 01 18 01 19 00 ✅ steers
right paddle 01 18 00 19 01 ❌ nothing
button-mapped (via sendAction) 01 18 01 / 01 19 01 (single pair) ✅ both directions

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 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.o compiles cleanly
  • CI build
  • @sondregronas to confirm the right paddle now steers right without reassigning to buttons

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.
@cagnulein
cagnulein merged commit eb0edae into master Aug 1, 2026
26 of 28 checks passed
@cagnulein
cagnulein deleted the fix-zwiftplay-duplicate-left-right-signals branch August 1, 2026 12:43
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