Assume 7 words for the DPI list response
HID++ 2.0 responses are 20 bytes, once you strip the 4 byte common header and 1 byte sensorIdx, you have 15 bytes left. Since DPI values are 16-bit words, only 14 bytes should be used.
This commit is contained in:
parent
aa7d1b6410
commit
d1858f747b
|
@ -172,7 +172,7 @@ def _feature_adjustable_dpi_choices(device):
|
|||
assert reply, 'Oops, DPI list cannot be retrieved!'
|
||||
dpi_list = []
|
||||
step = None
|
||||
for val in _unpack('!B7H', reply)[1:]:
|
||||
for val in _unpack('!7H', reply[1:1+14]):
|
||||
if val == 0:
|
||||
break
|
||||
if val >> 13 == 0b111:
|
||||
|
|
Loading…
Reference in New Issue