Browse Source

Merge pull request #4209 from AnHardt/too-high-G28

Make raise for probe deploy relative in homeaxis()
Scott Lahteine 9 years ago
parent
commit
c450851401
1 changed files with 4 additions and 8 deletions
  1. 4
    8
      Marlin/Marlin_main.cpp

+ 4
- 8
Marlin/Marlin_main.cpp View File

2331
       #endif
2331
       #endif
2332
       home_dir(axis);
2332
       home_dir(axis);
2333
 
2333
 
2334
-    // Set the axis position as setup for the move
2335
-    current_position[axis] = 0;
2336
-    sync_plan_position();
2337
-
2338
     // Homing Z towards the bed? Deploy the Z probe or endstop.
2334
     // Homing Z towards the bed? Deploy the Z probe or endstop.
2339
     #if HAS_BED_PROBE
2335
     #if HAS_BED_PROBE
2340
       if (axis == Z_AXIS && axis_home_dir < 0) {
2336
       if (axis == Z_AXIS && axis_home_dir < 0) {
2345
       }
2341
       }
2346
     #endif
2342
     #endif
2347
 
2343
 
2344
+    // Set the axis position as setup for the move
2345
+    current_position[axis] = 0;
2346
+    sync_plan_position();
2347
+
2348
     // Set a flag for Z motor locking
2348
     // Set a flag for Z motor locking
2349
     #if ENABLED(Z_DUAL_ENDSTOPS)
2349
     #if ENABLED(Z_DUAL_ENDSTOPS)
2350
       if (axis == Z_AXIS) stepper.set_homing_flag(true);
2350
       if (axis == Z_AXIS) stepper.set_homing_flag(true);
2454
     #endif
2454
     #endif
2455
 
2455
 
2456
     destination[axis] = current_position[axis];
2456
     destination[axis] = current_position[axis];
2457
-    feedrate = 0.0;
2458
     endstops.hit_on_purpose(); // clear endstop hit flags
2457
     endstops.hit_on_purpose(); // clear endstop hit flags
2459
     axis_known_position[axis] = true;
2458
     axis_known_position[axis] = true;
2460
     axis_homed[axis] = true;
2459
     axis_homed[axis] = true;
2790
    */
2789
    */
2791
   set_destination_to_current();
2790
   set_destination_to_current();
2792
 
2791
 
2793
-  feedrate = 0.0;
2794
-
2795
   #if ENABLED(DELTA)
2792
   #if ENABLED(DELTA)
2796
     /**
2793
     /**
2797
      * A delta can only safely home all axis at the same time
2794
      * A delta can only safely home all axis at the same time
2906
         destination[X_AXIS] = current_position[X_AXIS];
2903
         destination[X_AXIS] = current_position[X_AXIS];
2907
         destination[Y_AXIS] = current_position[Y_AXIS];
2904
         destination[Y_AXIS] = current_position[Y_AXIS];
2908
         line_to_destination();
2905
         line_to_destination();
2909
-        feedrate = 0.0;
2910
         stepper.synchronize();
2906
         stepper.synchronize();
2911
         endstops.hit_on_purpose(); // clear endstop hit flags
2907
         endstops.hit_on_purpose(); // clear endstop hit flags
2912
 
2908
 

Loading…
Cancel
Save