Move last bootscreen delay to end of setup (#21665)
This commit is contained in:
@@ -35,6 +35,18 @@ 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)
|
||||
|
||||
|
@@ -25,8 +25,12 @@
|
||||
#include "../core/types.h"
|
||||
#include "../core/millis_t.h"
|
||||
|
||||
// Delay that ensures heaters and watchdog are kept alive
|
||||
void safe_delay(millis_t ms);
|
||||
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);
|
||||
|
Reference in New Issue
Block a user