mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-04 06:34:45 +00:00
[PR #86] [MERGED] feat: per-emulated-type LED brightness, persisted across mode switches #194
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#194
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/86
Author: @Copilot
Created: 6/25/2026
Status: ✅ Merged
Merged: 6/25/2026
Merged by: @safijari
Base:
main← Head:copilot/add-slider-for-controller-mode📝 Commits (2)
a4d7919feat: add per-type LED brightness slider, persist across mode switches (fixes #62)72f526estyle: address code review comments on LED brightness change📊 Changes
5 files changed (+57 additions, -25 deletions)
View changed files
📝
OpenPuck/config.cpp(+10 -7)📝
OpenPuck/config.h(+6 -0)📝
OpenPuck/haptics.cpp(+7 -0)📝
OpenPuck/webusb_config.cpp(+15 -10)📝
docs/index.html(+19 -8)📄 Description
In emulated modes (Xbox, Switch, PS5, DS4) nobody sends the LED brightness command — Steam owns that in Steam mode but nothing does in emulated modes, so the controller always comes up at full brightness regardless of what you had set.
Changes
TypeCfg+ flash — newuint8_t ledBrightfield (0 = no override / Auto, 1–100 = brightness %).CFG_MAGICbumped0xCA → 0xCB; old configs get clean defaults on first boot after upgrade.hapticReinit— appends an0x87 [0x2D][val][0x00]relay wheng_ledBright > 0. This is the same register Steam uses, already whitelisted for type-01 framing so the command actually lands.k=7added to the SET handler (field = 40 + et*8 + 7, value clamped 0–100).N%otherwise. Wired tosetField(40+et*8+7, val)onchange.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.