receiver: use Bolt unique ID as serial number
This commit is contained in:
parent
4bc3799e96
commit
5acc216e12
|
@ -123,6 +123,7 @@ REGISTERS = _NamedInts(
|
|||
receiver_info=0x2B5,
|
||||
bolt_device_discovery=0xC0,
|
||||
bolt_pairing=0x2C1,
|
||||
bolt_uniqueId=0x02FB,
|
||||
|
||||
# only apply to devices
|
||||
mouse_button_flags=0x01,
|
||||
|
|
|
@ -63,7 +63,10 @@ class Receiver:
|
|||
|
||||
# read the serial immediately, so we can find out max_devices
|
||||
if self.receiver_kind == 'bolt':
|
||||
serial_reply = None
|
||||
serial_reply = self.read_register(_R.bolt_uniqueId)
|
||||
self.serial = _strhex(serial_reply)
|
||||
self.max_devices = product_info.get('max_devices', 1)
|
||||
self.may_unpair = product_info.get('may_unpair', False)
|
||||
else:
|
||||
serial_reply = self.read_register(_R.receiver_info, _IR.receiver_information)
|
||||
if serial_reply:
|
||||
|
|
Loading…
Reference in New Issue