Browse Source

Merge pull request #6088 from rafaljot/patch-3

Update Marlin_main.cpp
Scott Lahteine 8 years ago
parent
commit
8f9face956
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      Marlin/Marlin_main.cpp

+ 7
- 4
Marlin/Marlin_main.cpp View File

10595
   SERIAL_ERROR_START;
10595
   SERIAL_ERROR_START;
10596
   SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
10596
   SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
10597
 
10597
 
10598
+  thermalManager.disable_all_heaters();
10599
+  disable_all_steppers();
10600
+            
10598
   #if ENABLED(ULTRA_LCD)
10601
   #if ENABLED(ULTRA_LCD)
10599
     kill_screen(lcd_msg);
10602
     kill_screen(lcd_msg);
10600
   #else
10603
   #else
10601
     UNUSED(lcd_msg);
10604
     UNUSED(lcd_msg);
10602
   #endif
10605
   #endif
10603
 
10606
 
10604
-  delay(500); // Wait a short time
10605
-
10607
+  _delay_ms(250); // Wait a short time
10606
   cli(); // Stop interrupts
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
   #if HAS_POWER_SWITCH
10613
   #if HAS_POWER_SWITCH
10611
     SET_INPUT(PS_ON_PIN);
10614
     SET_INPUT(PS_ON_PIN);

Loading…
Cancel
Save