chiark / gitweb /
Fixed soft limits when the origin is in the middle.
[marlin.git] / Marlin / pins.h
index c4d56590f768f2088bbc57f7941e705230a2807e..419ddb6430056d1202c7f3cd263e63b5e7eb045e 100644 (file)
 
 #define X_STEP_PIN         15
 #define X_DIR_PIN          21
-#define X_MIN_PIN          18
-#define X_MAX_PIN           -1
+#if X_HOME_DIR < 0
+# define X_MIN_PIN          18 
+# define X_MAX_PIN          -1
+#else
+# define X_MIN_PIN          -1
+# define X_MAX_PIN          18
+#endif
 
 #define Y_STEP_PIN         22
 #define Y_DIR_PIN          23
-#define Y_MIN_PIN          19
-#define Y_MAX_PIN          -1
+#if Y_HOME_DIR < 0
+# define Y_MIN_PIN          19 
+# define Y_MAX_PIN          -1
+#else
+# define Y_MIN_PIN          -1
+# define Y_MAX_PIN          19
+#endif
 
 #define Z_STEP_PIN         3
 #define Z_DIR_PIN          2
-#define Z_MIN_PIN          20
-#define Z_MAX_PIN          -1
+#if Z_HOME_DIR < 0
+# define Z_MIN_PIN          20 
+# define Z_MAX_PIN          -1
+#else
+# define Z_MIN_PIN          -1
+# define Z_MAX_PIN          20
+#endif
 
 #define E0_STEP_PIN         1
 #define E0_DIR_PIN          0