Browse Source

Clean up `quick_home_xy()`

Since we do the actual homing now in the 'normal' routines `quick_home_xy()`
can be simplified to a relative simple diagonal move.
AnHardt 9 years ago
parent
commit
653eff3b31
1 changed files with 2 additions and 25 deletions
  1. 2
    25
      Marlin/Marlin_main.cpp

+ 2
- 25
Marlin/Marlin_main.cpp View File

2779
       int x_axis_home_dir = home_dir(X_AXIS);
2779
       int x_axis_home_dir = home_dir(X_AXIS);
2780
     #endif
2780
     #endif
2781
 
2781
 
2782
-    SYNC_PLAN_POSITION_KINEMATIC();
2783
-
2784
     float mlx = max_length(X_AXIS), mly = max_length(Y_AXIS),
2782
     float mlx = max_length(X_AXIS), mly = max_length(Y_AXIS),
2785
           mlratio = mlx > mly ? mly / mlx : mlx / mly;
2783
           mlratio = mlx > mly ? mly / mlx : mlx / mly;
2786
 
2784
 
2789
     feedrate = min(homing_feedrate[X_AXIS], homing_feedrate[Y_AXIS]) * sqrt(mlratio * mlratio + 1);
2787
     feedrate = min(homing_feedrate[X_AXIS], homing_feedrate[Y_AXIS]) * sqrt(mlratio * mlratio + 1);
2790
     line_to_destination();
2788
     line_to_destination();
2791
     stepper.synchronize();
2789
     stepper.synchronize();
2792
-
2793
-    set_axis_is_at_home(X_AXIS);
2794
-    set_axis_is_at_home(Y_AXIS);
2795
-    SYNC_PLAN_POSITION_KINEMATIC();
2796
-
2797
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
2798
-      if (DEBUGGING(LEVELING)) DEBUG_POS("> QUICK_HOME 1", current_position);
2799
-    #endif
2800
-
2801
-    destination[X_AXIS] = current_position[X_AXIS];
2802
-    destination[Y_AXIS] = current_position[Y_AXIS];
2803
-    line_to_destination();
2804
-    stepper.synchronize();
2805
     endstops.hit_on_purpose(); // clear endstop hit flags
2790
     endstops.hit_on_purpose(); // clear endstop hit flags
2806
 
2791
 
2807
-    current_position[X_AXIS] = destination[X_AXIS];
2808
-    current_position[Y_AXIS] = destination[Y_AXIS];
2809
-    #if DISABLED(SCARA)
2810
-      current_position[Z_AXIS] = destination[Z_AXIS];
2811
-    #endif
2812
-
2813
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
2814
-      if (DEBUGGING(LEVELING)) DEBUG_POS("> QUICK_HOME 2", current_position);
2815
-    #endif
2792
+    destination[X_AXIS] = destination[Y_AXIS] = 0;
2816
   }
2793
   }
2817
 
2794
 
2818
 #endif // QUICK_HOME
2795
 #endif // QUICK_HOME
2917
 
2894
 
2918
     #elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
2895
     #elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
2919
 
2896
 
2920
-      // Raise Z before homing X or Y, if specified
2921
       if (home_all_axis || homeX || homeY) {
2897
       if (home_all_axis || homeX || homeY) {
2898
+        // Raise Z before homing any other axes and z is not already high enough (never lower z)
2922
         float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
2899
         float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
2923
         if (z_dest > current_position[Z_AXIS]) {
2900
         if (z_dest > current_position[Z_AXIS]) {
2924
 
2901
 

Loading…
Cancel
Save