Pause and PLR refinements
- Move `pause_print` argument `unload_length` after `show_lcd` so it's next to `DXC_ARGS`. - Tweak the position and conditions of PLR save in `resume_print`. - Add `Nozzle::park_mode_0_height` accessor to get the raised Z height. - Remove extraneous `recovery.save` from `dwin.cpp`. - Move PLR `info.volumetric...` to `flag`. - Remove some G-code spaces in PLR code - Document `pause.h` function declarations.
This commit is contained in:
@ -225,6 +225,18 @@ Nozzle nozzle;
|
||||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
|
||||
float Nozzle::park_mode_0_height(const_float_t park_z) {
|
||||
// Apply a minimum raise, if specified. Use park.z as a minimum height instead.
|
||||
return _MAX(park_z, // Minimum height over 0 based on input
|
||||
_MIN(Z_MAX_POS, // Maximum height is fixed
|
||||
#ifdef NOZZLE_PARK_Z_RAISE_MIN
|
||||
NOZZLE_PARK_Z_RAISE_MIN + // Minimum raise...
|
||||
#endif
|
||||
current_position.z // ...over current position
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
void Nozzle::park(const uint8_t z_action, const xyz_pos_t &park/*=NOZZLE_PARK_POINT*/) {
|
||||
constexpr feedRate_t fr_xy = NOZZLE_PARK_XY_FEEDRATE, fr_z = NOZZLE_PARK_Z_FEEDRATE;
|
||||
|
||||
@ -237,15 +249,9 @@ Nozzle nozzle;
|
||||
do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
|
||||
break;
|
||||
|
||||
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;
|
||||
default: // Raise by NOZZLE_PARK_Z_RAISE_MIN, use park.z as a minimum height
|
||||
do_blocking_move_to_z(park_mode_0_height(park.z), fr_z);
|
||||
break;
|
||||
}
|
||||
|
||||
do_blocking_move_to_xy(
|
||||
|
@ -83,6 +83,7 @@ class Nozzle {
|
||||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
|
||||
static float park_mode_0_height(const_float_t park_z) _Os;
|
||||
static void park(const uint8_t z_action, const xyz_pos_t &park=NOZZLE_PARK_POINT) _Os;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user