|
@@ -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
|
}
|
|
@@ -6049,7 +6081,7 @@ inline void gcode_M17() {
|
6049
|
6081
|
stepper.synchronize();
|
6050
|
6082
|
}
|
6051
|
6083
|
|
6052
|
|
- #if ENABLED(ULTIPANEL) && defined(ADVANCED_PAUSE_EXTRUDE_LENGTH) && ADVANCED_PAUSE_EXTRUDE_LENGTH > 0
|
|
6084
|
+ #if ENABLED(ULTIPANEL) && ADVANCED_PAUSE_EXTRUDE_LENGTH > 0
|
6053
|
6085
|
|
6054
|
6086
|
float extrude_length = initial_extrude_length;
|
6055
|
6087
|
|
|
@@ -6104,8 +6136,6 @@ inline void gcode_M17() {
|
6104
|
6136
|
filament_ran_out = false;
|
6105
|
6137
|
#endif
|
6106
|
6138
|
|
6107
|
|
- set_current_to_destination();
|
6108
|
|
-
|
6109
|
6139
|
#if ENABLED(ULTIPANEL)
|
6110
|
6140
|
// Show status screen
|
6111
|
6141
|
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
|
|
@@ -7643,7 +7673,7 @@ inline void gcode_M18_M84() {
|
7643
|
7673
|
if (parser.seen('X')) disable_X();
|
7644
|
7674
|
if (parser.seen('Y')) disable_Y();
|
7645
|
7675
|
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
|
|
7676
|
+ #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN // Only enable on boards that have separate ENABLE_PINS
|
7647
|
7677
|
if (parser.seen('E')) disable_e_steppers();
|
7648
|
7678
|
#endif
|
7649
|
7679
|
}
|