Kaynağa Gözat

Merge pull request #6190 from Bob-the-Kuhn/Stop-and-Kill-prints---round-2

Message for every KILL and STOP (also need delays)
Scott Lahteine 7 yıl önce
ebeveyn
işleme
b23aef5b8d
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3
    2
      Marlin/Marlin_main.cpp

+ 3
- 2
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -11247,7 +11247,7 @@ void kill(const char* lcd_msg) {
11247 11247
     UNUSED(lcd_msg);
11248 11248
   #endif
11249 11249
 
11250
-  _delay_ms(250); // Wait a short time
11250
+  _delay_ms(600); // Wait a short time (allows messages to get out before shutting down.
11251 11251
   cli(); // Stop interrupts
11252 11252
 
11253 11253
   _delay_ms(250); //Wait to ensure all interrupts routines stopped
@@ -11272,11 +11272,12 @@ void kill(const char* lcd_msg) {
11272 11272
 void stop() {
11273 11273
   thermalManager.disable_all_heaters();
11274 11274
   if (IsRunning()) {
11275
-    Running = false;
11276 11275
     Stopped_gcode_LastN = gcode_LastN; // Save last g_code for restart
11277 11276
     SERIAL_ERROR_START;
11278 11277
     SERIAL_ERRORLNPGM(MSG_ERR_STOPPED);
11279 11278
     LCD_MESSAGEPGM(MSG_STOPPED);
11279
+    safe_delay(350);       // allow enough time for messages to get out before stopping
11280
+    Running = false;
11280 11281
   }
11281 11282
 }
11282 11283
 

Loading…
İptal
Kaydet