Repository navigation
feat(logitech): add G PRO X 3 LIGHTSPEED battery and auto-off support - #618
Conversation
|
Three things before this goes in. The frame-level assertions are the right shape - breaking the prefix, the one-byte write, the truncation guard and the sidetone gate each fail a named assertion. 1. 2. The preservation isn't tested. The captured auto-sleep reply is auto preserved = LogitechGProX3Lightspeed::buildAutoSleepParams(15, std::array<uint8_t, 3> { 5, 1, 2 });
ASSERT_TRUE(preserved.hasValue(), "Sleep params should build from a full reply");
ASSERT_EQ(15, (*preserved)[0], "Minutes replaced");
ASSERT_EQ(1, (*preserved)[1], "Second timer field preserved");
ASSERT_EQ(2, (*preserved)[2], "Third timer field preserved");Checked both ways: passes as written, fails on "Second timer field preserved" with the fields hardcoded. This moves if you take point 1. 3. The README row was typed, not generated. Empty cells have four spaces where CI hasn't run on this yet; it needs a maintainer to release the workflows for a first-time contributor, which I'll do. Everything above is from a local build. |
|
I just learned by reading this PR that a new X3 exists. I let chatgpt make a diff: Logitech G PRO X 2 vs. G PRO X 3 LIGHTSPEED
headsetcontrol implementationThe PRO X 2 LIGHTSPEED supports a 5-band graphic equalizer with presets, which is already implemented and working correctly. Parametric equalizer support was incorrectly added to the PRO X 2 implementation and must be removed. The existing 5-band EQ and presets must remain unchanged. Seems I need to remove the parametric equ. from the X2 :( But in this PR its missing... |
Thanks for the review! Moved both auto-sleep methods into LogitechCenturionProtocol, keeping the explanation about the lighting timers. Added the nonzero preservation assertions and confirmed hardcoding zeros fails the test. Regenerated the README table and resolved the conflict with master. Local build and tests pass. Pushed the updates for another look. |
Adds Logitech G PRO X 3 LIGHTSPEED support through the LIGHTSPEED USB receiver (
046d:0b45). Users can query battery level and charging status with-band configure the auto-off timer with-i.The driver uses the shared Centurion protocol, discovers feature indexes at runtime, and preserves the additional auto-sleep fields when updating the timer. Sidetone and EQ are not exposed. The device is registered and listed in the README for Linux, macOS, and Windows.
Validation:
cmake --build build --target check -j 2passed: both CTest suites (integration_basic_runandunit_mock_devices), including the PRO X 3 captured-traffic tests.