Skip to content

Commit

Permalink
ui: handle backlight notification
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 5, 2024
1 parent e6c0ee2 commit fdf759a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/logitech_receiver/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,14 @@ def _process_feature_notification(device, status, n, feature):
else:
_log.warn('%s: unknown REPROG_CONTROLS %s', device, n)

elif feature == _F.BACKLIGHT2:
if (n.address == 0x00):
level = _unpack('!B', n.data[1:2])[0]
from solaar.ui.config_panel import record_setting # prevent circular import
setting = next((s for s in device.settings if s.name == _st.Backlight2.name), None)
if setting:
record_setting(device, setting, [level])

elif feature == _F.REPROG_CONTROLS_V4:
if n.address == 0x00:
if _log.isEnabledFor(_DEBUG):
Expand Down

0 comments on commit fdf759a

Please sign in to comment.