don't know yet how to tell if the receiver supports the unifying protocol

This commit is contained in:
Daniel Pavel 2013-07-01 15:28:05 +02:00
parent ceba698678
commit 1194abf125
2 changed files with 7 additions and 11 deletions

View File

@ -86,7 +86,6 @@ def _print_receiver(receiver, verbose=False):
print ("Unifying Receiver")
print (" Device path :", receiver.path)
print (" USB id : 046d:%s" % receiver.product_id)
print (" Unifying : %s" % ('supported' if receiver.unifying_supported else 'not supported'))
print (" Serial :", receiver.serial)
for f in receiver.firmware:
print (" %-11s: %s" % (f.kind, f.version))
@ -121,12 +120,12 @@ def _print_device(dev, verbose=False):
print ("%d: %s" % (dev.number, dev.name))
print (" Codename :", dev.codename)
print (" Kind :", dev.kind)
if dev.protocol == 0:
print (" Protocol : unknown (device is offline)")
else:
print (" Protocol : HID++ %1.1f" % dev.protocol)
print (" Polling rate :", dev.polling_rate, "ms")
print (" Wireless PID :", dev.wpid)
if dev.protocol:
print (" Protocol : HID++ %1.1f" % dev.protocol)
else:
print (" Protocol : unknown (device is offline)")
print (" Polling rate :", dev.polling_rate, "ms")
print (" Serial number:", dev.serial)
for fw in dev.firmware:
print (" %-11s:" % fw.kind, (fw.name + ' ' + fw.version).strip())

View File

@ -472,17 +472,14 @@ def _update_details(button):
yield ('Path', device.path)
# 046d is the Logitech vendor id
yield ('USB id', '046d:' + device.product_id)
if device.unifying_supported:
yield ('Unifying', 'supported')
else:
yield ('Unifying', 'not supported')
else:
# yield ('Codename', device.codename)
yield ('Index', device.number)
yield ('Wireless PID', device.wpid)
hid_version = device.protocol
yield ('Protocol', 'HID++ %1.1f' % hid_version if hid_version else 'unknown')
if device.polling_rate:
yield ('Polling rate', '%d ms' % device.polling_rate)
yield ('Wireless PID', device.wpid)
yield ('Serial', device.serial)