Drop early_safe_delay
This commit is contained in:
parent
becdac19ea
commit
9dd884a324
|
@ -35,18 +35,6 @@ void safe_delay(millis_t ms) {
|
|||
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
|
||||
}
|
||||
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
void early_safe_delay(millis_t ms) {
|
||||
while (ms > 50) {
|
||||
ms -= 50;
|
||||
delay(50);
|
||||
watchdog_refresh();
|
||||
}
|
||||
delay(ms);
|
||||
watchdog_refresh();
|
||||
}
|
||||
#endif
|
||||
|
||||
// A delay to provide brittle hosts time to receive bytes
|
||||
#if ENABLED(SERIAL_OVERRUN_PROTECTION)
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#include "../core/millis_t.h"
|
||||
|
||||
void safe_delay(millis_t ms); // Delay ensuring that temperatures are updated and the watchdog is kept alive.
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
void early_safe_delay(millis_t ms); // Delay ensuring that the watchdog is kept alive. Can be used before the Temperature ISR starts.
|
||||
#else
|
||||
inline void early_safe_delay(millis_t ms) { safe_delay(ms); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_OVERRUN_PROTECTION)
|
||||
void serial_delay(const millis_t ms);
|
||||
|
|
|
@ -160,14 +160,14 @@ bool MarlinUI::detected() { return true; }
|
|||
#endif
|
||||
u8g.firstPage();
|
||||
do { draw_custom_bootscreen(f); } while (u8g.nextPage());
|
||||
if (frame_time) early_safe_delay(frame_time);
|
||||
if (frame_time) safe_delay(frame_time);
|
||||
}
|
||||
|
||||
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#endif
|
||||
#if CUSTOM_BOOTSCREEN_TIMEOUT
|
||||
early_safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
|
||||
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
#endif // SHOW_CUSTOM_BOOTSCREEN
|
||||
|
@ -226,7 +226,7 @@ bool MarlinUI::detected() { return true; }
|
|||
constexpr millis_t frame_time = MARLIN_BOOTSCREEN_FRAME_TIME;
|
||||
LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) {
|
||||
draw_bootscreen_bmp((uint8_t*)pgm_read_ptr(&marlin_bootscreen_animation[f]));
|
||||
if (frame_time) early_safe_delay(frame_time);
|
||||
if (frame_time) safe_delay(frame_time);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ bool MarlinUI::detected() { return true; }
|
|||
void MarlinUI::show_marlin_bootscreen() {
|
||||
for (uint8_t q = bootscreen_pages; q--;) {
|
||||
draw_marlin_bootscreen(q == 0);
|
||||
if (q) early_safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages);
|
||||
if (q) safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue