Prevent watchdog reset in setup() (#21776)

Cause `manage_heaters` to only reset the watchdog and return until `setup()` is completed.

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
Victor Oliveira
2021-05-02 23:37:54 -03:00
committed by Scott Lahteine
parent 7957408497
commit 7378afc6d8
6 changed files with 6 additions and 46 deletions

View File

@ -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);
}
}