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,10 +2331,6 @@ static void homeaxis(AxisEnum axis) {
2331 2331
       #endif
2332 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 2334
     // Homing Z towards the bed? Deploy the Z probe or endstop.
2339 2335
     #if HAS_BED_PROBE
2340 2336
       if (axis == Z_AXIS && axis_home_dir < 0) {
@@ -2345,6 +2341,10 @@ static void homeaxis(AxisEnum axis) {
2345 2341
       }
2346 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 2348
     // Set a flag for Z motor locking
2349 2349
     #if ENABLED(Z_DUAL_ENDSTOPS)
2350 2350
       if (axis == Z_AXIS) stepper.set_homing_flag(true);
@@ -2454,7 +2454,6 @@ static void homeaxis(AxisEnum axis) {
2454 2454
     #endif
2455 2455
 
2456 2456
     destination[axis] = current_position[axis];
2457
-    feedrate = 0.0;
2458 2457
     endstops.hit_on_purpose(); // clear endstop hit flags
2459 2458
     axis_known_position[axis] = true;
2460 2459
     axis_homed[axis] = true;
@@ -2790,8 +2789,6 @@ inline void gcode_G28() {
2790 2789
    */
2791 2790
   set_destination_to_current();
2792 2791
 
2793
-  feedrate = 0.0;
2794
-
2795 2792
   #if ENABLED(DELTA)
2796 2793
     /**
2797 2794
      * A delta can only safely home all axis at the same time
@@ -2906,7 +2903,6 @@ inline void gcode_G28() {
2906 2903
         destination[X_AXIS] = current_position[X_AXIS];
2907 2904
         destination[Y_AXIS] = current_position[Y_AXIS];
2908 2905
         line_to_destination();
2909
-        feedrate = 0.0;
2910 2906
         stepper.synchronize();
2911 2907
         endstops.hit_on_purpose(); // clear endstop hit flags
2912 2908
 

Loading…
Cancel
Save