♻️ No ui.reinit_lcd on any ExtUI (#23722)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
InsanityAutomation 2022-02-13 14:44:24 -05:00 committed by Scott Lahteine
parent 172cd2eefb
commit 7da28768f7
3 changed files with 6 additions and 6 deletions

View File

@ -459,8 +459,8 @@
#endif #endif
#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI) || !PIN_EXISTS(SD_DETECT) #if PIN_EXISTS(SD_DETECT) && NONE(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI, EXTENSIBLE_UI)
#define NO_LCD_REINIT 1 // Suppress LCD re-initialization #define REINIT_NOISY_LCD 1 // Have the LCD re-init on SD insertion
#endif #endif
/** /**

View File

@ -625,7 +625,7 @@ void MarlinUI::init() {
next_filament_display = millis() + 5000UL; // Show status message for 5s next_filament_display = millis() + 5000UL; // Show status message for 5s
#endif #endif
goto_screen(menu_main); goto_screen(menu_main);
IF_DISABLED(NO_LCD_REINIT, init_lcd()); // May revive the LCD if static electricity killed it reinit_lcd(); // Revive a noisy shared SPI LCD
return; return;
} }
@ -1697,9 +1697,7 @@ void MarlinUI::init() {
} }
} }
#if PIN_EXISTS(SD_DETECT) && DISABLED(NO_LCD_REINIT) reinit_lcd(); // Revive a noisy shared SPI LCD
init_lcd(); // Revive a noisy shared SPI LCD
#endif
refresh(); refresh();

View File

@ -209,6 +209,8 @@ public:
static void init_lcd() {} static void init_lcd() {}
#endif #endif
static void reinit_lcd() { TERN_(REINIT_NOISY_LCD, init_lcd()); }
#if HAS_WIRED_LCD #if HAS_WIRED_LCD
static bool detected(); static bool detected();
#else #else