settings: fix bug when reading BACKLIGHT setting from device

This commit is contained in:
Peter F. Patel-Schneider 2024-03-01 16:03:39 -05:00
parent 7ef3059b69
commit ad0f9ec712
1 changed files with 2 additions and 2 deletions

View File

@ -270,9 +270,9 @@ class Backlight2(_Setting):
def read(self, device):
backlight = device.backlight
if not backlight.enabled:
return 0xFF
return b"\xFF"
else:
return backlight.mode
return _int2bytes(backlight.mode, 1)
def write(self, device, data_bytes):
backlight = device.backlight