Skip to content

set/import: commit config to controller flash after writing#1

Open
lucasp0927 wants to merge 1 commit into
OpenWinControls:mainfrom
lucasp0927:flash-persistence
Open

set/import: commit config to controller flash after writing#1
lucasp0927 wants to merge 1 commit into
OpenWinControls:mainfrom
lucasp0927:flash-persistence

Conversation

@lucasp0927

Copy link
Copy Markdown

Companion to OpenWinControls/libOpenWinControls#1, which makes
flushConfig() actually persist the config to flash on V2 controllers (full
analysis and hardware verification over there).

This just calls it: after a successful writeConfig() in the set and
import paths, so bindings survive reboot and suspend/resume without toggling
the mode switch. The flash commit takes ~12 s, so a heads-up is printed to
make clear the pause isn't a hang. flushConfig() is a base-class no-op, so
V1 controllers are unaffected.

Needs the libOpenWinControls submodule bumped once the lib PR merges.

Demo (GPD Win Mini 2025, fw 1.22, Bazzite)

Bind and flash-commit — then reboot or suspend with no switch toggle: the
binding holds.

$ time ./OpenWinControlsCLI-x86_64.AppImage --appimage-extract-and-run set l4 SYSRQ l4d 0 l4h 50 r4 PAUSE r4d 0 r4h 50
config applied, committing to controller flash (takes ~12s) ...

real    0m11.980s
user    0m0.037s
sys     0m0.047s

Call the new flushConfig() after a successful writeConfig() in both the
set and import paths, so V2 (Win Mini 2025 / 2f24:0137) mappings survive
reboot and suspend without toggling the mode switch or re-applying on
every boot. flushConfig() is a base-class no-op for V1 controllers.

The flash commit replays the official app's bracket choreography and
takes ~12s; print a heads-up so the pause is not mistaken for a hang.

Requires the libOpenWinControls flushConfig() implementation.
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