Pārlūkot izejas kodu

Merge pull request #4875 from thinkyhead/rc_bltouch_update

Use probe clearance for bump when homing Z with probe
Scott Lahteine 7 gadus atpakaļ
vecāks
revīzija
1370d9a52b
1 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 10
    2
      Marlin/Marlin_main.cpp

+ 10
- 2
Marlin/Marlin_main.cpp Parādīt failu

@@ -2256,12 +2256,20 @@ static void homeaxis(AxisEnum axis) {
2256 2256
     if (axis == Z_AXIS) stepper.set_homing_flag(true);
2257 2257
   #endif
2258 2258
 
2259
+  // When homing Z with probe respect probe clearance
2260
+  const float bump = axis_home_dir * (
2261
+    #if HOMING_Z_WITH_PROBE
2262
+      (axis == Z_AXIS) ? max(Z_CLEARANCE_BETWEEN_PROBES, home_bump_mm(Z_AXIS)) :
2263
+    #endif
2264
+    home_bump_mm(axis)
2265
+  );
2266
+
2259 2267
   // 1. Fast move towards endstop until triggered
2260 2268
   // 2. Move away from the endstop by the axis HOME_BUMP_MM
2261 2269
   // 3. Slow move towards endstop until triggered
2262 2270
   do_homing_move(axis, 1.5 * max_length(axis) * axis_home_dir);
2263
-  do_homing_move(axis, -home_bump_mm(axis) * axis_home_dir);
2264
-  do_homing_move(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
2271
+  do_homing_move(axis, -bump);
2272
+  do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
2265 2273
 
2266 2274
   #if ENABLED(Z_DUAL_ENDSTOPS)
2267 2275
     if (axis == Z_AXIS) {

Notiek ielāde…
Atcelt
Saglabāt