|
@@ -137,7 +137,7 @@ static void do_pause_e_move(const float &length, const float &fr) {
|
137
|
137
|
*
|
138
|
138
|
* Returns 'true' if load was completed, 'false' for abort
|
139
|
139
|
*/
|
140
|
|
-bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
|
|
140
|
+bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
|
141
|
141
|
const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
|
142
|
142
|
const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
|
143
|
143
|
) {
|
|
@@ -184,8 +184,22 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
184
|
184
|
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
|
185
|
185
|
#endif
|
186
|
186
|
|
187
|
|
- // Load filament
|
188
|
|
- if (load_length) do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE);
|
|
187
|
+ // Slow Load filament
|
|
188
|
+ if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
|
|
189
|
+
|
|
190
|
+ // Fast Load Filament
|
|
191
|
+ if (fast_load_length) {
|
|
192
|
+ #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
|
193
|
+ const float saved_acceleration = planner.retract_acceleration;
|
|
194
|
+ planner.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
|
|
195
|
+ #endif
|
|
196
|
+
|
|
197
|
+ do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
|
|
198
|
+
|
|
199
|
+ #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
|
200
|
+ planner.retract_acceleration = saved_acceleration;
|
|
201
|
+ #endif
|
|
202
|
+ }
|
189
|
203
|
|
190
|
204
|
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
|
191
|
205
|
|
|
@@ -196,7 +210,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
196
|
210
|
|
197
|
211
|
wait_for_user = true;
|
198
|
212
|
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
199
|
|
- do_pause_e_move(1, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
|
|
213
|
+ do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
200
|
214
|
wait_for_user = false;
|
201
|
215
|
|
202
|
216
|
#else
|
|
@@ -210,7 +224,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
210
|
224
|
#endif
|
211
|
225
|
|
212
|
226
|
// Extrude filament to get into hotend
|
213
|
|
- do_pause_e_move(purge_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
|
|
227
|
+ do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
214
|
228
|
}
|
215
|
229
|
|
216
|
230
|
// Show "Purge More" / "Resume" menu and wait for reply
|
|
@@ -233,7 +247,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
233
|
247
|
#endif
|
234
|
248
|
);
|
235
|
249
|
|
236
|
|
- #endif
|
|
250
|
+ #endif
|
237
|
251
|
|
238
|
252
|
return true;
|
239
|
253
|
}
|
|
@@ -277,8 +291,17 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
|
277
|
291
|
do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]);
|
278
|
292
|
|
279
|
293
|
// Unload filament
|
|
294
|
+ #if FILAMENT_CHANGE_UNLOAD_ACCEL > 0
|
|
295
|
+ const float saved_acceleration = planner.retract_acceleration;
|
|
296
|
+ planner.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
|
|
297
|
+ #endif
|
|
298
|
+
|
280
|
299
|
do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE);
|
281
|
300
|
|
|
301
|
+ #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
|
302
|
+ planner.retract_acceleration = saved_acceleration;
|
|
303
|
+ #endif
|
|
304
|
+
|
282
|
305
|
// Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
|
283
|
306
|
#if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
|
284
|
307
|
disable_e_stepper(active_extruder);
|
|
@@ -477,7 +500,7 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/) {
|
477
|
500
|
* - Send host action for resume, if configured
|
478
|
501
|
* - Resume the current SD print job, if any
|
479
|
502
|
*/
|
480
|
|
-void resume_print(const float &load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_EXTRUDE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
|
|
503
|
+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*/) {
|
481
|
504
|
if (!did_pause_print) return;
|
482
|
505
|
|
483
|
506
|
// Re-enable the heaters if they timed out
|
|
@@ -489,7 +512,7 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
|
489
|
512
|
|
490
|
513
|
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
|
491
|
514
|
// Load the new filament
|
492
|
|
- load_filament(load_length, purge_length, max_beep_count, true, nozzle_timed_out);
|
|
515
|
+ load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out);
|
493
|
516
|
}
|
494
|
517
|
|
495
|
518
|
#if ENABLED(ULTIPANEL)
|
|
@@ -503,6 +526,7 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
|
503
|
526
|
if (fwretract.retracted[active_extruder])
|
504
|
527
|
do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
|
505
|
528
|
#endif
|
|
529
|
+
|
506
|
530
|
// If resume_position is negative
|
507
|
531
|
if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
|
508
|
532
|
|
|
@@ -514,7 +538,7 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
|
514
|
538
|
|
515
|
539
|
// Now all extrusion positions are resumed and ready to be confirmed
|
516
|
540
|
// Set extruder to saved position
|
517
|
|
- planner.set_e_position_mm(destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]);
|
|
541
|
+ planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]));
|
518
|
542
|
|
519
|
543
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
520
|
544
|
runout.reset();
|