Browse Source

Allow Y to home before X with option in Configuration_adv.h.

This addresses comments in #1956 and #1079. In particular, this is useful
when both endstops are stationary on a CoreXY system, and the Y axis needs
to be homed before the X so the flags are aligned.
Steve Kelly 10 years ago
parent
commit
98ca46006c

+ 3
- 0
Marlin/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 9
- 2
Marlin/Marlin_main.cpp View File

@@ -1924,6 +1924,11 @@ inline void gcode_G28() {
1924 1924
 
1925 1925
     #endif // QUICK_HOME
1926 1926
 
1927
+    #ifdef HOME_Y_BEFORE_X
1928
+      // Home Y
1929
+      if (home_all_axis || homeY) HOMEAXIS(Y);
1930
+    #endif
1931
+
1927 1932
     // Home X
1928 1933
     if (home_all_axis || homeX) {
1929 1934
       #ifdef DUAL_X_CARRIAGE
@@ -1943,8 +1948,10 @@ inline void gcode_G28() {
1943 1948
       #endif
1944 1949
     }
1945 1950
 
1946
-    // Home Y
1947
-    if (home_all_axis || homeY) HOMEAXIS(Y);
1951
+    #ifndef HOME_Y_BEFORE_X
1952
+      // Home Y
1953
+      if (home_all_axis || homeY) HOMEAXIS(Y);
1954
+    #endif
1948 1955
 
1949 1956
     // Set the X position, if included
1950 1957
     if (code_seen(axis_codes[X_AXIS]) && code_has_value())

+ 3
- 0
Marlin/configurator/config/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 3
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}

Loading…
Cancel
Save