Skip to content

Commit

Permalink
ui: use Report Rate instead of Polling for movement report rate
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Jan 30, 2024
1 parent 91d0cfa commit 25731b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions lib/logitech_receiver/settings_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,10 @@ class OnboardProfiles(_Setting):

class ReportRate(_Setting):
name = 'report_rate'
label = _('Polling Rate')
description = (_('Frequency of device polling') + '\n' + _('May need Onboard Profiles set to Disable to be effective.'))
label = _('Report Rate')
description = (
_('Frequency of device movement reports') + '\n' + _('May need Onboard Profiles set to Disable to be effective.')
)
feature = _F.REPORT_RATE
rw_options = {'read_fnid': 0x10, 'write_fnid': 0x20}
choices_universe = _NamedInts()
Expand Down Expand Up @@ -367,8 +369,10 @@ def build(cls, setting_class, device):

class ExtendedReportRate(_Setting):
name = 'report_rate_extended'
label = _('Polling Frequency')
description = (_('Frequency of device polling') + '\n' + _('May need Onboard Profiles set to Disable to be effective.'))
label = _('Report Rate')
description = (
_('Frequency of device movement reports') + '\n' + _('May need Onboard Profiles set to Disable to be effective.')
)
feature = _F.EXTENDED_ADJUSTABLE_REPORT_RATE
rw_options = {'read_fnid': 0x20, 'write_fnid': 0x30}
choices_universe = _NamedInts()
Expand Down
4 changes: 2 additions & 2 deletions lib/solaar/cli/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _print_device(dev, num=None):
else:
print(' Protocol : unknown (device is offline)')
if dev.polling_rate:
print(' Polling rate :', dev.polling_rate)
print(' Report Rate :', dev.polling_rate)
print(' Serial number:', dev.serial)
if dev.modelId:
print(' Model ID: ', dev.modelId)
Expand Down Expand Up @@ -218,7 +218,7 @@ def _print_device(dev, num=None):
unitId, modelId, tid_map = ids
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:
print(' Polling Rate: %s' % _hidpp20.get_polling_rate(dev))
print(' Report Rate: %s' % _hidpp20.get_polling_rate(dev))
elif feature == _hidpp20.FEATURE.REMAINING_PAIRING:
print(' Remaining Pairings: %d' % _hidpp20.get_remaining_pairing(dev))
elif feature == _hidpp20.FEATURE.ONBOARD_PROFILES:
Expand Down

0 comments on commit 25731b3

Please sign in to comment.