|
|
@ -278,10 +278,12 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) { |
|
|
|
|
|
|
|
#if ENABLED(SHOW_BOOTSCREEN) |
|
|
|
|
|
|
|
bool show_bootscreen = true; |
|
|
|
|
|
|
|
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) |
|
|
|
|
|
|
|
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT |
|
|
|
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500 |
|
|
|
#endif |
|
|
|
|
|
|
|
void lcd_custom_bootscreen() { |
|
|
|
u8g.firstPage(); |
|
|
|
do { |
|
|
@ -290,14 +292,15 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) { |
|
|
|
( 64 - (CUSTOM_BOOTSCREEN_BMPHEIGHT)) /2, |
|
|
|
CEILING(CUSTOM_BOOTSCREEN_BMPWIDTH, 8), CUSTOM_BOOTSCREEN_BMPHEIGHT, custom_start_bmp); |
|
|
|
} while (u8g.nextPage()); |
|
|
|
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // SHOW_CUSTOM_BOOTSCREEN
|
|
|
|
|
|
|
|
void lcd_bootscreen() { |
|
|
|
|
|
|
|
if (show_bootscreen) { |
|
|
|
show_bootscreen = false; |
|
|
|
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) |
|
|
|
lcd_custom_bootscreen(); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(START_BMPHIGH) |
|
|
|
constexpr uint8_t offy = 0; |
|
|
@ -320,7 +323,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) { |
|
|
|
u8g.drawStr(txt2X, u8g.getHeight() - (DOG_CHAR_HEIGHT) * 1 / 2, STRING_SPLASH_LINE2); |
|
|
|
#endif |
|
|
|
} while (u8g.nextPage()); |
|
|
|
} |
|
|
|
safe_delay(BOOTSCREEN_TIMEOUT); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // SHOW_BOOTSCREEN
|
|
|
@ -351,20 +354,12 @@ static void lcd_implementation_init() { |
|
|
|
#elif ENABLED(LCD_SCREEN_ROT_270) |
|
|
|
u8g.setRot270(); // Rotate screen by 270°
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(SHOW_BOOTSCREEN) |
|
|
|
if (show_bootscreen) { |
|
|
|
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) |
|
|
|
lcd_custom_bootscreen(); |
|
|
|
#else |
|
|
|
lcd_bootscreen(); |
|
|
|
#endif |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
// The kill screen is displayed for unrecoverable conditions
|
|
|
|
void lcd_kill_screen() { |
|
|
|
u8g.firstPage(); |
|
|
|
do { |
|
|
|
lcd_setFont(FONT_MENU); |
|
|
|
u8g.setPrintPos(0, u8g.getHeight()/4*1); |
|
|
|
lcd_print_utf(lcd_status_message); |
|
|
@ -372,6 +367,7 @@ void lcd_kill_screen() { |
|
|
|
lcd_printPGM(PSTR(MSG_HALTED)); |
|
|
|
u8g.setPrintPos(0, u8g.getHeight()/4*3); |
|
|
|
lcd_printPGM(PSTR(MSG_PLEASE_RESET)); |
|
|
|
} while (u8g.nextPage()); |
|
|
|
} |
|
|
|
|
|
|
|
void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
|
|
@ -477,6 +473,7 @@ inline void lcd_implementation_status_message(const bool blink) { |
|
|
|
} |
|
|
|
} |
|
|
|
#else |
|
|
|
UNUSED(blink); |
|
|
|
lcd_print_utf(lcd_status_message); |
|
|
|
#endif |
|
|
|
} |
|
|
|