Repository navigation
feat: support the Logitech G502 Lightspeed and G915 - #30
Merged
Merged
Conversation
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a second Logitech HID++ protocol for devices that report a battery voltage (
0x1001) instead of a percentage, with two models on it: the G502 Lightspeed (receiverC539, cableC08D) and the G915 keyboard (receiverC547, cableC33E). Closes #21 and part of #25. The protocol is based on the changes @Luckylucasv shared in #21.LogitechVoltageBatteryProtocolsits onLogitechHidppProtocol, the same as the existing mouse and headset protocols, at device index 1. Bytes 4-5 hold the voltage in mV, and byte 6 holds flags.0x1001table (hidpp20_map_battery_capacity), interpolated linearly. It's an estimate, since G HUB uses its own per-device table.PercentFromMillivoltsmoved intoLogitechHidppProtocol, and the headset protocol uses it too.0charging,1full,2not charging.C547receiver. The G915 has0x1001and no0x1004, so the existing fallback rule from feat: support the Logitech G502 X PLUS #29 keeps each one on its own receiver.Reads_the_raw_logitech_battery_voltageprints the raw mV and flags next to the parsed reading, for calibrating against G HUB.c539,c08dandc33e(c547is already there), with the guide's copy kept in sync.Checklist
dotnet buildanddotnet testpass locally (0 warnings, 343 tests).Device/hardware tested against (if applicable)
G502 Lightspeed: tested by its owner (@Luckylucasv) in #21 on Windows, on an earlier state of this branch (before the full kernel table and the no-level-while-charging change):
G915: tested by its owner (@ReqwiemG) in #25 on Windows, with the G502 X PLUS and PRO X 2 LIGHTSPEED on their own receivers and G HUB running:
0x80) while G HUB showed 82% charging. The plugin estimated 87% then, which is why charging now shows no percentage.