dropped firmware from standard device info
This commit is contained in:
parent
5da2d43b1c
commit
0255194b46
|
@ -51,7 +51,7 @@ class Watcher(Thread):
|
||||||
|
|
||||||
self.listener = None
|
self.listener = None
|
||||||
|
|
||||||
self.rstatus = _DevStatus(0, 0xFF, None, _UNIFYING_RECEIVER, None, None)
|
self.rstatus = _DevStatus(0, 0xFF, None, _UNIFYING_RECEIVER, ())
|
||||||
self.rstatus.max_devices = api.C.MAX_ATTACHED_DEVICES
|
self.rstatus.max_devices = api.C.MAX_ATTACHED_DEVICES
|
||||||
self.rstatus.refresh = (actions.full_scan, self)
|
self.rstatus.refresh = (actions.full_scan, self)
|
||||||
self.rstatus.pair = None # (actions.pair, self)
|
self.rstatus.pair = None # (actions.pair, self)
|
||||||
|
@ -194,7 +194,7 @@ class Watcher(Thread):
|
||||||
updated = True
|
updated = True
|
||||||
self._device_status_changed(devstatus, C.STATUS.UNAVAILABLE)
|
self._device_status_changed(devstatus, C.STATUS.UNAVAILABLE)
|
||||||
elif code == 0x11:
|
elif code == 0x11:
|
||||||
status = devices.process_event(devstatus, data)
|
status = devices.process_event(devstatus, data, self.listener)
|
||||||
updated |= self._device_status_changed(devstatus, status)
|
updated |= self._device_status_changed(devstatus, status)
|
||||||
else:
|
else:
|
||||||
_l.warn("unknown event code %02x", code)
|
_l.warn("unknown event code %02x", code)
|
||||||
|
|
|
@ -166,8 +166,7 @@ def get_device_info(handle, devnumber, name=None, features=None):
|
||||||
|
|
||||||
d_type = get_device_type(handle, devnumber, features)
|
d_type = get_device_type(handle, devnumber, features)
|
||||||
d_name = get_device_name(handle, devnumber, features) if name is None else name
|
d_name = get_device_name(handle, devnumber, features) if name is None else name
|
||||||
d_firmware = get_device_firmware(handle, devnumber, features)
|
devinfo = AttachedDeviceInfo(handle, devnumber, d_type, d_name, features)
|
||||||
devinfo = AttachedDeviceInfo(handle, devnumber, d_type, d_name, d_firmware, features)
|
|
||||||
_l.log(_LOG_LEVEL, "(%d) found device %s", devnumber, devinfo)
|
_l.log(_LOG_LEVEL, "(%d) found device %s", devnumber, devinfo)
|
||||||
return devinfo
|
return devinfo
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ AttachedDeviceInfo = namedtuple('AttachedDeviceInfo', [
|
||||||
'number',
|
'number',
|
||||||
'type',
|
'type',
|
||||||
'name',
|
'name',
|
||||||
'firmware',
|
|
||||||
'features'])
|
'features'])
|
||||||
|
|
||||||
"""Firmware information."""
|
"""Firmware information."""
|
||||||
|
|
|
@ -34,7 +34,8 @@ def scan_devices(receiver):
|
||||||
print ("Device [%d] %s (%s)" % (devinfo.number, devinfo.name, devinfo.type))
|
print ("Device [%d] %s (%s)" % (devinfo.number, devinfo.name, devinfo.type))
|
||||||
# print " Protocol %s" % devinfo.protocol
|
# print " Protocol %s" % devinfo.protocol
|
||||||
|
|
||||||
for fw in devinfo.firmware:
|
firmware = api.get_device_firmware(receiver, devinfo.number, features=devinfo.features)
|
||||||
|
for fw in firmware:
|
||||||
print (" %s firmware: %s version %s build %d" % (fw.type, fw.name, fw.version, fw.build))
|
print (" %s firmware: %s version %s build %d" % (fw.type, fw.name, fw.version, fw.build))
|
||||||
|
|
||||||
for index in range(0, len(devinfo.features)):
|
for index in range(0, len(devinfo.features)):
|
||||||
|
|
Loading…
Reference in New Issue