[2.0.x] Use NOZZLE_PARK_FEATURE for ADVANCED_PAUSE_FEATURE (#8866)
* Use NOZZLE_PARK_FEATURE for ADVANCED_PAUSE_FEATURE
This commit is contained in:
committed by
Scott Lahteine
parent
705ea98fd3
commit
f0a8a1a853
@ -162,23 +162,24 @@
|
||||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
|
||||
void Nozzle::park(const uint8_t &z_action) {
|
||||
const point_t park = NOZZLE_PARK_POINT;
|
||||
void Nozzle::park(const uint8_t &z_action, const point_t &park /*= NOZZLE_PARK_POINT*/) {
|
||||
const float fr_xy = NOZZLE_PARK_XY_FEEDRATE;
|
||||
const float fr_z = NOZZLE_PARK_Z_FEEDRATE;
|
||||
|
||||
switch (z_action) {
|
||||
case 1: // Go to Z-park height
|
||||
do_blocking_move_to_z(park.z);
|
||||
do_blocking_move_to_z(park.z, fr_z);
|
||||
break;
|
||||
|
||||
case 2: // Raise by Z-park height
|
||||
do_blocking_move_to_z(min(current_position[Z_AXIS] + park.z, Z_MAX_POS));
|
||||
do_blocking_move_to_z(min(current_position[Z_AXIS] + 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_AXIS]));
|
||||
do_blocking_move_to_z(max(park.z, current_position[Z_AXIS]), fr_z);
|
||||
}
|
||||
|
||||
do_blocking_move_to_xy(park.x, park.y);
|
||||
do_blocking_move_to_xy(park.x, park.y, fr_xy);
|
||||
}
|
||||
|
||||
#endif // NOZZLE_PARK_FEATURE
|
||||
|
@ -86,7 +86,7 @@ class Nozzle {
|
||||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
|
||||
static void park(const uint8_t &z_action) _Os;
|
||||
static void park(const uint8_t &z_action, const point_t &park = NOZZLE_PARK_POINT) _Os;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
Reference in New Issue
Block a user