Three cleanup fixes after field testing confirmed the brute-force probe
finds device_addr=0x23 on the G522 (no special addresses at 0x00/0xFF):
1. Short-circuit the probe on first hit instead of sweeping all 256. The
diagnostic full-sweep served its purpose — only 0x23 responds.
2. Drop per-candidate read timeout from 20ms to 5ms. USB round-trip is
<1ms, so 5ms is 5x margin. Worst case: 1.3s. Typical: 180ms.
3. Short-circuit FeaturesArray.__getitem__ for Centurion devices. All
parent + sub-device features are enumerated upfront by
_check_centurion(). If a feature isn't in the dict after _check(),
it genuinely doesn't exist — skip the raw ROOT.GetFeature query that
the dongle rejects with LOGITECH_ERROR. Eliminates cycling
{0002}..{000F} error log spam during settings init and speeds up
check_feature_settings() by ~225 round trips per device.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| fake_hidpp.py | ||
| test_base.py | ||
| test_base_usb.py | ||
| test_common.py | ||
| test_desktop_notifications.py | ||
| test_device.py | ||
| test_diversion.py | ||
| test_hidpp10.py | ||
| test_hidpp20_complex.py | ||
| test_hidpp20_simple.py | ||
| test_notifications.py | ||
| test_receiver.py | ||
| test_setting_templates.py | ||
| test_settings_validator.py | ||