|
@@ -84,26 +84,30 @@ fil_change_settings_t fc_settings[EXTRUDERS];
|
84
|
84
|
#endif
|
85
|
85
|
|
86
|
86
|
#if HAS_BUZZER
|
87
|
|
- static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {
|
|
87
|
+ static void impatient_beep(const int8_t max_beep_count, const bool restart=false) {
|
88
|
88
|
|
89
|
89
|
if (TERN0(HAS_LCD_MENU, pause_mode == PAUSE_MODE_PAUSE_PRINT)) return;
|
90
|
90
|
|
91
|
91
|
static millis_t next_buzz = 0;
|
92
|
92
|
static int8_t runout_beep = 0;
|
93
|
93
|
|
94
|
|
- if (init) next_buzz = runout_beep = 0;
|
|
94
|
+ if (restart) next_buzz = runout_beep = 0;
|
|
95
|
+
|
|
96
|
+ const bool always = max_beep_count < 0;
|
95
|
97
|
|
96
|
98
|
const millis_t ms = millis();
|
97
|
99
|
if (ELAPSED(ms, next_buzz)) {
|
98
|
|
- if (max_beep_count < 0 || runout_beep < max_beep_count + 5) { // Only beep as long as we're supposed to
|
99
|
|
- next_buzz = ms + ((max_beep_count < 0 || runout_beep < max_beep_count) ? 1000 : 500);
|
|
100
|
+ if (always || runout_beep < max_beep_count + 5) { // Only beep as long as we're supposed to
|
|
101
|
+ next_buzz = ms + ((always || runout_beep < max_beep_count) ? 1000 : 500);
|
100
|
102
|
BUZZ(50, 880 - (runout_beep & 1) * 220);
|
101
|
103
|
runout_beep++;
|
102
|
104
|
}
|
103
|
105
|
}
|
104
|
106
|
}
|
|
107
|
+ inline void first_impatient_beep(const int8_t max_beep_count) { impatient_beep(max_beep_count, true); }
|
105
|
108
|
#else
|
106
|
|
- inline void filament_change_beep(const int8_t, const bool=false) {}
|
|
109
|
+ inline void impatient_beep(const int8_t, const bool=false) {}
|
|
110
|
+ inline void first_impatient_beep(const int8_t) {}
|
107
|
111
|
#endif
|
108
|
112
|
|
109
|
113
|
/**
|
|
@@ -165,7 +169,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
165
|
169
|
#endif
|
166
|
170
|
SERIAL_ECHO_MSG(_PMSG(STR_FILAMENT_CHANGE_INSERT));
|
167
|
171
|
|
168
|
|
- filament_change_beep(max_beep_count, true);
|
|
172
|
+ first_impatient_beep(max_beep_count);
|
169
|
173
|
|
170
|
174
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
171
|
175
|
#if ENABLED(HOST_PROMPT_SUPPORT)
|
|
@@ -180,7 +184,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
180
|
184
|
#endif
|
181
|
185
|
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament")));
|
182
|
186
|
while (wait_for_user) {
|
183
|
|
- filament_change_beep(max_beep_count);
|
|
187
|
+ impatient_beep(max_beep_count);
|
184
|
188
|
idle_no_sleep();
|
185
|
189
|
}
|
186
|
190
|
}
|
|
@@ -448,7 +452,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
448
|
452
|
|
449
|
453
|
show_continue_prompt(is_reload);
|
450
|
454
|
|
451
|
|
- filament_change_beep(max_beep_count, true);
|
|
455
|
+ first_impatient_beep(max_beep_count);
|
452
|
456
|
|
453
|
457
|
// Start the heater idle timers
|
454
|
458
|
const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT);
|
|
@@ -468,7 +472,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
468
|
472
|
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_NOZZLE_PARKED)));
|
469
|
473
|
wait_for_user = true; // LCD click or M108 will clear this
|
470
|
474
|
while (wait_for_user) {
|
471
|
|
- filament_change_beep(max_beep_count);
|
|
475
|
+ impatient_beep(max_beep_count);
|
472
|
476
|
|
473
|
477
|
// If the nozzle has timed out...
|
474
|
478
|
if (!nozzle_timed_out)
|
|
@@ -508,7 +512,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
508
|
512
|
wait_for_user = true;
|
509
|
513
|
nozzle_timed_out = false;
|
510
|
514
|
|
511
|
|
- filament_change_beep(max_beep_count, true);
|
|
515
|
+ first_impatient_beep(max_beep_count);
|
512
|
516
|
}
|
513
|
517
|
idle_no_sleep();
|
514
|
518
|
}
|
|
@@ -539,7 +543,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
539
|
543
|
* - Send host action for resume, if configured
|
540
|
544
|
* - Resume the current SD print job, if any
|
541
|
545
|
*/
|
542
|
|
-void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {
|
|
546
|
+void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/, int16_t targetTemp/*=0*/ DXC_ARGS) {
|
543
|
547
|
/*
|
544
|
548
|
SERIAL_ECHOLNPAIR(
|
545
|
549
|
"start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode,
|
|
@@ -558,9 +562,17 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
|
558
|
562
|
thermalManager.reset_hotend_idle_timer(e);
|
559
|
563
|
}
|
560
|
564
|
|
|
565
|
+ if (targetTemp > thermalManager.degTargetHotend(active_extruder))
|
|
566
|
+ thermalManager.setTargetHotend(targetTemp, active_extruder);
|
|
567
|
+
|
561
|
568
|
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) // Load the new filament
|
562
|
569
|
load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out, PAUSE_MODE_SAME DXC_PASS);
|
563
|
570
|
|
|
571
|
+ if (targetTemp > 0) {
|
|
572
|
+ thermalManager.setTargetHotend(targetTemp, active_extruder);
|
|
573
|
+ thermalManager.wait_for_hotend(active_extruder, false);
|
|
574
|
+ }
|
|
575
|
+
|
564
|
576
|
TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_RESUME));
|
565
|
577
|
|
566
|
578
|
// Retract to prevent oozing
|