ui: use Report Rate instead of Polling for movement report rate
This commit is contained in:
parent
db4e40e3ac
commit
a6f7507ce6
|
@ -327,8 +327,10 @@ class OnboardProfiles(_Setting):
|
||||||
|
|
||||||
class ReportRate(_Setting):
|
class ReportRate(_Setting):
|
||||||
name = 'report_rate'
|
name = 'report_rate'
|
||||||
label = _('Polling Rate')
|
label = _('Report Rate')
|
||||||
description = (_('Frequency of device polling') + '\n' + _('May need Onboard Profiles set to Disable to be effective.'))
|
description = (
|
||||||
|
_('Frequency of device movement reports') + '\n' + _('May need Onboard Profiles set to Disable to be effective.')
|
||||||
|
)
|
||||||
feature = _F.REPORT_RATE
|
feature = _F.REPORT_RATE
|
||||||
rw_options = {'read_fnid': 0x10, 'write_fnid': 0x20}
|
rw_options = {'read_fnid': 0x10, 'write_fnid': 0x20}
|
||||||
choices_universe = _NamedInts()
|
choices_universe = _NamedInts()
|
||||||
|
@ -367,8 +369,10 @@ class ReportRate(_Setting):
|
||||||
|
|
||||||
class ExtendedReportRate(_Setting):
|
class ExtendedReportRate(_Setting):
|
||||||
name = 'report_rate_extended'
|
name = 'report_rate_extended'
|
||||||
label = _('Polling Frequency')
|
label = _('Report Rate')
|
||||||
description = (_('Frequency of device polling') + '\n' + _('May need Onboard Profiles set to Disable to be effective.'))
|
description = (
|
||||||
|
_('Frequency of device movement reports') + '\n' + _('May need Onboard Profiles set to Disable to be effective.')
|
||||||
|
)
|
||||||
feature = _F.EXTENDED_ADJUSTABLE_REPORT_RATE
|
feature = _F.EXTENDED_ADJUSTABLE_REPORT_RATE
|
||||||
rw_options = {'read_fnid': 0x20, 'write_fnid': 0x30}
|
rw_options = {'read_fnid': 0x20, 'write_fnid': 0x30}
|
||||||
choices_universe = _NamedInts()
|
choices_universe = _NamedInts()
|
||||||
|
|
|
@ -102,7 +102,7 @@ def _print_device(dev, num=None):
|
||||||
else:
|
else:
|
||||||
print(' Protocol : unknown (device is offline)')
|
print(' Protocol : unknown (device is offline)')
|
||||||
if dev.polling_rate:
|
if dev.polling_rate:
|
||||||
print(' Polling rate :', dev.polling_rate)
|
print(' Report Rate :', dev.polling_rate)
|
||||||
print(' Serial number:', dev.serial)
|
print(' Serial number:', dev.serial)
|
||||||
if dev.modelId:
|
if dev.modelId:
|
||||||
print(' Model ID: ', dev.modelId)
|
print(' Model ID: ', dev.modelId)
|
||||||
|
@ -218,7 +218,7 @@ def _print_device(dev, num=None):
|
||||||
unitId, modelId, tid_map = ids
|
unitId, modelId, tid_map = ids
|
||||||
print(' Unit ID: %s Model ID: %s Transport IDs: %s' % (unitId, modelId, tid_map))
|
print(' Unit ID: %s Model ID: %s Transport IDs: %s' % (unitId, modelId, tid_map))
|
||||||
elif feature == _hidpp20.FEATURE.REPORT_RATE or feature == _hidpp20.FEATURE.EXTENDED_ADJUSTABLE_REPORT_RATE:
|
elif feature == _hidpp20.FEATURE.REPORT_RATE or feature == _hidpp20.FEATURE.EXTENDED_ADJUSTABLE_REPORT_RATE:
|
||||||
print(' Polling Rate: %s' % _hidpp20.get_polling_rate(dev))
|
print(' Report Rate: %s' % _hidpp20.get_polling_rate(dev))
|
||||||
elif feature == _hidpp20.FEATURE.REMAINING_PAIRING:
|
elif feature == _hidpp20.FEATURE.REMAINING_PAIRING:
|
||||||
print(' Remaining Pairings: %d' % _hidpp20.get_remaining_pairing(dev))
|
print(' Remaining Pairings: %d' % _hidpp20.get_remaining_pairing(dev))
|
||||||
elif feature == _hidpp20.FEATURE.ONBOARD_PROFILES:
|
elif feature == _hidpp20.FEATURE.ONBOARD_PROFILES:
|
||||||
|
|
Loading…
Reference in New Issue