Add Filament Change accelerations
This commit is contained in:
parent
71d3523254
commit
2d9b0a66fe
9 changed files with 135 additions and 86 deletions
|
@ -904,16 +904,22 @@
|
||||||
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
||||||
// This short retract is done immediately, before parking the nozzle.
|
// This short retract is done immediately, before parking the nozzle.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||||
|
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
||||||
// For Bowden, the full length of the tube and nozzle.
|
// For Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the nozzle.
|
// For direct drive, the full length of the nozzle.
|
||||||
// Set to 0 for manual unloading.
|
// Set to 0 for manual unloading.
|
||||||
#define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||||
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||||
|
// 0 to disable start loading and skip to fast load only
|
||||||
|
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||||
|
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||||
|
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||||
// For Bowden, the full length of the tube and nozzle.
|
// For Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the nozzle.
|
// For direct drive, the full length of the nozzle.
|
||||||
#define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||||
#define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
|
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
||||||
|
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
|
||||||
// Set to 0 for manual extrusion.
|
// Set to 0 for manual extrusion.
|
||||||
// Filament can be extruded repeatedly from the Filament Change menu
|
// Filament can be extruded repeatedly from the Filament Change menu
|
||||||
// until extrusion is consistent, and to purge old filament.
|
// until extrusion is consistent, and to purge old filament.
|
||||||
|
@ -922,7 +928,6 @@
|
||||||
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
|
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
|
||||||
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
||||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
||||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
|
||||||
|
|
||||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||||
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
||||||
|
|
|
@ -904,16 +904,22 @@
|
||||||
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
||||||
// This short retract is done immediately, before parking the nozzle.
|
// This short retract is done immediately, before parking the nozzle.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||||
|
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
||||||
// For Bowden, the full length of the tube and nozzle.
|
// For Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the nozzle.
|
// For direct drive, the full length of the nozzle.
|
||||||
// Set to 0 for manual unloading.
|
// Set to 0 for manual unloading.
|
||||||
#define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||||
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||||
|
// 0 to disable start loading and skip to fast load only
|
||||||
|
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||||
|
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||||
|
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||||
// For Bowden, the full length of the tube and nozzle.
|
// For Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the nozzle.
|
// For direct drive, the full length of the nozzle.
|
||||||
#define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||||
#define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
|
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
||||||
|
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
|
||||||
// Set to 0 for manual extrusion.
|
// Set to 0 for manual extrusion.
|
||||||
// Filament can be extruded repeatedly from the Filament Change menu
|
// Filament can be extruded repeatedly from the Filament Change menu
|
||||||
// until extrusion is consistent, and to purge old filament.
|
// until extrusion is consistent, and to purge old filament.
|
||||||
|
@ -922,7 +928,6 @@
|
||||||
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
|
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
|
||||||
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
||||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
||||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
|
||||||
|
|
||||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||||
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
||||||
|
|
|
@ -137,7 +137,7 @@ static void do_pause_e_move(const float &length, const float &fr) {
|
||||||
*
|
*
|
||||||
* Returns 'true' if load was completed, 'false' for abort
|
* Returns 'true' if load was completed, 'false' for abort
|
||||||
*/
|
*/
|
||||||
bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
|
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*/,
|
||||||
const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
|
const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
|
||||||
const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
|
const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
|
||||||
) {
|
) {
|
||||||
|
@ -184,8 +184,22 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
||||||
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
|
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Load filament
|
// Slow Load filament
|
||||||
if (load_length) do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE);
|
if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
|
||||||
|
|
||||||
|
// Fast Load Filament
|
||||||
|
if (fast_load_length) {
|
||||||
|
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
||||||
|
const float saved_acceleration = planner.retract_acceleration;
|
||||||
|
planner.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
|
||||||
|
|
||||||
|
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
||||||
|
planner.retract_acceleration = saved_acceleration;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
|
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
|
||||||
|
|
||||||
|
@ -196,7 +210,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
||||||
|
|
||||||
wait_for_user = true;
|
wait_for_user = true;
|
||||||
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
||||||
do_pause_e_move(1, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
|
do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||||
wait_for_user = false;
|
wait_for_user = false;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -210,7 +224,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Extrude filament to get into hotend
|
// Extrude filament to get into hotend
|
||||||
do_pause_e_move(purge_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
|
do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show "Purge More" / "Resume" menu and wait for reply
|
// Show "Purge More" / "Resume" menu and wait for reply
|
||||||
|
@ -277,8 +291,17 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
|
||||||
do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]);
|
do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]);
|
||||||
|
|
||||||
// Unload filament
|
// Unload filament
|
||||||
|
#if FILAMENT_CHANGE_UNLOAD_ACCEL > 0
|
||||||
|
const float saved_acceleration = planner.retract_acceleration;
|
||||||
|
planner.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
|
||||||
|
#endif
|
||||||
|
|
||||||
do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE);
|
do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE);
|
||||||
|
|
||||||
|
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
||||||
|
planner.retract_acceleration = saved_acceleration;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
|
// Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
|
||||||
#if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
|
#if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
|
||||||
disable_e_stepper(active_extruder);
|
disable_e_stepper(active_extruder);
|
||||||
|
@ -477,7 +500,7 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/) {
|
||||||
* - Send host action for resume, if configured
|
* - Send host action for resume, if configured
|
||||||
* - Resume the current SD print job, if any
|
* - Resume the current SD print job, if any
|
||||||
*/
|
*/
|
||||||
void resume_print(const float &load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_EXTRUDE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
|
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*/) {
|
||||||
if (!did_pause_print) return;
|
if (!did_pause_print) return;
|
||||||
|
|
||||||
// Re-enable the heaters if they timed out
|
// 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
|
||||||
|
|
||||||
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
|
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
|
||||||
// Load the new filament
|
// Load the new filament
|
||||||
load_filament(load_length, purge_length, max_beep_count, true, nozzle_timed_out);
|
load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(ULTIPANEL)
|
#if ENABLED(ULTIPANEL)
|
||||||
|
@ -503,6 +526,7 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
|
||||||
if (fwretract.retracted[active_extruder])
|
if (fwretract.retracted[active_extruder])
|
||||||
do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
|
do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If resume_position is negative
|
// If resume_position is negative
|
||||||
if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
|
if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
|
||||||
|
|
||||||
|
@ -514,7 +538,7 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
|
||||||
|
|
||||||
// Now all extrusion positions are resumed and ready to be confirmed
|
// Now all extrusion positions are resumed and ready to be confirmed
|
||||||
// Set extruder to saved position
|
// Set extruder to saved position
|
||||||
planner.set_e_position_mm(destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]);
|
planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]));
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
runout.reset();
|
runout.reset();
|
||||||
|
|
|
@ -71,9 +71,9 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
|
||||||
|
|
||||||
void wait_for_filament_reload(const int8_t max_beep_count=0);
|
void wait_for_filament_reload(const int8_t max_beep_count=0);
|
||||||
|
|
||||||
void resume_print(const float &load_length=0, const float &extrude_length=ADVANCED_PAUSE_EXTRUDE_LENGTH, const int8_t max_beep_count=0);
|
void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0);
|
||||||
|
|
||||||
bool load_filament(const float &load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
|
bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
|
||||||
const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
|
const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
|
||||||
|
|
||||||
bool unload_filament(const float &unload_length, const bool show_lcd=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
|
bool unload_filament(const float &unload_length, const bool show_lcd=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
|
||||||
|
|
|
@ -80,13 +80,13 @@ void GcodeSuite::M600() {
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Lift Z axis
|
||||||
|
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
|
||||||
|
|
||||||
// Move XY axes to filament change position or given position
|
// Move XY axes to filament change position or given position
|
||||||
if (parser.seenval('X')) park_point.x = parser.linearval('X');
|
if (parser.seenval('X')) park_point.x = parser.linearval('X');
|
||||||
if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
|
if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
|
||||||
|
|
||||||
// Lift Z axis
|
|
||||||
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
|
|
||||||
|
|
||||||
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
|
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
|
||||||
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
|
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
|
||||||
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
|
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
|
||||||
|
@ -96,8 +96,11 @@ void GcodeSuite::M600() {
|
||||||
const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
|
const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
|
||||||
: filament_change_unload_length[active_extruder]);
|
: filament_change_unload_length[active_extruder]);
|
||||||
|
|
||||||
// Load filament
|
// Slow load filament
|
||||||
const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
|
constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
|
||||||
|
|
||||||
|
// Fast load filament
|
||||||
|
const float fast_load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
|
||||||
: filament_change_load_length[active_extruder]);
|
: filament_change_load_length[active_extruder]);
|
||||||
|
|
||||||
const int beep_count = parser.intval('B',
|
const int beep_count = parser.intval('B',
|
||||||
|
@ -112,7 +115,7 @@ void GcodeSuite::M600() {
|
||||||
|
|
||||||
if (pause_print(retract, park_point, unload_length, true)) {
|
if (pause_print(retract, park_point, unload_length, true)) {
|
||||||
wait_for_filament_reload(beep_count);
|
wait_for_filament_reload(beep_count);
|
||||||
resume_print(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, beep_count);
|
resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EXTRUDERS > 1
|
#if EXTRUDERS > 1
|
||||||
|
|
|
@ -60,10 +60,6 @@ void GcodeSuite::M701() {
|
||||||
// Z axis lift
|
// Z axis lift
|
||||||
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
|
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
|
||||||
|
|
||||||
// Load filament
|
|
||||||
const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) :
|
|
||||||
filament_change_load_length[target_extruder]);
|
|
||||||
|
|
||||||
// Show initial "wait for load" message
|
// Show initial "wait for load" message
|
||||||
#if ENABLED(ULTIPANEL)
|
#if ENABLED(ULTIPANEL)
|
||||||
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
|
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
|
||||||
|
@ -80,8 +76,12 @@ void GcodeSuite::M701() {
|
||||||
if (park_point.z > 0)
|
if (park_point.z > 0)
|
||||||
do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
|
do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
|
||||||
|
|
||||||
load_filament(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS, true,
|
// Load filament
|
||||||
thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
|
constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
|
||||||
|
const float fast_load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
|
||||||
|
: filament_change_load_length[active_extruder]);
|
||||||
|
load_filament(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS,
|
||||||
|
true, thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
|
||||||
|
|
||||||
// Restore Z axis
|
// Restore Z axis
|
||||||
if (park_point.z > 0)
|
if (park_point.z > 0)
|
||||||
|
|
|
@ -1048,6 +1048,10 @@
|
||||||
#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
|
#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
|
||||||
#define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
|
#define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
|
||||||
|
|
||||||
|
#if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH)
|
||||||
|
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only constrain Z on DELTA / SCARA machines
|
* Only constrain Z on DELTA / SCARA machines
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -133,8 +133,12 @@
|
||||||
#error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
|
#error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
|
||||||
#elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
|
#elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
|
||||||
#error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
|
#error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
|
||||||
|
#elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE)
|
||||||
|
#error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
|
||||||
#elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
|
#elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
|
||||||
#error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_EXTRUDE_LENGTH. Please update your configuration."
|
#error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
|
||||||
|
#elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH)
|
||||||
|
#error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
|
||||||
#elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
|
#elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
|
||||||
#error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
|
#error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
|
||||||
#elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
|
#elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
|
||||||
|
@ -264,6 +268,8 @@
|
||||||
#error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h."
|
#error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h."
|
||||||
#elif defined(AUTOMATIC_CURRENT_CONTROL)
|
#elif defined(AUTOMATIC_CURRENT_CONTROL)
|
||||||
#error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
|
#error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
|
||||||
|
#elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
|
||||||
|
#error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -493,8 +499,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||||
#error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
|
#error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
|
||||||
#elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
|
#elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
|
||||||
#error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
|
#error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
|
||||||
#elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_LOAD_LENGTH > EXTRUDE_MAXLENGTH
|
#elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH
|
||||||
#error "FILAMENT_CHANGE_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
|
#error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
|
||||||
|
#elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH
|
||||||
|
#error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1878,7 +1878,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
for (uint8_t e = 0; e < E_STEPPERS; e++) {
|
for (uint8_t e = 0; e < E_STEPPERS; e++) {
|
||||||
filament_change_unload_length[e] = FILAMENT_CHANGE_UNLOAD_LENGTH;
|
filament_change_unload_length[e] = FILAMENT_CHANGE_UNLOAD_LENGTH;
|
||||||
filament_change_load_length[e] = FILAMENT_CHANGE_LOAD_LENGTH;
|
filament_change_load_length[e] = FILAMENT_CHANGE_FAST_LOAD_LENGTH;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Reference in a new issue