From 27f0f105908e73d91f89964b49fa9d7afac4ae1a Mon Sep 17 00:00:00 2001 From: RudolphRiedel <31180093+RudolphRiedel@users.noreply.github.com> Date: Mon, 20 Apr 2020 14:03:00 +0200 Subject: [PATCH] Ensure brightness > 0 in ExtUI (#17611) --- .../lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp index 4e165aa448..325d0c07f2 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp @@ -158,6 +158,8 @@ void InterfaceSettingsScreen::onIdle() { switch (cmd.track_tag(value)) { case 2: screen_data.InterfaceSettingsScreen.brightness = float(value) * 128 / 0xFFFF; + if (screen_data.InterfaceSettingsScreen.brightness > 1) + screen_data.InterfaceSettingsScreen.brightness = 1; CLCD::set_brightness(screen_data.InterfaceSettingsScreen.brightness); SaveSettingsDialogBox::settingsChanged(); break;