mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-29 23:07:42 +00:00
✨ 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"
|
#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() {
|
void GcodeSuite::G27() {
|
||||||
// Don't allow nozzle parking without homing first
|
// 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);
|
do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
|
||||||
break;
|
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
|
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);
|
do_blocking_move_to_z(park_mode_0_height(park.z), fr_z);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif // HAS_Z_AXIS
|
#endif // HAS_Z_AXIS
|
||||||
|
|
||||||
|
{
|
||||||
#ifndef NOZZLE_PARK_MOVE
|
#ifndef NOZZLE_PARK_MOVE
|
||||||
#define NOZZLE_PARK_MOVE 0
|
#define NOZZLE_PARK_MOVE 0
|
||||||
#endif
|
#endif
|
||||||
@ -293,7 +302,9 @@ Nozzle nozzle;
|
|||||||
case 4: do_blocking_move_to_y(park.y, fr_xy);
|
case 4: do_blocking_move_to_y(park.y, fr_xy);
|
||||||
do_blocking_move_to_x(park.x, fr_xy); break;
|
do_blocking_move_to_x(park.x, fr_xy); break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SKIP_XY_MOVE:
|
||||||
report_current_position();
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user