Update Marlin_main.cpp

Sometimes after killing heaters are still on.
This commit is contained in:
rafaljot 2017-03-21 15:06:01 +01:00 committed by GitHub
parent 72f7b14e66
commit 6da949bbf0

View File

@ -10584,17 +10584,20 @@ void kill(const char* lcd_msg) {
SERIAL_ERROR_START; SERIAL_ERROR_START;
SERIAL_ERRORLNPGM(MSG_ERR_KILLED); SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
thermalManager.disable_all_heaters();
disable_all_steppers();
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
kill_screen(lcd_msg); kill_screen(lcd_msg);
#else #else
UNUSED(lcd_msg); UNUSED(lcd_msg);
#endif #endif
delay(500); // Wait a short time _delay_ms(250); // Wait a short time
cli(); // Stop interrupts cli(); // Stop interrupts
thermalManager.disable_all_heaters();
disable_all_steppers(); _delay_ms(250); //Wait to ensure all interrupts routines stopped
thermalManager.disable_all_heaters(); //turn off heaters again
#if HAS_POWER_SWITCH #if HAS_POWER_SWITCH
SET_INPUT(PS_ON_PIN); SET_INPUT(PS_ON_PIN);