Skip to content

Commit

Permalink
device: allow return device 00 for BT device ff
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Sep 15, 2023
1 parent ec54b1b commit 30c270a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logitech_receiver/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def ping(handle, devnumber, long_message=False):
reply = _read(handle, _PING_TIMEOUT)
if reply:
report_id, reply_devnumber, reply_data = reply
if reply_devnumber == devnumber:
if reply_devnumber == devnumber or reply_devnumber == devnumber ^ 0xff: # BT device returning 0x00
if reply_data[:2] == request_data[:2] and reply_data[4:5] == request_data[-1:]:
# HID++ 2.0+ device, currently connected
return ord(reply_data[2:3]) + ord(reply_data[3:4]) / 10.0
Expand Down

0 comments on commit 30c270a

Please sign in to comment.