Optional homing/leveling with O parameter
Based on #10913 Co-Authored-By: dot-bob <gibben@gmail.com>
This commit is contained in:
parent
fe69cf8a5d
commit
1d048f5192
@ -4049,6 +4049,8 @@ inline void gcode_G4() {
|
|||||||
* None Home to all axes with no parameters.
|
* None Home to all axes with no parameters.
|
||||||
* With QUICK_HOME enabled XY will home together, then Z.
|
* With QUICK_HOME enabled XY will home together, then Z.
|
||||||
*
|
*
|
||||||
|
* O Home only if position is unknown
|
||||||
|
*
|
||||||
* Rn Raise by n mm/inches before homing
|
* Rn Raise by n mm/inches before homing
|
||||||
*
|
*
|
||||||
* Cartesian parameters
|
* Cartesian parameters
|
||||||
@ -4067,6 +4069,16 @@ inline void gcode_G28(const bool always_home_all) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (all_axes_known() && parser.boolval('O')) { // home only if needed
|
||||||
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
if (DEBUGGING(LEVELING)) {
|
||||||
|
SERIAL_ECHOLNPGM("> homing not needed, skip");
|
||||||
|
SERIAL_ECHOLNPGM("<<< G28");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Wait for planner moves to finish!
|
// Wait for planner moves to finish!
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
@ -4488,6 +4500,8 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
*
|
*
|
||||||
* Enhanced G29 Auto Bed Leveling Probe Routine
|
* Enhanced G29 Auto Bed Leveling Probe Routine
|
||||||
*
|
*
|
||||||
|
* O Auto-level only if needed
|
||||||
|
*
|
||||||
* D Dry-Run mode. Just evaluate the bed Topology - Don't apply
|
* D Dry-Run mode. Just evaluate the bed Topology - Don't apply
|
||||||
* or alter the bed level data. Useful to check the topology
|
* or alter the bed level data. Useful to check the topology
|
||||||
* after a first run of G29.
|
* after a first run of G29.
|
||||||
@ -4594,6 +4608,16 @@ void home_all_axes() { gcode_G28(true); }
|
|||||||
// Don't allow auto-leveling without homing first
|
// Don't allow auto-leveling without homing first
|
||||||
if (axis_unhomed_error()) return;
|
if (axis_unhomed_error()) return;
|
||||||
|
|
||||||
|
if (!no_action && planner.leveling_active && parser.boolval('O')) { // Auto-level only if needed
|
||||||
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
if (DEBUGGING(LEVELING)) {
|
||||||
|
SERIAL_ECHOLNPGM("> Auto-level not needed, skip");
|
||||||
|
SERIAL_ECHOLNPGM("<<< G29");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Define local vars 'static' for manual probing, 'auto' otherwise
|
// Define local vars 'static' for manual probing, 'auto' otherwise
|
||||||
#if ENABLED(PROBE_MANUALLY)
|
#if ENABLED(PROBE_MANUALLY)
|
||||||
#define ABL_VAR static
|
#define ABL_VAR static
|
||||||
|
Loading…
Reference in New Issue
Block a user