device: cut off noops even earlier

This commit is contained in:
Peter F. Patel-Schneider 2022-03-01 14:16:56 -05:00
parent 94ff454ace
commit 862fd9c110
1 changed files with 4 additions and 0 deletions

View File

@ -325,6 +325,10 @@ def make_notification(report_id, devnumber, data):
return
address = ord(data[1:2])
if sub_id == 0x00 and (address & 0x0F == 0x00):
# this is a no-op notification - don't do anything with it
return
if (
# standard HID++ 1.0 notification, SubId may be 0x40 - 0x7F
(sub_id >= 0x40) or # noqa: E131