Browse Source

Apply zprobe_zoffset in axis_is_at_home

Ensure the probe offset will always be included when homing Z.
Scott Lahteine 10 years ago
parent
commit
58d128b7a9
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/Marlin_main.cpp

+ 4
- 4
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save