mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-03 22:30:22 +00:00
[PR #53] [CLOSED] Fix Steam battery always showing 100% #174
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#174
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/53
Author: @Copilot
Created: 6/18/2026
Status: ❌ Closed
Base:
main← Head:copilot/fix-steam-battery-display-issue📝 Commits (1)
45380d5Fix Steam battery always showing 100%: defer 0x43 send when HID endpoint busy📊 Changes
1 file changed (+27 additions, -1 deletions)
View changed files
📝
OpenPuck/puck_hid.cpp(+27 -1)📄 Description
The 0x43 battery report and 0x45 input report are co-embedded in the same RF frame every ~2 s.
onReport45fires first and callssendReport(0x45), leaving the HID endpoint busy.onAuxReportruns immediately after butready()is alreadyfalse— the battery report is silently dropped every time, so Steam never receives it and defaults to 100%. WebUSB is unaffected because it readsg_batterydirectly from the raw RF byte.Changes
onAuxReport— whenready()is false, queue the report into a static 3-field buffer (g_pendingAuxRid / g_pendingAuxData / g_pendingAuxLen) instead of dropping it silentlytask()— drain the pending buffer on the next 4 ms cycle when the endpoint is free; slotted between the 0x79 connection-state send (highest priority) and the periodic 0x7B status sendA single-slot queue is sufficient:
task()drains every 4 ms and aux reports arrive at most once per ~2 s.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.