Add Filament Change accelerations
This commit is contained in:
@ -80,13 +80,13 @@ void GcodeSuite::M600() {
|
||||
#endif
|
||||
);
|
||||
|
||||
// Lift Z axis
|
||||
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
|
||||
|
||||
// Move XY axes to filament change position or given position
|
||||
if (parser.seenval('X')) park_point.x = parser.linearval('X');
|
||||
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)
|
||||
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
|
||||
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
|
||||
@ -96,9 +96,12 @@ void GcodeSuite::M600() {
|
||||
const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
|
||||
: filament_change_unload_length[active_extruder]);
|
||||
|
||||
// Load filament
|
||||
const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
|
||||
: filament_change_load_length[active_extruder]);
|
||||
// Slow load filament
|
||||
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]);
|
||||
|
||||
const int beep_count = parser.intval('B',
|
||||
#ifdef FILAMENT_CHANGE_ALERT_BEEPS
|
||||
@ -112,7 +115,7 @@ void GcodeSuite::M600() {
|
||||
|
||||
if (pause_print(retract, park_point, unload_length, true)) {
|
||||
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
|
||||
|
@ -60,10 +60,6 @@ void GcodeSuite::M701() {
|
||||
// Z axis lift
|
||||
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
|
||||
#if ENABLED(ULTIPANEL)
|
||||
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)
|
||||
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,
|
||||
thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
|
||||
// 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
|
||||
if (park_point.z > 0)
|
||||
|
Reference in New Issue
Block a user