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 battery status for G930 #77

Merged
merged 2 commits into from
Apr 21, 2020
Merged

Add battery status for G930 #77

merged 2 commits into from
Apr 21, 2020

Conversation

tobiaspc
Copy link
Contributor

I simply ported (copied actually) it from https://github.com/Roliga/g930-battery-percentage

Seems to work quite good.

Issues:

  • Charging status is not read from the device
  • Runtime / Charge time is not read
  • During Charge, battery goes over 100%

I believe the code directly reads the voltage, maybe someone can improve that in a later step.

This is my first pullrequest, is everything in order?

src/devices/logitech_g930.c Outdated Show resolved Hide resolved
src/devices/logitech_g930.c Outdated Show resolved Hide resolved
src/devices/logitech_g930.c Outdated Show resolved Hide resolved
@Sapd
Copy link
Owner

Sapd commented Apr 21, 2020

Thanks for your submission, I made some comments.

I think the battery goes over 100%, because the battery of the owner of the other repository was already quite old and wasn't able to charge it completely.
You can probably set BATTERY_MAX safely to 100.

@tobiaspc
Copy link
Contributor Author

Thanks for the quick review, I think everything should now be correct.
My device is also quite old (from ~2012).
After a full day of charging, the program reports 100% with the current upper limit of 91. So either that limit is correct, or my battery is also dying.
Since I am about to replace the battery in a few days, I can verify the upper limit then with a fresh one.

If you want, you can pull this branch now. Either way, i am willing to investigate the protocol further, in order to get charging state / remaining time.

@Sapd Sapd merged commit 6c82e6f into Sapd:master Apr 21, 2020
@Sapd
Copy link
Owner

Sapd commented Apr 21, 2020

Yes, I included the current state.

@tobiaspc tobiaspc deleted the tobiaspc/g930-battery branch April 27, 2020 12:44
rpbaptist pushed a commit to rpbaptist/HeadsetControl that referenced this pull request May 31, 2024
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.

2 participants