From 04a4d72b2e58ee62fec3fe0883446ee4224c1ba7 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Wed, 24 Jan 2018 10:07:56 -0700 Subject: [PATCH] Boot screen no longer shown when activating menu. - On Hibiscus, will allow SD card to be inserted/removed without garbled screen - On other FW, will eliminate boot screen flash when entering menu. --- Marlin/Conditionals_LulzBot.h | 5 +++++ Marlin/ultralcd.cpp | 8 ++++++++ Marlin/ultralcd_impl_DOGM.h | 2 +- Marlin/ultralcd_lulzbot.h | 1 - 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index fd1da3add..0a8d3382b 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -211,6 +211,11 @@ // Back port of upstream https://github.com/MarlinFirmware/Marlin/commit/6ed284061580ffc6eef40df391afb30d2f8b45f5 #define LULZBOT_OCTOPRINT_RX_BUFFER_OVERFLOW_WORKAROUND delay(2); +/* In Marlin, the custom boot screen is incorrectly being drawn during + * lcd_implementation_init, this causes the boot screen to flash + * before entering menus, and also screws up the new modern UI */ +#define LULZBOT_CUSTOM_BOOTSCREEN_DURING_INIT_WORKAROUND + /************************* EXPERIMENTAL FEATURES ******************************/ #if defined(LULZBOT_USE_EXPERIMENTAL_FEATURES) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index f2aa038ed..2101111c0 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -4363,6 +4363,14 @@ void lcd_init() { #endif ); + #if ENABLED(SHOW_BOOTSCREEN) && defined(LULZBOT_CUSTOM_BOOTSCREEN_DURING_INIT_WORKAROUND) + #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) + lcd_custom_bootscreen(); + #else + lcd_bootscreen(); + #endif + #endif + #if ENABLED(NEWPANEL) #if BUTTON_EXISTS(EN1) SET_INPUT_PULLUP(BTN_EN1); diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 6dba9cca7..fce7587a4 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -339,7 +339,7 @@ static void lcd_implementation_init() { u8g.setRot270(); // Rotate screen by 270° #endif - #if ENABLED(SHOW_BOOTSCREEN) + #if ENABLED(SHOW_BOOTSCREEN) && not defined(LULZBOT_CUSTOM_BOOTSCREEN_DURING_INIT_WORKAROUND) #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) lcd_custom_bootscreen(); #else diff --git a/Marlin/ultralcd_lulzbot.h b/Marlin/ultralcd_lulzbot.h index 7966797ee..f291ec1f2 100644 --- a/Marlin/ultralcd_lulzbot.h +++ b/Marlin/ultralcd_lulzbot.h @@ -652,7 +652,6 @@ const uint8_t crc = } draw_progress_bar(percent_done); - // Update the fan and bed animations if(fan_speed > 0) { draw_fan_icon(blink);