Skip to content

Commit 9ddb58b

Browse files
JohnAZoidbergquinchou77
authored andcommitted
fwk: KB auto brightness just one low level
You only need KB backlight if the environment is extremely dim and your keyboard is not illuminated. Even sometimes when you're in a fully dark room and you turn up your display brightness, if reflects off the environment and lights up the keyboard enough to see it. BUG=Backlight brightness sometimes toggles back and forth because there's no hysteresis. It doesn't need that many levels. And it doesn't need to be on when there's environmental light. BRANCH=fwk-main TEST=FN+SPACE to toggle kb backlight brightness to auto. You'll see backlight off, unless the environment is very dark (so dark you can't see the keycap labels) Signed-off-by: Daniel Schaefer <dhs@frame.work> (cherry picked from commit 5ecaaaa)
1 parent f6f3791 commit 9ddb58b

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

  • zephyr/program/framework/src

zephyr/program/framework/src/led.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,8 @@ void auto_als_led_brightness(void)
218218

219219
#ifdef CONFIG_PLATFORM_EC_KEYBOARD
220220
if (kbbl_auto_dim_is_enable()) {
221-
if (als_lux > 130)
222-
kb_brightness = KEYBOARD_BL_BRIGHTNESS_HIGH;
223-
else if (als_lux > 100)
224-
kb_brightness = KEYBOARD_BL_BRIGHTNESS_MED;
225-
else if (als_lux > 70)
226-
kb_brightness = KEYBOARD_BL_BRIGHTNESS_MED_LOW;
227-
else if (als_lux > 40)
228-
kb_brightness = KEYBOARD_BL_BRIGHTNESS_LOW;
221+
if (als_lux > 5)
222+
kb_brightness = KEYBOARD_BL_BRIGHTNESS_OFF;
229223
else
230224
kb_brightness = KEYBOARD_BL_BRIGHTNESS_ULT_LOW;
231225

0 commit comments

Comments
 (0)