fixed reading correct device kind on link notification
This commit is contained in:
parent
20dfc063ff
commit
375db9996f
|
@ -55,7 +55,7 @@ class PairedDevice(object):
|
||||||
self.online = bool(ord(link_notification.data[0:1]) & 0x40)
|
self.online = bool(ord(link_notification.data[0:1]) & 0x40)
|
||||||
self.wpid = _strhex(link_notification.data[2:3] + link_notification.data[1:2])
|
self.wpid = _strhex(link_notification.data[2:3] + link_notification.data[1:2])
|
||||||
assert link_notification.address == (0x04 if unifying else 0x03)
|
assert link_notification.address == (0x04 if unifying else 0x03)
|
||||||
kind = ord(link_notification.data[1:2]) & 0x0F
|
kind = ord(link_notification.data[0:1]) & 0x0F
|
||||||
self._kind = _hidpp10.DEVICE_KIND[kind]
|
self._kind = _hidpp10.DEVICE_KIND[kind]
|
||||||
|
|
||||||
if unifying:
|
if unifying:
|
||||||
|
|
|
@ -170,7 +170,7 @@ class ReceiverListener(_listener.EventsListener):
|
||||||
return
|
return
|
||||||
|
|
||||||
if not already_known:
|
if not already_known:
|
||||||
# _log.info("%s triggered new device %s", n, dev)
|
_log.info("%s triggered new device %s (%s)", n, dev, dev.kind)
|
||||||
dev.status = _status.DeviceStatus(dev, self._status_changed)
|
dev.status = _status.DeviceStatus(dev, self._status_changed)
|
||||||
dev.status.configuration = configuration
|
dev.status.configuration = configuration
|
||||||
# the receiver changed status as well
|
# the receiver changed status as well
|
||||||
|
|
Loading…
Reference in New Issue