Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Marlin/src/feature/pause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));

// Move Z_AXIS to saved position
do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
plan_line_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
planner.synchronize();
}

// Unretract
Expand Down
11 changes: 11 additions & 0 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,17 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {

#endif // DUAL_X_CARRIAGE

void plan_line_to_z(const float z, const feedRate_t fr) {
/// save default value
feedRate_t dfr = feedrate_mm_s;
destination = current_position;
destination.z += z;
feedrate_mm_s = fr;
prepare_line_to_destination();
/// restore the default
feedrate_mm_s = dfr;
}

/**
* Prepare a single move and get ready for the next one
*
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/module/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ void line_to_current_position(const_feedRate_t fr_mm_s=feedrate_mm_s);
void unscaled_e_move(const_float_t length, const_feedRate_t fr_mm_s);
#endif


/**
* Plans non-blocking linear movement in Z axis.
* This uses prepare_line_to_destination() that counts with UBL
*/
void plan_line_to_z(const float z, const feedRate_t fr);

void prepare_line_to_destination();

void _internal_move_to_destination(const_feedRate_t fr_mm_s=0.0f
Expand Down