Add Watchdog reset in kill()

Add watchdog reset in the kill loop to simplify recovering.
This commit is contained in:
Blue-Marlin 2016-03-04 00:35:18 +01:00
parent 8dccd5a7ea
commit b4e5e0f11d

View File

@ -7115,7 +7115,11 @@ void kill(const char* lcd_msg) {
for (int i = 5; i--; lcd_update()) delay(200); // Wait a short time
cli(); // disable interrupts
suicide();
while (1) { /* Intentionally left empty */ } // Wait for reset
while (1) {
#if ENABLED(USE_WATCHDOG)
watchdog_reset();
#endif
} // Wait for reset
}
#if ENABLED(FILAMENT_RUNOUT_SENSOR)