Bladeren bron

✨ Improve pause/filament change for ExtUI (#22655)

InsanityAutomation 3 jaren geleden
bovenliggende
commit
08a40c4375
No account linked to committer's email address

+ 2
- 0
Marlin/Configuration_adv.h Bestand weergeven

@@ -2425,6 +2425,8 @@
2425 2425
   #define PAUSE_PARK_NOZZLE_TIMEOUT           45  // (seconds) Time limit before the nozzle is turned off for safety.
2426 2426
   #define FILAMENT_CHANGE_ALERT_BEEPS         10  // Number of alert beeps to play when a response is needed.
2427 2427
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT           // Enable for XYZ steppers to stay powered on during filament change.
2428
+  //#define FILAMENT_CHANGE_RESUME_ON_INSERT      // Automatically continue / load filament when runout sensor is triggered again.
2429
+  //#define PAUSE_REHEAT_FAST_RESUME              // Reduce number of waits by not prompting again post-timeout before continuing.
2428 2430
 
2429 2431
   //#define PARK_HEAD_ON_PAUSE                    // Park the nozzle during pause and filament change.
2430 2432
   //#define HOME_BEFORE_FILAMENT_CHANGE           // If needed, home before parking for filament change

+ 12
- 4
Marlin/src/feature/pause.cpp Bestand weergeven

@@ -203,6 +203,16 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
203 203
 
204 204
     while (wait_for_user) {
205 205
       impatient_beep(max_beep_count);
206
+      #if BOTH(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR)
207
+        #if ENABLED(MULTI_FILAMENT_SENSOR)
208
+          #define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
209
+          switch (active_extruder) {
210
+            REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _CASE_INSERTED)
211
+          }
212
+        #else
213
+          if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false;
214
+        #endif
215
+      #endif
206 216
       idle_no_sleep();
207 217
     }
208 218
   }
@@ -545,14 +555,12 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
545 555
       HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout);
546 556
 
547 557
       TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_REHEATDONE), CONTINUE_STR));
548
-
549 558
       TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_REHEATDONE)));
550
-
551 559
       TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status_P(GET_TEXT(MSG_REHEATDONE)));
552 560
 
553
-      wait_for_user = true;
554
-      nozzle_timed_out = false;
561
+      IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true);
555 562
 
563
+      nozzle_timed_out = false;
556 564
       first_impatient_beep(max_beep_count);
557 565
     }
558 566
     idle_no_sleep();

+ 2
- 0
Marlin/src/lcd/extui/ui_api.cpp Bestand weergeven

@@ -1037,6 +1037,8 @@ namespace ExtUI {
1037 1037
 
1038 1038
   #if M600_PURGE_MORE_RESUMABLE
1039 1039
     void setPauseMenuResponse(PauseMenuResponse response) { pause_menu_response = response; }
1040
+    PauseMessage pauseModeStatus = PAUSE_MESSAGE_STATUS;
1041
+    PauseMode getPauseMode() { return pause_mode;}
1040 1042
   #endif
1041 1043
 
1042 1044
   void printFile(const char *filename) {

+ 2
- 0
Marlin/src/lcd/extui/ui_api.h Bestand weergeven

@@ -234,6 +234,8 @@ namespace ExtUI {
234 234
 
235 235
   #if M600_PURGE_MORE_RESUMABLE
236 236
     void setPauseMenuResponse(PauseMenuResponse);
237
+    extern PauseMessage pauseModeStatus;
238
+    PauseMode getPauseMode();
237 239
   #endif
238 240
 
239 241
   #if ENABLED(LIN_ADVANCE)

+ 2
- 7
Marlin/src/lcd/marlinui.cpp Bestand weergeven

@@ -1716,9 +1716,8 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
1716 1716
     const PauseMode mode/*=PAUSE_MODE_SAME*/,
1717 1717
     const uint8_t extruder/*=active_extruder*/
1718 1718
   ) {
1719
-    if (mode == PAUSE_MODE_SAME)
1720
-      return;
1721 1719
     pause_mode = mode;
1720
+    ExtUI::pauseModeStatus = message;
1722 1721
     switch (message) {
1723 1722
       case PAUSE_MESSAGE_PARKING:  ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PAUSE_PRINT_PARKING));
1724 1723
       case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INIT));
@@ -1727,11 +1726,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
1727 1726
       case PAUSE_MESSAGE_INSERT:   ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INSERT));
1728 1727
       case PAUSE_MESSAGE_LOAD:     ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_LOAD));
1729 1728
       case PAUSE_MESSAGE_PURGE:
1730
-        #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
1731
-          ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_CONT_PURGE));
1732
-        #else
1733
-          ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE));
1734
-        #endif
1729
+        ExtUI::onUserConfirmRequired_P(GET_TEXT(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE)));
1735 1730
       case PAUSE_MESSAGE_RESUME:   ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_RESUME));
1736 1731
       case PAUSE_MESSAGE_HEAT:     ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEAT));
1737 1732
       case PAUSE_MESSAGE_HEATING:  ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING));

+ 4
- 3
buildroot/tests/BIGTREE_GTR_V1_0 Bestand weergeven

@@ -12,10 +12,11 @@ opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
12 12
 # Not necessary to enable auto-fan for all extruders to hit problematic code paths
13 13
 opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_PIN PF13 \
14 14
         X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2130 \
15
-        FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 \
16
-        FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH
15
+        NUM_RUNOUT_SENSORS 8 FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 \
16
+        FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH \
17
+        FILAMENT_RUNOUT_SCRIPT '"M600 T%c"'
17 18
 opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \
18
-           FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP
19
+           FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME
19 20
 exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors w/ distinct states" "$3"
20 21
 
21 22
 restore_configs

Laden…
Annuleren
Opslaan