Some cleanup around 'lcd_bootscreen()' and 'lcd_kill_screen()'

Move 'lcd_bootscreen()' from `lcd_init()` to 'setup()' where it is cexecute exactly once. Saves 'bool show_bootscreen'.
Move the call of 'lcd_custom_bootscreen()' to the begin of 'lcd_bootscreen()'.
Move the delays into the related functions.
Move the picture loop around 'lcd_kill_screen()' into the function.
This commit is contained in:
AnHardt
2017-11-03 11:58:20 +01:00
parent 84b93d941f
commit ca0e4b4e96
3 changed files with 41 additions and 63 deletions

View File

@ -816,22 +816,10 @@ void setup() {
lcd_init();
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#endif
#if ENABLED(SHOW_BOOTSCREEN)
#if ENABLED(DOGLCD) // On DOGM the first bootscreen is already drawn
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT); // Custom boot screen pause
lcd_bootscreen(); // Show Marlin boot screen
#endif
safe_delay(BOOTSCREEN_TIMEOUT); // Pause
#elif ENABLED(ULTRA_LCD)
lcd_bootscreen();
#if DISABLED(SDSUPPORT)
lcd_bootscreen();
#if ENABLED(ULTRA_LCD) && DISABLED(SDSUPPORT)
lcd_init();
#endif
#endif
#endif