瀏覽代碼

Ensure XY known for Z safe homing

Addressing #18143
Scott Lahteine 4 年之前
父節點
當前提交
5f9624f70b
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      Marlin/src/gcode/calibrate/G28.cpp

+ 4
- 1
Marlin/src/gcode/calibrate/G28.cpp 查看文件

@@ -294,7 +294,10 @@ void GcodeSuite::G28() {
294 294
 
295 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 301
                home_all = homeX == homeY && homeX == homeZ, // All or None
299 302
                doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;
300 303
 

Loading…
取消
儲存