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,8 +1501,9 @@
#if ENABLED(NOZZLE_PARK_FEATURE) #if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise } // 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_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_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) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
#endif #endif
/** /**

View File

@ -575,7 +575,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
resume_position = current_position; resume_position = current_position;
if (move_axes && all_axes_homed()) 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); 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) // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
if (!axes_need_homing()) if (!axes_need_homing())
nozzle.park(2, park_point); nozzle.park(0, park_point);
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
const int8_t saved_ext = active_extruder; 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); do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
break; break;
default: // Raise to at least the Z-park height default: {
do_blocking_move_to_z(_MAX(park.z, current_position.z), fr_z); // 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); do_blocking_move_to_xy(park, fr_xy);