Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler committed Sep 1, 2024
1 parent 9335bf5 commit 6470ae3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/gui/MItem_menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,7 @@ void MI_LEDS_ENABLE::OnChange(size_t old_index) {
static constexpr NumericInputConfig led_display_backlight_brightness_spin_config = {
// Keep a min value of 2 percent to make sure the user can still see the lcd content if changed by mistake
.min_value = 2,
.max_value = 100,
.special_value = 0
.max_value = 100
};

MI_DISPLAY_BACKLIGHT_BRIGHTNESS::MI_DISPLAY_BACKLIGHT_BRIGHTNESS()
Expand Down
4 changes: 3 additions & 1 deletion src/guiapi/src/gui_leds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ Neopixels &getNeopixels() {
void leds::Init() {
// Turn on LCD backlight
// TODO move display_backlight_brightness to display
leds::display_backlight_brightness(leds::get_display_backlight_brightness());
uint8_t value = leds::get_display_backlight_brightness();
// Safety: Make sure that the display is never turned off (value=0) on reboot/reset !
leds::display_backlight_brightness(value == 0 ? 100 : value);
leds::TickLoop();

#if HAS_SIDE_LEDS()
Expand Down

0 comments on commit 6470ae3

Please sign in to comment.