✨ G27 P3 / P4 (#26401)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
bf5612c0ed
commit
b2758208c7
|
@ -29,7 +29,14 @@
|
|||
#include "../../../module/motion.h"
|
||||
|
||||
/**
|
||||
* G27: Park the nozzle
|
||||
* G27: Park the nozzle according with the given style
|
||||
*
|
||||
* P<style> - Parking style:
|
||||
* 0 = (Default) Relative raise by NOZZLE_PARK_Z_RAISE_MIN (>= NOZZLE_PARK_POINT.z) before XY parking.
|
||||
* 1 = Absolute move to NOZZLE_PARK_POINT.z before XY parking. (USE WITH CAUTION!)
|
||||
* 2 = Relative raise by NOZZLE_PARK_POINT.z before XY parking.
|
||||
* 3 = Relative raise by NOZZLE_PARK_Z_RAISE_MIN, skip XY parking.
|
||||
* 4 = No Z raise. Just XY parking.
|
||||
*/
|
||||
void GcodeSuite::G27() {
|
||||
// Don't allow nozzle parking without homing first
|
||||
|
|
|
@ -274,12 +274,21 @@ Nozzle nozzle;
|
|||
do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
|
||||
break;
|
||||
|
||||
case 3: { // Raise by NOZZLE_PARK_Z_RAISE_MIN, bypass XY-park position
|
||||
do_blocking_move_to_z(park_mode_0_height(0), fr_z);
|
||||
goto SKIP_XY_MOVE;
|
||||
} break;
|
||||
|
||||
case 4: // Skip Z raise, go to XY position
|
||||
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;
|
||||
}
|
||||
#endif // HAS_Z_AXIS
|
||||
|
||||
{
|
||||
#ifndef NOZZLE_PARK_MOVE
|
||||
#define NOZZLE_PARK_MOVE 0
|
||||
#endif
|
||||
|
@ -293,7 +302,9 @@ Nozzle nozzle;
|
|||
case 4: do_blocking_move_to_y(park.y, fr_xy);
|
||||
do_blocking_move_to_x(park.x, fr_xy); break;
|
||||
}
|
||||
}
|
||||
|
||||
SKIP_XY_MOVE:
|
||||
report_current_position();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue