Sfoglia il codice sorgente

Minor cleanup of pause code (#13030)

Giuliano Zaro 6 anni fa
parent
commit
a79d80c78e

+ 2
- 6
Marlin/src/feature/pause.cpp Vedi File

@@ -329,12 +329,6 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
329 329
     host_action_pause();
330 330
   #endif
331 331
 
332
-  #if HAS_LCD_MENU
333
-    if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT);
334
-  #else
335
-    UNUSED(show_lcd);
336
-  #endif
337
-
338 332
   if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
339 333
     SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
340 334
 
@@ -343,6 +337,8 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
343 337
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
344 338
         LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
345 339
       }
340
+    #else
341
+      UNUSED(show_lcd);
346 342
     #endif
347 343
 
348 344
     return false; // unable to reach safe temperature

+ 1
- 1
Marlin/src/gcode/feature/pause/M125.cpp Vedi File

@@ -79,8 +79,8 @@ void GcodeSuite::M125() {
79 79
   #endif
80 80
 
81 81
   #if HAS_LCD_MENU
82
+    lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT);
82 83
     const bool show_lcd = parser.seenval('P');
83
-    lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, active_extruder);
84 84
   #else
85 85
     constexpr bool show_lcd = false;
86 86
   #endif

+ 2
- 2
Marlin/src/lcd/menu/menu_main.cpp Vedi File

@@ -48,8 +48,8 @@ void lcd_pause() {
48 48
   #endif
49 49
 
50 50
   #if ENABLED(PARK_HEAD_ON_PAUSE)
51
-    lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, active_extruder);
52
-    enqueue_and_echo_commands_P(PSTR("M25 P; \n M24"));
51
+    lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT);  // Show message immediately to let user know about pause in progress
52
+    enqueue_and_echo_commands_P(PSTR("M25 P\nM24"));
53 53
   #elif ENABLED(SDSUPPORT)
54 54
     enqueue_and_echo_commands_P(PSTR("M25"));
55 55
   #elif defined(ACTION_ON_PAUSE)

Loading…
Annulla
Salva