[2.0.x] Add O (optional) flag to G28/G29 (#10913)
This commit is contained in:
committed by
Scott Lahteine
parent
2ddba201c0
commit
86170e6a66
@ -152,6 +152,8 @@
|
||||
* None Home to all axes with no parameters.
|
||||
* 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
|
||||
*
|
||||
* Cartesian/SCARA parameters
|
||||
@ -170,6 +172,16 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) && 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!
|
||||
planner.synchronize();
|
||||
|
||||
|
Reference in New Issue
Block a user