2.0 Fix for bad Pause extruder position resuming (#9029)
This commit is contained in:
parent
41246b45f1
commit
31582caa07
|
@ -37,6 +37,10 @@
|
||||||
#include "../module/printcounter.h"
|
#include "../module/printcounter.h"
|
||||||
#include "../module/temperature.h"
|
#include "../module/temperature.h"
|
||||||
|
|
||||||
|
#if ENABLED(FWRETRACT)
|
||||||
|
#include "../feature/fwretract.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
#include "../feature/runout.h"
|
#include "../feature/runout.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -329,13 +333,26 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l
|
||||||
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_RESUME);
|
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_RESUME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set extruder to saved position
|
// Intelligent resuming
|
||||||
planner.set_e_position_mm((current_position[E_AXIS] = resume_position[E_AXIS]));
|
#if ENABLED(FWRETRACT)
|
||||||
|
// If retracted before goto pause
|
||||||
|
if (fwretract.retracted[active_extruder])
|
||||||
|
do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
|
||||||
|
#else
|
||||||
|
// If resume_position negative
|
||||||
|
if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Move XY to starting position, then Z
|
// Move XY to starting position, then Z
|
||||||
do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], NOZZLE_PARK_XY_FEEDRATE);
|
do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], NOZZLE_PARK_XY_FEEDRATE);
|
||||||
|
|
||||||
|
// Set Z_AXIS to saved position
|
||||||
do_blocking_move_to_z(resume_position[Z_AXIS], NOZZLE_PARK_Z_FEEDRATE);
|
do_blocking_move_to_z(resume_position[Z_AXIS], NOZZLE_PARK_Z_FEEDRATE);
|
||||||
|
|
||||||
|
// Now all extrusion positions are resumed and ready to be confirmed
|
||||||
|
// Set extruder to saved position
|
||||||
|
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)
|
||||||
filament_ran_out = false;
|
filament_ran_out = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue