瀏覽代碼

Fix bad Purge More logic (#13193)

InsanityAutomation 6 年之前
父節點
當前提交
52665f54ad
共有 1 個檔案被更改,包括 13 行新增7 行删除
  1. 13
    7
      Marlin/src/feature/pause.cpp

+ 13
- 7
Marlin/src/feature/pause.cpp 查看文件

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

Loading…
取消
儲存