diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py index 3367d4d9..376e7567 100644 --- a/lib/logitech_receiver/notifications.py +++ b/lib/logitech_receiver/notifications.py @@ -275,4 +275,22 @@ def _process_feature_notification(device, status, n, feature): _log.warn("%s: unknown TOUCH MOUSE %s", device, n) return True + if feature == _F.HIRES_WHEEL: + if (n.address == 0x00): + if _log.isEnabledFor(_INFO): + flags, delta_v = _unpack('>bh', n.data[:3]) + high_res = (flags & 0x10) != 0 + periods = flags & 0x0f + _log.info("%s: WHEEL: res: %d periods: %d delta V:%-3d", device, high_res, periods, delta_v) + return True + elif (n.address == 0x10): + if _log.isEnabledFor(_INFO): + flags = ord(n.data[:1]) + ratchet = flags & 0x01 + _log.info("%s: WHEEL: ratchet: %d", device, ratchet) + return True + else: + _log.warn("%s: unknown WHEEL %s", device, n) + return True + _log.warn("%s: unrecognized %s for feature %s (index %02X)", device, n, feature, n.sub_id)