fixed reading correct device kind on link notification

This commit is contained in:
Daniel Pavel 2013-06-24 16:58:41 +02:00
parent 20dfc063ff
commit 375db9996f
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class PairedDevice(object):
self.online = bool(ord(link_notification.data[0:1]) & 0x40)
self.wpid = _strhex(link_notification.data[2:3] + link_notification.data[1:2])
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]
if unifying:

View File

@ -170,7 +170,7 @@ class ReceiverListener(_listener.EventsListener):
return
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.configuration = configuration
# the receiver changed status as well