Better animated boot screen
This commit is contained in:
parent
8f188adc32
commit
c0ad4718a4
@ -144,10 +144,16 @@ bool MarlinUI::detected() { return true; }
|
|||||||
constexpr millis_t d = 0;
|
constexpr millis_t d = 0;
|
||||||
constexpr uint8_t f = 0;
|
constexpr uint8_t f = 0;
|
||||||
#else
|
#else
|
||||||
|
#if DISABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME)
|
||||||
constexpr millis_t d = CUSTOM_BOOTSCREEN_FRAME_TIME;
|
constexpr millis_t d = CUSTOM_BOOTSCREEN_FRAME_TIME;
|
||||||
|
#endif
|
||||||
LOOP_L_N(f, COUNT(custom_bootscreen_animation))
|
LOOP_L_N(f, COUNT(custom_bootscreen_animation))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME)
|
||||||
|
const uint8_t fr = _MIN(f, COUNT(custom_bootscreen_frame_time) - 1);
|
||||||
|
const millis_t d = custom_bootscreen_frame_time[fr];
|
||||||
|
#endif
|
||||||
u8g.firstPage();
|
u8g.firstPage();
|
||||||
do { draw_custom_bootscreen(f); } while (u8g.nextPage());
|
do { draw_custom_bootscreen(f); } while (u8g.nextPage());
|
||||||
if (d) safe_delay(d);
|
if (d) safe_delay(d);
|
||||||
@ -156,7 +162,9 @@ bool MarlinUI::detected() { return true; }
|
|||||||
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
|
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
|
||||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||||
#endif
|
#endif
|
||||||
|
#if CUSTOM_BOOTSCREEN_TIMEOUT
|
||||||
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
|
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif // SHOW_CUSTOM_BOOTSCREEN
|
#endif // SHOW_CUSTOM_BOOTSCREEN
|
||||||
|
|
||||||
|
@ -88,10 +88,6 @@ void MarlinUI::clear_lcd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(SHOW_BOOTSCREEN)
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
#ifndef BOOTSCREEN_TIMEOUT
|
|
||||||
#define BOOTSCREEN_TIMEOUT 1500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void MarlinUI::show_bootscreen() {
|
void MarlinUI::show_bootscreen() {
|
||||||
tft.queue.reset();
|
tft.queue.reset();
|
||||||
|
|
||||||
@ -106,7 +102,7 @@ void MarlinUI::clear_lcd() {
|
|||||||
safe_delay(BOOTSCREEN_TIMEOUT);
|
safe_delay(BOOTSCREEN_TIMEOUT);
|
||||||
clear_lcd();
|
clear_lcd();
|
||||||
}
|
}
|
||||||
#endif // SHOW_BOOTSCREEN
|
#endif
|
||||||
|
|
||||||
void MarlinUI::draw_kill_screen() {
|
void MarlinUI::draw_kill_screen() {
|
||||||
tft.queue.reset();
|
tft.queue.reset();
|
||||||
|
@ -90,10 +90,6 @@ void MarlinUI::clear_lcd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(SHOW_BOOTSCREEN)
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
#ifndef BOOTSCREEN_TIMEOUT
|
|
||||||
#define BOOTSCREEN_TIMEOUT 1500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef BOOTSCREEN_TIMEOUT
|
#undef BOOTSCREEN_TIMEOUT
|
||||||
#define BOOTSCREEN_TIMEOUT 5000
|
#define BOOTSCREEN_TIMEOUT 5000
|
||||||
|
|
||||||
@ -112,7 +108,7 @@ void MarlinUI::clear_lcd() {
|
|||||||
safe_delay(BOOTSCREEN_TIMEOUT);
|
safe_delay(BOOTSCREEN_TIMEOUT);
|
||||||
clear_lcd();
|
clear_lcd();
|
||||||
}
|
}
|
||||||
#endif // SHOW_BOOTSCREEN
|
#endif
|
||||||
|
|
||||||
void MarlinUI::draw_kill_screen() {
|
void MarlinUI::draw_kill_screen() {
|
||||||
tft.queue.reset();
|
tft.queue.reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user