fix(openrgb): follow the device when OpenRGB's device list changes #11
No reviewers
Labels
No labels
accessibility
bug
dependencies
documentation
duplicate
enhancement
go
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jwarykowski/keybars!11
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/openrgb-device-list"
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?
Why
OpenRGB announces device list changes unprompted: after a rescan, or when a device is plugged in or out. keybars only read from the server while waiting for a reply, so it never saw them. The keyboard could move to another index mid-run and its frames would go to whatever device took its place, and a rescan also resets devices to their saved mode, so the bars stopped showing.
What
RestoreAllgoes to the new index too.Testing
TestFollowsDeviceListChanges: the keyboard moves from index 0 to 1, then disappears, then comes back at 0. Checks SETCUSTOMMODE and the whole frame go to the new index each time, nothing is sent while it's gone, and restore goes to the right device. Disabling the follow makes it fail.TestSamecovers the matching rules: exact, replugged, twins told apart by serial, ambiguous twins, a different LED count, gone.TestLateReplyIsDropped: a stale reply in the queue doesn't answer a new request.go test -race ./...passes.Not verified
Still not run against real OpenRGB or a real keyboard.