mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-04 06:34:45 +00:00
[PR #135] [MERGED] Switch Pro: report non-charging state and per-slot battery level #222
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#222
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/135
Author: @Copilot
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/6/2026
Merged by: @safijari
Base:
main← Head:copilot/update-switch-pro-mode📝 Commits (5)
5d31c8fUpdate Switch Pro battery and charging flagsdcf91fcFinalize Switch Pro battery and charging reporting9a8e02cMerge branch 'main' into copilot/update-switch-pro-mode0e64cf5fmt75d9ec1Both slots now work correctly📊 Changes
4 files changed (+41 additions, -12 deletions)
View changed files
📝
OpenPuck/haptics.cpp(+3 -2)📝
OpenPuck/mode_switch_pro.cpp(+33 -7)📝
OpenPuck/puck_hid.cpp(+2 -1)📝
OpenPuck/serial_console.cpp(+3 -2)📄 Description
Switch Pro mode was always advertising
full + charging(0x91), so the console showed charging and 100% regardless of the actual controller state. This change makes report0x30/0x21battery metadata reflect each mapped controller’s real RF battery telemetry while keeping connection semantics intact.Battery byte now reflects real per-slot state
jcBatteryNibble(bond)to convertg_battery[bond](0x43 battery %) into Switch’s 4-bit 0..8 battery scale.Charging is no longer asserted
out[1] = 0x91with computed battery nibble +connection_info=1.Scope
mode_switch_pro.cpp; no protocol flow or report cadence changes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.