Skip to content

Commit

Permalink
device: expand allowable profile numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 20, 2024
1 parent b37e73f commit 1b0f78f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/logitech_receiver/settings_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class OnboardProfiles(_Setting):
description = _("Enable an onboard profile, which controls report rate, sensitivity, and button actions")
feature = _F.ONBOARD_PROFILES
choices_universe = _NamedInts(Disabled=0)
for i in range(1, 6):
for i in range(1, 16):
choices_universe[i] = f"Profile {i}"
validator_class = _ChoicesV

Expand Down Expand Up @@ -530,8 +530,8 @@ def build(cls, setting_class, device):
headers = _hidpp20.OnboardProfiles.get_profile_headers(device)
profiles_list = [setting_class.choices_universe[0]]
if headers:
for sector, enabled in headers:
if enabled:
for (sector, enabled) in headers:
if enabled and setting_class.choices_universe[sector]:
profiles_list.append(setting_class.choices_universe[sector])
return cls(choices=_NamedInts.list(profiles_list), byte_count=2) if len(profiles_list) > 1 else None

Expand Down

0 comments on commit 1b0f78f

Please sign in to comment.