瀏覽代碼

Merge pull request #6088 from rafaljot/patch-3

Update Marlin_main.cpp
Scott Lahteine 8 年之前
父節點
當前提交
8f9face956
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7
    4
      Marlin/Marlin_main.cpp

+ 7
- 4
Marlin/Marlin_main.cpp 查看文件

@@ -10595,17 +10595,20 @@ void kill(const char* lcd_msg) {
10595 10595
   SERIAL_ERROR_START;
10596 10596
   SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
10597 10597
 
10598
+  thermalManager.disable_all_heaters();
10599
+  disable_all_steppers();
10600
+            
10598 10601
   #if ENABLED(ULTRA_LCD)
10599 10602
     kill_screen(lcd_msg);
10600 10603
   #else
10601 10604
     UNUSED(lcd_msg);
10602 10605
   #endif
10603 10606
 
10604
-  delay(500); // Wait a short time
10605
-
10607
+  _delay_ms(250); // Wait a short time
10606 10608
   cli(); // Stop interrupts
10607
-  thermalManager.disable_all_heaters();
10608
-  disable_all_steppers();
10609
+            
10610
+  _delay_ms(250); //Wait to ensure all interrupts routines stopped
10611
+  thermalManager.disable_all_heaters(); //turn off heaters again
10609 10612
 
10610 10613
   #if HAS_POWER_SWITCH
10611 10614
     SET_INPUT(PS_ON_PIN);

Loading…
取消
儲存