Skip to content

Commit ca1bedf

Browse files
committed
Revert "🩹 Fix Color UI touchscreen sleep (MarlinFirmware#24826)"
This reverts commit fcf9f22.
1 parent 8298a47 commit ca1bedf

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Marlin/src/lcd/marlinui.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,11 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
196196

197197
uint8_t MarlinUI::sleep_timeout_minutes; // Initialized by settings.load()
198198
millis_t MarlinUI::screen_timeout_millis = 0;
199-
#if DISABLED(TFT_COLOR_UI)
200-
void MarlinUI::refresh_screen_timeout() {
201-
screen_timeout_millis = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0;
202-
sleep_display(false);
203-
}
204-
#endif
199+
void MarlinUI::refresh_screen_timeout() {
200+
screen_timeout_millis = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0;
201+
sleep_display(false);
202+
}
203+
205204
#endif
206205

207206
void MarlinUI::init() {
@@ -1071,7 +1070,7 @@ void MarlinUI::init() {
10711070

10721071
#if LCD_BACKLIGHT_TIMEOUT_MINS
10731072
refresh_backlight_timeout();
1074-
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
1073+
#elif HAS_DISPLAY_SLEEP
10751074
refresh_screen_timeout();
10761075
#endif
10771076

@@ -1184,9 +1183,9 @@ void MarlinUI::init() {
11841183
WRITE(LCD_BACKLIGHT_PIN, LOW); // Backlight off
11851184
backlight_off_ms = 0;
11861185
}
1187-
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
1186+
#elif HAS_DISPLAY_SLEEP
11881187
if (screen_timeout_millis && ELAPSED(ms, screen_timeout_millis))
1189-
sleep_display(true);
1188+
sleep_display();
11901189
#endif
11911190

11921191
// Change state of drawing flag between screen updates

Marlin/src/lcd/menu/menu_configuration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ void menu_configuration() {
550550
//
551551
#if LCD_BACKLIGHT_TIMEOUT_MINS
552552
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.backlight_timeout_minutes, ui.backlight_timeout_min, ui.backlight_timeout_max, ui.refresh_backlight_timeout);
553-
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
553+
#elif HAS_DISPLAY_SLEEP
554554
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.sleep_timeout_minutes, ui.sleep_timeout_min, ui.sleep_timeout_max, ui.refresh_screen_timeout);
555555
#endif
556556

Marlin/src/module/settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ void MarlinSettings::postprocess() {
658658

659659
#if LCD_BACKLIGHT_TIMEOUT_MINS
660660
ui.refresh_backlight_timeout();
661-
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
661+
#elif HAS_DISPLAY_SLEEP
662662
ui.refresh_screen_timeout();
663663
#endif
664664
}
@@ -3232,7 +3232,7 @@ void MarlinSettings::reset() {
32323232
#if LCD_BACKLIGHT_TIMEOUT_MINS
32333233
ui.backlight_timeout_minutes = LCD_BACKLIGHT_TIMEOUT_MINS;
32343234
#elif HAS_DISPLAY_SLEEP
3235-
ui.sleep_timeout_minutes = TERN(TOUCH_SCREEN, TOUCH_IDLE_SLEEP_MINS, DISPLAY_SLEEP_MINUTES);
3235+
ui.sleep_timeout_minutes = DISPLAY_SLEEP_MINUTES;
32363236
#endif
32373237

32383238
//

0 commit comments

Comments
 (0)