Add NOZZLE_PARK_Z_RAISE_MIN (#17624)

This commit is contained in:
Ondřej Nový 2020-04-25 05:39:08 +02:00 committed by GitHub
parent 3a27933ae7
commit d2a5d51f69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View file

@ -1501,6 +1501,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
#endif

View file

@ -575,7 +575,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
resume_position = current_position;
if (move_axes && all_axes_homed())
nozzle.park(2, park_point /*= NOZZLE_PARK_POINT*/);
nozzle.park(0, park_point /*= NOZZLE_PARK_POINT*/);
if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder);

View file

@ -412,7 +412,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
// Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
if (!axes_need_homing())
nozzle.park(2, park_point);
nozzle.park(0, park_point);
#if ENABLED(DUAL_X_CARRIAGE)
const int8_t saved_ext = active_extruder;

View file

@ -177,8 +177,15 @@ Nozzle nozzle;
do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
break;
default: // Raise to at least the Z-park height
do_blocking_move_to_z(_MAX(park.z, current_position.z), fr_z);
default: {
// Apply a minimum raise, overriding G27 Z
const float min_raised_z =_MIN(Z_MAX_POS, current_position.z
#ifdef NOZZLE_PARK_Z_RAISE_MIN
+ NOZZLE_PARK_Z_RAISE_MIN
#endif
);
do_blocking_move_to_z(_MAX(park.z, min_raised_z), fr_z);
} break;
}
do_blocking_move_to_xy(park, fr_xy);