Browse Source

Fix bad Purge More logic (#13193)

InsanityAutomation 6 years ago
parent
commit
52665f54ad
1 changed files with 13 additions and 7 deletions
  1. 13
    7
      Marlin/src/feature/pause.cpp

+ 13
- 7
Marlin/src/feature/pause.cpp View File

@@ -137,6 +137,10 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
137 137
                    const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
138 138
                    DXC_ARGS
139 139
 ) {
140
+  #if !HAS_LCD_MENU
141
+    UNUSED(show_lcd);
142
+  #endif
143
+
140 144
   if (!ensure_safe_temperature(mode)) {
141 145
     #if HAS_LCD_MENU
142 146
       if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS, mode);
@@ -183,8 +187,6 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
183 187
 
184 188
   #if HAS_LCD_MENU
185 189
     if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
186
-  #else
187
-    UNUSED(show_lcd);
188 190
   #endif
189 191
 
190 192
   #if ENABLED(DUAL_X_CARRIAGE)
@@ -276,7 +278,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
276 278
       // Keep looping if "Purge More" was selected
277 279
     } while (false
278 280
       #if HAS_LCD_MENU
279
-        && show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
281
+        || (show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE)
280 282
       #endif
281 283
     );
282 284
 
@@ -298,6 +300,10 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
298 300
 bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
299 301
                      const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
300 302
 ) {
303
+  #if !HAS_LCD_MENU
304
+    UNUSED(show_lcd);
305
+  #endif
306
+
301 307
   if (!ensure_safe_temperature(mode)) {
302 308
     #if HAS_LCD_MENU
303 309
       if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
@@ -308,8 +314,6 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
308 314
 
309 315
   #if HAS_LCD_MENU
310 316
     if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, mode);
311
-  #else
312
-    UNUSED(show_lcd);
313 317
   #endif
314 318
 
315 319
   // Retract filament
@@ -361,6 +365,10 @@ uint8_t did_pause_print = 0;
361 365
 
362 366
 bool pause_print(const float &retract, const point_t &park_point, const float &unload_length/*=0*/, const bool show_lcd/*=false*/ DXC_ARGS) {
363 367
 
368
+  #if !HAS_LCD_MENU
369
+    UNUSED(show_lcd);
370
+  #endif
371
+
364 372
   if (did_pause_print) return false; // already paused
365 373
 
366 374
   #if ENABLED(HOST_ACTION_COMMANDS)
@@ -382,8 +390,6 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
382 390
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
383 391
         LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
384 392
       }
385
-    #else
386
-      UNUSED(show_lcd);
387 393
     #endif
388 394
 
389 395
     return false; // unable to reach safe temperature

Loading…
Cancel
Save