Browse Source

Ensure XY known for Z safe homing

Addressing #18143
Scott Lahteine 4 years ago
parent
commit
5f9624f70b
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Marlin/src/gcode/calibrate/G28.cpp

+ 4
- 1
Marlin/src/gcode/calibrate/G28.cpp View File

294
 
294
 
295
   #else // NOT DELTA
295
   #else // NOT DELTA
296
 
296
 
297
-    const bool homeX = parser.seen('X'), homeY = parser.seen('Y'), homeZ = parser.seen('Z'),
297
+    const bool homeZ = parser.seen('Z'),
298
+               needX = homeZ && TERN0(Z_SAFE_HOMING, axes_need_homing(_BV(X_AXIS))),
299
+               needY = homeZ && TERN0(Z_SAFE_HOMING, axes_need_homing(_BV(Y_AXIS))),
300
+               homeX = needX || parser.seen('X'), homeY = needY || parser.seen('Y'),
298
                home_all = homeX == homeY && homeX == homeZ, // All or None
301
                home_all = homeX == homeY && homeX == homeZ, // All or None
299
                doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;
302
                doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;
300
 
303
 

Loading…
Cancel
Save