Thomas Moore 7年前
コミット
3d24c329af
2個のファイルの変更65行の追加28行の削除
  1. 55
    23
      Marlin/Marlin_main.cpp
  2. 10
    5
      Marlin/ultralcd.cpp

+ 55
- 23
Marlin/Marlin_main.cpp ファイルの表示

@@ -5866,7 +5866,7 @@ inline void gcode_M17() {
5866 5866
       idle();
5867 5867
       heaters_heating = false;
5868 5868
       HOTEND_LOOP() {
5869
-        if (thermalManager.degTargetHotend(e) && abs(thermalManager.degHotend(e) - thermalManager.degTargetHotend(e)) > 3) {
5869
+        if (thermalManager.degTargetHotend(e) && abs(thermalManager.degHotend(e) - thermalManager.degTargetHotend(e)) > TEMP_HYSTERESIS) {
5870 5870
           heaters_heating = true;
5871 5871
           #if ENABLED(ULTIPANEL)
5872 5872
             lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT);
@@ -5882,7 +5882,7 @@ inline void gcode_M17() {
5882 5882
   ) {
5883 5883
     if (move_away_flag) return false; // already paused
5884 5884
 
5885
-    if (!DEBUGGING(DRYRUN) && unload_length != 0) {
5885
+    if (!DEBUGGING(DRYRUN) && (unload_length != 0 || retract != 0)) {
5886 5886
       #if ENABLED(PREVENT_COLD_EXTRUSION)
5887 5887
         if (!thermalManager.allow_cold_extrude &&
5888 5888
             thermalManager.degTargetHotend(active_extruder) < thermalManager.extrude_min_temp) {
@@ -5919,10 +5919,11 @@ inline void gcode_M17() {
5919 5919
     COPY(resume_position, current_position);
5920 5920
     set_destination_to_current();
5921 5921
 
5922
-    // Initial retract before move to filament change position
5923
-    destination[E_AXIS] += retract;
5924
-
5925
-    RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE);
5922
+    if (retract) {
5923
+      // Initial retract before move to filament change position
5924
+      destination[E_AXIS] += retract;
5925
+      RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE);
5926
+    }
5926 5927
 
5927 5928
     // Lift Z axis
5928 5929
     if (z_lift > 0) {
@@ -5951,23 +5952,25 @@ inline void gcode_M17() {
5951 5952
       destination[E_AXIS] += unload_length;
5952 5953
       RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE);
5953 5954
       stepper.synchronize();
5955
+    }
5954 5956
 
5955
-      if (show_lcd) {
5956
-        #if ENABLED(ULTIPANEL)
5957
-          lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
5958
-        #endif
5959
-      }
5960
-
5961
-      #if HAS_BUZZER
5962
-        filament_change_beep(max_beep_count, true);
5957
+    if (show_lcd) {
5958
+      #if ENABLED(ULTIPANEL)
5959
+        lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
5963 5960
       #endif
5964
-
5965
-      idle();
5966 5961
     }
5967 5962
 
5968
-    // Disable extruders steppers for manual filament changing
5969
-    disable_e_steppers();
5970
-    safe_delay(100);
5963
+    #if HAS_BUZZER
5964
+      filament_change_beep(max_beep_count, true);
5965
+    #endif
5966
+
5967
+    idle();
5968
+
5969
+    // Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
5970
+    #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
5971
+      disable_e_steppers();
5972
+      safe_delay(100);
5973
+    #endif
5971 5974
 
5972 5975
     // Start the heater idle timers
5973 5976
     const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
@@ -5989,14 +5992,43 @@ inline void gcode_M17() {
5989 5992
         filament_change_beep(max_beep_count);
5990 5993
       #endif
5991 5994
 
5995
+      // If the nozzle has timed out, wait for the user to press the button to re-heat the nozzle, then
5996
+      // re-heat the nozzle, re-show the insert screen, restart the idle timers, and start over
5992 5997
       if (!nozzle_timed_out)
5993 5998
         HOTEND_LOOP()
5994 5999
           nozzle_timed_out |= thermalManager.is_heater_idle(e);
5995 6000
 
5996
-      #if ENABLED(ULTIPANEL)
5997
-        if (nozzle_timed_out)
6001
+      if (nozzle_timed_out) {
6002
+        #if ENABLED(ULTIPANEL)
5998 6003
           lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE);
5999
-      #endif
6004
+        #endif
6005
+
6006
+        // Wait for LCD click or M108
6007
+        while (wait_for_user) idle(true);
6008
+
6009
+        // Re-enable the heaters if they timed out
6010
+        HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e);
6011
+
6012
+        // Wait for the heaters to reach the target temperatures
6013
+        ensure_safe_temperature();
6014
+
6015
+        #if ENABLED(ULTIPANEL)
6016
+          lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
6017
+        #endif
6018
+
6019
+        // Start the heater idle timers
6020
+        const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
6021
+
6022
+        HOTEND_LOOP()
6023
+          thermalManager.start_heater_idle_timer(e, nozzle_timeout);
6024
+
6025
+        wait_for_user = true; /* Wait for user to load filament */
6026
+        nozzle_timed_out = false;
6027
+
6028
+        #if HAS_BUZZER
6029
+          filament_change_beep(max_beep_count, true);
6030
+        #endif
6031
+      }
6000 6032
 
6001 6033
       idle(true);
6002 6034
     }
@@ -7643,7 +7675,7 @@ inline void gcode_M18_M84() {
7643 7675
       if (parser.seen('X')) disable_X();
7644 7676
       if (parser.seen('Y')) disable_Y();
7645 7677
       if (parser.seen('Z')) disable_Z();
7646
-      #if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
7678
+      #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN // Only enable on boards that have seperate ENABLE_PINS
7647 7679
         if (parser.seen('E')) disable_e_steppers();
7648 7680
       #endif
7649 7681
     }

+ 10
- 5
Marlin/ultralcd.cpp ファイルの表示

@@ -1107,11 +1107,16 @@ void kill_screen(const char* lcd_msg) {
1107 1107
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
1108 1108
 
1109 1109
     void lcd_enqueue_filament_change() {
1110
-      if (!DEBUGGING(DRYRUN) && thermalManager.tooColdToExtrude(active_extruder)) {
1111
-        lcd_save_previous_screen();
1112
-        lcd_goto_screen(lcd_advanced_pause_toocold_menu);
1113
-        return;
1114
-      }
1110
+
1111
+      #if ENABLED(PREVENT_COLD_EXTRUSION)
1112
+        if (!DEBUGGING(DRYRUN) && !thermalManager.allow_cold_extrude &&
1113
+            thermalManager.degTargetHotend(active_extruder) < thermalManager.extrude_min_temp) {
1114
+          lcd_save_previous_screen();
1115
+          lcd_goto_screen(lcd_advanced_pause_toocold_menu);
1116
+          return;
1117
+        }
1118
+      #endif
1119
+
1115 1120
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT);
1116 1121
       enqueue_and_echo_commands_P(PSTR("M600 B0"));
1117 1122
     }

読み込み中…
キャンセル
保存