From 2189d4a35b809a832d5d310ac7c45a8abe0e1a7b Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Thu, 19 Mar 2020 17:54:29 -0400 Subject: [PATCH] receiver: add new macro for old receivers and use it to set max devices to 6 for C517 --- lib/logitech_receiver/base_usb.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/logitech_receiver/base_usb.py b/lib/logitech_receiver/base_usb.py index 832024ab..7144f807 100644 --- a/lib/logitech_receiver/base_usb.py +++ b/lib/logitech_receiver/base_usb.py @@ -60,6 +60,17 @@ _nano_receiver_max2 = lambda product_id: { 're_pairs': True } +_nano_receiver_maxn = lambda product_id, max: { + 'vendor_id':0x046d, + 'product_id':product_id, + 'usb_interface':1, + 'hid_driver':_DRIVER, + 'name':'Nano Receiver', + 'max_devices': max, + 'may_unpair': False, + 're_pairs': True +} + _lenovo_receiver = lambda product_id: { 'vendor_id':0x17ef, 'product_id':product_id, @@ -84,7 +95,7 @@ UNIFYING_RECEIVER_C532 = _unifying_receiver(0xc532) NANO_RECEIVER_ADVANCED = _nano_receiver(0xc52f) # Nano receivers that don't support the Unifying protocol -NANO_RECEIVER_C517 = _nano_receiver_max2(0xc517) +NANO_RECEIVER_C517 = _nano_receiver_maxn(0xc517,6) NANO_RECEIVER_C518 = _nano_receiver(0xc518) NANO_RECEIVER_C51A = _nano_receiver(0xc51a) NANO_RECEIVER_C51B = _nano_receiver(0xc51b)