浏览代码

correct raise_z_for_servo

lrpirlet 9 年前
父节点
当前提交
0fb507a75d
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      Marlin/Marlin_main.cpp

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

1751
 
1751
 
1752
     void raise_z_for_servo() {
1752
     void raise_z_for_servo() {
1753
       float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
1753
       float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
1754
-      z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset : zpos;
1754
+      // The zprobe_zoffset is negative any switch below the nozzle, so
1755
+      // multiply by Z_HOME_DIR (-1) to move enough away from bed for the probe
1756
+      z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset * Z_HOME_DIR : zpos;
1755
       if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
1757
       if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
1756
     }
1758
     }
1757
 
1759
 

正在加载...
取消
保存