Browse Source

Add NOZZLE_PARK_Z_RAISE_MIN (#17624)

vanilla_fb_2.0.x
Ondřej Nový 5 years ago
committed by GitHub
parent
commit
d2a5d51f69
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Marlin/Configuration.h
  2. 2
      Marlin/src/feature/mmu2/mmu2.cpp
  3. 2
      Marlin/src/feature/pause.cpp
  4. 11
      Marlin/src/libs/nozzle.cpp

1
Marlin/Configuration.h

@ -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

2
Marlin/src/feature/mmu2/mmu2.cpp

@ -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);

2
Marlin/src/feature/pause.cpp

@ -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;

11
Marlin/src/libs/nozzle.cpp

@ -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);

Loading…
Cancel
Save