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
create a power_supply for battery information (upower support) #2160
base: master
Are you sure you want to change the base?
Conversation
Looks somewhat reasonable from a very quick first look. Could you please look into the CI failure and fix it? |
the ci is complaining about the formatting even after i ran the autoformatter and only on the alpine ci |
Are you running astyle 3.4.10 on your machine also? Also the Ubuntu CI is just build-testing, all the other checks are only in the Alpine CI |
astyle 3.1 from nixos unstable |
formatting shouldn't be a problem anymore and it looks like the ci breaking isn't my fault this time |
Yeah it's okay now. That failure I'll look to fix, your change broke some silent expectations from this shell script |
…e the name more unique
|
I'm mostly confident in this now but when I plug in my mouse it shows a battery for the wired device and one for the wireless. I don't think that's incorrect but it seems unnecessary so should the wired version of wireless mice be ignored? |
Ignoring wireless mouse is maybe not ideal because they can be used as wired mice without the dongle but in that case the battery level is useless anyways. |
ci fixed now but I think it would be a lot simpler for the script and the C code if every case statement just called a simple macro |
@z3ntu got time to review this? |
Give me some time, I hope to find some time soon :) |
Only implemented for mice because I only have a viper v2.
Still need to only register a power_supply for mice that have a battery and generate a unique name for each power_supply.It also looks like for some reason when the mouse is plugged in upower says the battery is at 0% and the state is unknown.