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.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.refresh = (actions.full_scan, self)
|
||||
self.rstatus.pair = None # (actions.pair, self)
|
||||
|
@ -194,7 +194,7 @@ class Watcher(Thread):
|
|||
updated = True
|
||||
self._device_status_changed(devstatus, C.STATUS.UNAVAILABLE)
|
||||
elif code == 0x11:
|
||||
status = devices.process_event(devstatus, data)
|
||||
status = devices.process_event(devstatus, data, self.listener)
|
||||
updated |= self._device_status_changed(devstatus, status)
|
||||
else:
|
||||
_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_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, d_firmware, features)
|
||||
devinfo = AttachedDeviceInfo(handle, devnumber, d_type, d_name, features)
|
||||
_l.log(_LOG_LEVEL, "(%d) found device %s", devnumber, devinfo)
|
||||
return devinfo
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ AttachedDeviceInfo = namedtuple('AttachedDeviceInfo', [
|
|||
'number',
|
||||
'type',
|
||||
'name',
|
||||
'firmware',
|
||||
'features'])
|
||||
|
||||
"""Firmware information."""
|
||||
|
|
|
@ -34,7 +34,8 @@ def scan_devices(receiver):
|
|||
print ("Device [%d] %s (%s)" % (devinfo.number, devinfo.name, devinfo.type))
|
||||
# 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))
|
||||
|
||||
for index in range(0, len(devinfo.features)):
|
||||
|
|
Loading…
Reference in New Issue