Преглед на файлове

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 години
родител
ревизия
653eff3b31
променени са 1 файла, в които са добавени 2 реда и са изтрити 25 реда
  1. 2
    25
      Marlin/Marlin_main.cpp

+ 2
- 25
Marlin/Marlin_main.cpp Целия файл

@@ -2779,8 +2779,6 @@ inline void gcode_G4() {
2779 2779
       int x_axis_home_dir = home_dir(X_AXIS);
2780 2780
     #endif
2781 2781
 
2782
-    SYNC_PLAN_POSITION_KINEMATIC();
2783
-
2784 2782
     float mlx = max_length(X_AXIS), mly = max_length(Y_AXIS),
2785 2783
           mlratio = mlx > mly ? mly / mlx : mlx / mly;
2786 2784
 
@@ -2789,30 +2787,9 @@ inline void gcode_G4() {
2789 2787
     feedrate = min(homing_feedrate[X_AXIS], homing_feedrate[Y_AXIS]) * sqrt(mlratio * mlratio + 1);
2790 2788
     line_to_destination();
2791 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 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 2795
 #endif // QUICK_HOME
@@ -2917,8 +2894,8 @@ inline void gcode_G28() {
2917 2894
 
2918 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 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 2899
         float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
2923 2900
         if (z_dest > current_position[Z_AXIS]) {
2924 2901
 

Loading…
Отказ
Запис