瀏覽代碼

Use position_is_reachable in G29, M48

Scott Lahteine 8 年之前
父節點
當前提交
fd9b8ae4d4
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    2
      Marlin/Marlin_main.cpp

+ 4
- 2
Marlin/Marlin_main.cpp 查看文件

@@ -3541,7 +3541,8 @@ inline void gcode_G28() {
3541 3541
 
3542 3542
           #if ENABLED(DELTA)
3543 3543
             // Avoid probing outside the round or hexagonal area of a delta printer
3544
-            if (HYPOT2(xProbe, yProbe) > sq(DELTA_PROBEABLE_RADIUS) + 0.1) continue;
3544
+            float pos[XYZ] = { xProbe + X_PROBE_OFFSET_FROM_EXTRUDER, yProbe + Y_PROBE_OFFSET_FROM_EXTRUDER, 0 };
3545
+            if (!position_is_reachable(pos)) continue;
3545 3546
           #endif
3546 3547
 
3547 3548
           measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
@@ -4215,7 +4216,8 @@ inline void gcode_M42() {
4215 4216
         return;
4216 4217
       }
4217 4218
     #else
4218
-      if (HYPOT(RAW_X_POSITION(X_probe_location), RAW_Y_POSITION(Y_probe_location)) > DELTA_PROBEABLE_RADIUS) {
4219
+      float pos[XYZ] = { X_probe_location, Y_probe_location, 0 };
4220
+      if (!position_is_reachable(pos)) {
4219 4221
         SERIAL_PROTOCOLLNPGM("? (X,Y) location outside of probeable radius.");
4220 4222
         return;
4221 4223
       }

Loading…
取消
儲存