Browse Source

No homing bump if bump distance is 0 (or less)

Scott Lahteine 8 years ago
parent
commit
a9a21db39f
1 changed files with 10 additions and 6 deletions
  1. 10
    6
      Marlin/Marlin_main.cpp

+ 10
- 6
Marlin/Marlin_main.cpp View File

2273
     if (axis == Z_AXIS) stepper.set_homing_flag(true);
2273
     if (axis == Z_AXIS) stepper.set_homing_flag(true);
2274
   #endif
2274
   #endif
2275
 
2275
 
2276
+  // Fast move towards endstop until triggered
2277
+  do_homing_move(axis, 1.5 * max_length(axis) * axis_home_dir);
2278
+
2276
   // When homing Z with probe respect probe clearance
2279
   // When homing Z with probe respect probe clearance
2277
   const float bump = axis_home_dir * (
2280
   const float bump = axis_home_dir * (
2278
     #if HOMING_Z_WITH_PROBE
2281
     #if HOMING_Z_WITH_PROBE
2281
     home_bump_mm(axis)
2284
     home_bump_mm(axis)
2282
   );
2285
   );
2283
 
2286
 
2284
-  // 1. Fast move towards endstop until triggered
2285
-  // 2. Move away from the endstop by the axis HOME_BUMP_MM
2286
-  // 3. Slow move towards endstop until triggered
2287
-  do_homing_move(axis, 1.5 * max_length(axis) * axis_home_dir);
2288
-  do_homing_move(axis, -bump);
2289
-  do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
2287
+  // If a second homing move is configured...
2288
+  if (bump) {
2289
+    // Move away from the endstop by the axis HOME_BUMP_MM
2290
+    do_homing_move(axis, -bump);
2291
+    // Slow move towards endstop until triggered
2292
+    do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
2293
+  }
2290
 
2294
 
2291
   #if ENABLED(Z_DUAL_ENDSTOPS)
2295
   #if ENABLED(Z_DUAL_ENDSTOPS)
2292
     if (axis == Z_AXIS) {
2296
     if (axis == Z_AXIS) {

Loading…
Cancel
Save