mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-03 22:30:22 +00:00
[PR #122] [MERGED] Fix relay/poll PID collision halving delivered rate in Steam mode #211
Labels
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
safijari/openpuck#211
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/safijari/openpuck/pull/122
Author: @Copilot
Created: 7/4/2026
Status: ✅ Merged
Merged: 7/6/2026
Merged by: @safijari
Base:
main← Head:copilot/mouse-smoothness-issue📝 Commits (6)
2ff9ee2Fix RF poll rate jitter: skip session beacon RX, poll before beacons12a37cfFix comment formatting per style guidef3142c6Fix relay/poll PID collision halving F1 rate in Steam modead3169fMerge branch 'main' into copilot/mouse-smoothness-issued6bf914Mouse very smooth now but overpollinged55ee8Go back to a fixed 250hz polling📊 Changes
9 files changed (+157 additions, -34 deletions)
View changed files
📝
OpenPuck/config.cpp(+5 -3)📝
OpenPuck/config.h(+10 -3)📝
OpenPuck/haptics.cpp(+21 -3)📝
OpenPuck/haptics.h(+6 -2)📝
OpenPuck/puck_hid.cpp(+44 -5)📝
OpenPuck/puck_hid.h(+4 -0)📝
OpenPuck/rf_link.cpp(+29 -16)📝
OpenPuck/rf_link.h(+3 -2)📝
OpenPuck/serial_console.cpp(+35 -0)📄 Description
In Steam mode the WebUSB panel's "Delivered" rate showed ~120 Hz instead of ~250 Hz.
g_relayPidandg_pollPidboth initialized to0and incremented once per cycle, keeping them permanently equal. Whenever a relay frame preceded the E3 GET in the same cycle, the controller's ESB deduplicator saw the same 2-bit PID on both packets and discarded the GET — no F1 reply. Steam mode is the only mode where the relay queue is almost always non-empty (continuous 0x87 keepalives + haptic commands), so ~50% of E3 polls were silently dropped.Changes
rf_link.cpp— initializeg_relayPidto{2, 2, 2, 2}instead of{}. Both counters still increment once per cycle, so they stay(pollPid + 2) mod 4forever and can never collide.haptics.h— update comment to document the offset invariant rather than just stating the requirement.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.