|
@@ -203,10 +203,56 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
203
|
203
|
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
|
204
|
204
|
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
|
205
|
205
|
|
206
|
|
-// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
|
207
|
|
-#define X_HOME_POS 0
|
208
|
|
-#define Y_HOME_POS 0
|
209
|
|
-#define Z_HOME_POS 0
|
|
206
|
+// The position of the homing switches
|
|
207
|
+// Auto switch code by ZetaPhoenix
|
|
208
|
+//#define MANUAL_HOME_POSITIONS //If defined, manualy programed locations will be loaded
|
|
209
|
+//#define BED_CENTER_AT_0_0
|
|
210
|
+
|
|
211
|
+#ifdef MANUAL_HOME_POSITION //Manual limit switch locations
|
|
212
|
+ #define X_HOME_POS 0
|
|
213
|
+ #define Y_HOME_POS 0
|
|
214
|
+ #define Z_HOME_POS 0
|
|
215
|
+
|
|
216
|
+//Set min/max homing switch positions based upon direction and min/max travel limits
|
|
217
|
+#else
|
|
218
|
+ //X axis
|
|
219
|
+ #if X_HOME_DIR == -1
|
|
220
|
+ #ifdef BED_CENTER_AT_0_0
|
|
221
|
+ #define X_HOME_POS X_MAX_LENGTH * -0.5
|
|
222
|
+ #else
|
|
223
|
+ #define X_HOME_POS X_MIN_POS
|
|
224
|
+ #endif //BED_CENTER_AT_0_0
|
|
225
|
+ #else
|
|
226
|
+ #ifdef BED_CENTER_AT_0_0
|
|
227
|
+ #define X_HOME_POS X_MAX_LENGTH * 0.5
|
|
228
|
+ #else
|
|
229
|
+ #define X_HOME_POS X_MAX_POS
|
|
230
|
+ #endif //BED_CENTER_AT_0_0
|
|
231
|
+ #endif //X_HOME_DIR == -1
|
|
232
|
+
|
|
233
|
+ //Y axis
|
|
234
|
+ #if Y_HOME_DIR == -1
|
|
235
|
+ #ifdef BED_CENTER_AT_0_0
|
|
236
|
+ #define Y_HOME_POS Y_MAX_LENGTH * -0.5
|
|
237
|
+ #else
|
|
238
|
+ #define Y_HOME_POS Y_MIN_POS
|
|
239
|
+ #endif //BED_CENTER_AT_0_0
|
|
240
|
+ #else
|
|
241
|
+ #ifdef BED_CENTER_AT_0_0
|
|
242
|
+ #define Y_HOME_POS Y_MAX_LENGTH * 0.5
|
|
243
|
+ #else
|
|
244
|
+ #define Y_HOME_POS Y_MAX_POS
|
|
245
|
+ #endif //BED_CENTER_AT_0_0
|
|
246
|
+ #endif //Y_HOME_DIR == -1
|
|
247
|
+
|
|
248
|
+ // Z axis
|
|
249
|
+ #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
|
|
250
|
+ #define Z_HOME_POS Z_MIN_POS
|
|
251
|
+ #else
|
|
252
|
+ #define Z_HOME_POS Z_MAX_POS
|
|
253
|
+ #endif //Z_HOME_DIR == -1
|
|
254
|
+#endif //End auto min/max positions
|
|
255
|
+
|
210
|
256
|
|
211
|
257
|
//// MOVEMENT SETTINGS
|
212
|
258
|
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
|