Skip to content

Commit

Permalink
COLOR_UI: blank screen on bigger models too
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Aug 26, 2021
1 parent 1b797d2 commit eecc167
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
13 changes: 13 additions & 0 deletions Marlin/src/lcd/tft/ui_1024x600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@

void MarlinUI::tft_idle() {
#if ENABLED(TOUCH_SCREEN)
#if HAS_TOUCH_SLEEP
static bool sleepCleared;
if (touchIO.isSleeping()) {
tft.queue.reset();
if (!sleepCleared) {
sleepCleared = true;
ui.clear_lcd();
tft.queue.async();
}
TERN_(TOUCH_SCREEN, touch.idle());
return;
} else sleepCleared = false;
#endif
if (draw_menu_navigation) {
add_control(164, TFT_HEIGHT - 50, PAGE_UP, imgPageUp, encoderTopLine > 0);
add_control(796, TFT_HEIGHT - 50, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items);
Expand Down
5 changes: 1 addition & 4 deletions Marlin/src/lcd/tft/ui_320x240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@
#include "../../feature/bedlevel/bedlevel.h"
#endif

#if HAS_TOUCH_SLEEP
static bool sleepCleared;
#endif

void MarlinUI::tft_idle() {
#if ENABLED(TOUCH_SCREEN)
#if HAS_TOUCH_SLEEP
static bool sleepCleared;
if (touchIO.isSleeping()) {
tft.queue.reset();
if (!sleepCleared) {
Expand Down
13 changes: 13 additions & 0 deletions Marlin/src/lcd/tft/ui_480x320.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@

void MarlinUI::tft_idle() {
#if ENABLED(TOUCH_SCREEN)
#if HAS_TOUCH_SLEEP
static bool sleepCleared;
if (touchIO.isSleeping()) {
tft.queue.reset();
if (!sleepCleared) {
sleepCleared = true;
ui.clear_lcd();
tft.queue.async();
}
TERN_(TOUCH_SCREEN, touch.idle());
return;
} else sleepCleared = false;
#endif
if (draw_menu_navigation) {
add_control(104, TFT_HEIGHT - 34, PAGE_UP, imgPageUp, encoderTopLine > 0);
add_control(344, TFT_HEIGHT - 34, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items);
Expand Down

0 comments on commit eecc167

Please sign in to comment.