浏览代码

Apply zprobe_zoffset in axis_is_at_home

Ensure the probe offset will always be included when homing Z.
Scott Lahteine 10 年前
父节点
当前提交
0165560333
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      Marlin/Marlin_main.cpp

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

1034
     min_pos[axis] = base_min_pos(axis) + home_offset[axis];
1034
     min_pos[axis] = base_min_pos(axis) + home_offset[axis];
1035
     max_pos[axis] = base_max_pos(axis) + home_offset[axis];
1035
     max_pos[axis] = base_max_pos(axis) + home_offset[axis];
1036
   #endif
1036
   #endif
1037
+
1038
+  #if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0
1039
+    if (axis == Z_AXIS) current_position[Z_AXIS] += zprobe_zoffset;
1040
+  #endif
1037
 }
1041
 }
1038
 
1042
 
1039
 /**
1043
 /**
2042
     if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
2046
     if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
2043
       current_position[Z_AXIS] = code_value();
2047
       current_position[Z_AXIS] = code_value();
2044
 
2048
 
2045
-    #if defined(ENABLE_AUTO_BED_LEVELING) && (Z_HOME_DIR < 0)
2046
-      if (home_all_axis || homeZ) current_position[Z_AXIS] += zprobe_zoffset;  // Add Z_Probe offset (the distance is negative)
2047
-    #endif
2048
-
2049
     sync_plan_position();
2049
     sync_plan_position();
2050
 
2050
 
2051
   #endif // else DELTA
2051
   #endif // else DELTA

正在加载...
取消
保存