浏览代码

Make G29 compatible with M206 Z and G92 Z

Use the raw position for mesh measurement. Otherwise the `M206` and
`M92` Z offsets will get canceled out by bed leveling. The downside is
`G29` will not compensate for a poorly set small `M206` fudge value.

To elaborate on this issue, imagine you are probing with a Z home
offset of -0.1, meaning when Z homes, -0.1 is the current position,
implying the ideal bed zero for the nozzle is 0.1mm higher than the Z
endstop. Ordinarily when printing, Z would raise 0.1mm higher.

What happens when we probe is that all points are measured with that
-0.1 included. So when bed leveling is enabled the `M206 Z` offset gets
exactly canceled out by the bed readings.
Scott Lahteine 7 年前
父节点
当前提交
37bc0fce62
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Marlin/Marlin_main.cpp

+ 1
- 1
Marlin/Marlin_main.cpp 查看文件

@@ -2278,7 +2278,7 @@ static void clean_up_after_endstop_or_probe_move() {
2278 2278
         SERIAL_ECHOLNPAIR(" Discrepancy:", first_probe_z - current_position[Z_AXIS]);
2279 2279
       }
2280 2280
     #endif
2281
-    return current_position[Z_AXIS] + zprobe_zoffset;
2281
+    return RAW_CURRENT_POSITION(Z) + zprobe_zoffset;
2282 2282
   }
2283 2283
 
2284 2284
   /**

正在加载...
取消
保存