Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Dial status LEDs #805

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Conversation

whot
Copy link
Member

@whot whot commented Oct 23, 2024

libinput at least uses the status leds for grouping: our data file says
there's a status led for the ring and the toggle button for the ring is
B, and button are at position P. libinput then uses the fact that there
are two status LEDs to create two groups and matches the buttons
with the position of the mode toggle button (i.e. if button B is in
position P, all buttons in the same position P must belong to the same
mode group).

This requires that the status led for dials exists, so let's add them.

Fixes: b6b82e4 ("Add support for relative dials (#665)")

@whot whot force-pushed the wip/dial-leds branch 2 times, most recently from 77e3e60 to e2c25a3 Compare October 27, 2024 23:54
@whot
Copy link
Member Author

whot commented Oct 28, 2024

cc @Joshua-Dickens for an extra pair of eyeballs :)

This switches the config to a dict first so we can easily merge it, then
we can set up the ConfigParser from our merged dict.
Fixes: b6b82e4 ("Add support for relative dials (linuxwacom#665)")
The implementation looked like this returns an enum value but it
doesn't, the returned value is the numerical index of the LED group
(typically 0 and 1 for Ring/Ring2 but also 0 and 1 for Strip/Strip2
since we don't have devices with combined features).

Let's change the fallback to -1 too instead of the enum - same value but
it makes the code more obvious.
@whot whot merged commit dce3c18 into linuxwacom:master Nov 4, 2024
18 checks passed
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