Browse Source

Disable heaters/steppers before message

Scott Lahteine 6 years ago
parent
commit
3847c08f7e
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      Marlin/src/Marlin.cpp

+ 6
- 5
Marlin/src/Marlin.cpp View File

610
  * After this the machine will need to be reset.
610
  * After this the machine will need to be reset.
611
  */
611
  */
612
 void kill(PGM_P const lcd_msg/*=NULL*/) {
612
 void kill(PGM_P const lcd_msg/*=NULL*/) {
613
-  SERIAL_ERROR_START();
614
-  SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
615
 
613
 
616
   thermalManager.disable_all_heaters();
614
   thermalManager.disable_all_heaters();
617
   disable_all_steppers();
615
   disable_all_steppers();
618
 
616
 
617
+  SERIAL_ERROR_START();
618
+  SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
619
+
619
   #if ENABLED(EXTENSIBLE_UI)
620
   #if ENABLED(EXTENSIBLE_UI)
620
     UI::onPrinterKilled(lcd_msg ? lcd_msg : PSTR(MSG_KILLED));
621
     UI::onPrinterKilled(lcd_msg ? lcd_msg : PSTR(MSG_KILLED));
621
   #elif ENABLED(ULTRA_LCD)
622
   #elif ENABLED(ULTRA_LCD)
633
 
634
 
634
 void minkill() {
635
 void minkill() {
635
 
636
 
636
-  _delay_ms(600); // Wait a short time (allows messages to get out before shutting down.
637
-  cli(); // Stop interrupts
638
-  _delay_ms(250); // Wait to ensure all interrupts stopped
637
+  _delay_ms(600);  // Wait a short time (allows messages to get out before shutting down.
638
+  cli();           // Stop interrupts
639
+  _delay_ms(250);  // Wait to ensure all interrupts stopped
639
 
640
 
640
   thermalManager.disable_all_heaters(); // turn off heaters again
641
   thermalManager.disable_all_heaters(); // turn off heaters again
641
 
642
 

Loading…
Cancel
Save