device: show remaining pairings in show
This commit is contained in:
parent
1de3b2e472
commit
82a41bf46b
|
@ -1339,3 +1339,10 @@ def get_polling_rate(device):
|
|||
if state:
|
||||
rate = _unpack('!B', state[:1])[0]
|
||||
return rate
|
||||
|
||||
|
||||
def get_remaining_pairing(device):
|
||||
result = feature_request(device, FEATURE.REMAINING_PAIRING, 0x0)
|
||||
if result:
|
||||
result = _unpack('!B', result[:1])[0]
|
||||
return result
|
||||
|
|
|
@ -214,6 +214,8 @@ def _print_device(dev, num=None):
|
|||
print(' Unit ID: %s Model ID: %s Transport IDs: %s' % (unitId, modelId, tid_map))
|
||||
elif feature == _hidpp20.FEATURE.REPORT_RATE:
|
||||
print(' Polling Rate (ms): %d' % _hidpp20.get_polling_rate(dev))
|
||||
elif feature == _hidpp20.FEATURE.REMAINING_PAIRING:
|
||||
print(' Remaining Pairings: %d' % _hidpp20.get_remaining_pairing(dev))
|
||||
elif feature == _hidpp20.FEATURE.BATTERY_STATUS or feature == _hidpp20.FEATURE.BATTERY_VOLTAGE:
|
||||
print('', end=' ')
|
||||
_battery_line(dev)
|
||||
|
|
Loading…
Reference in New Issue