fix(backlight): Improve initial power on behaviour

This commit is contained in:
ReFil 2022-06-23 15:15:18 +01:00 committed by Pete Johanson
parent 709441412a
commit 38e079ef37

View file

@ -91,7 +91,9 @@ static int zmk_backlight_init(const struct device *_arg) {
LOG_ERR("Failed to load backlight settings: %d", rc); LOG_ERR("Failed to load backlight settings: %d", rc);
} }
#endif #endif
#if IS_ENABLED(CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB)
state.on = zmk_usb_is_powered();
#endif
return zmk_backlight_update(); return zmk_backlight_update();
} }