|
@@ -1815,8 +1815,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
1815
|
1815
|
* Endstop Tests
|
1816
|
1816
|
*/
|
1817
|
1817
|
|
1818
|
|
-#define _PLUG_UNUSED_TEST(AXIS,PLUG) (DISABLED(USE_##PLUG##MIN_PLUG, USE_##PLUG##MAX_PLUG) && !(ENABLED(AXIS##_DUAL_ENDSTOPS) && WITHIN(AXIS##2_USE_ENDSTOP, _##PLUG##MAX_, _##PLUG##MIN_)))
|
1819
|
|
-#define _AXIS_PLUG_UNUSED_TEST(AXIS) (_PLUG_UNUSED_TEST(AXIS,X) && _PLUG_UNUSED_TEST(AXIS,Y) && _PLUG_UNUSED_TEST(AXIS,Z))
|
|
1818
|
+#define _PLUG_UNUSED_TEST(A,P) (DISABLED(USE_##P##MIN_PLUG, USE_##P##MAX_PLUG) \
|
|
1819
|
+ && !(ENABLED(A##_DUAL_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) \
|
|
1820
|
+ && !(ENABLED(A##_MULTI_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) )
|
|
1821
|
+#define _AXIS_PLUG_UNUSED_TEST(A) (_PLUG_UNUSED_TEST(A,X) && _PLUG_UNUSED_TEST(A,Y) && _PLUG_UNUSED_TEST(A,Z))
|
1820
|
1822
|
|
1821
|
1823
|
// At least 3 endstop plugs must be used
|
1822
|
1824
|
#if _AXIS_PLUG_UNUSED_TEST(X)
|
|
@@ -1841,8 +1843,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
1841
|
1843
|
#error "Enable USE_YMAX_PLUG when homing Y to MAX."
|
1842
|
1844
|
#endif
|
1843
|
1845
|
#endif
|
1844
|
|
-#if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
|
|
1846
|
+
|
|
1847
|
+// Z homing direction and plug usage flags
|
|
1848
|
+#if Z_HOME_DIR < 0 && NONE(USE_ZMIN_PLUG, HOMING_Z_WITH_PROBE)
|
1845
|
1849
|
#error "Enable USE_ZMIN_PLUG when homing Z to MIN."
|
|
1850
|
+#elif Z_HOME_DIR > 0 && ENABLED(USE_PROBE_FOR_Z_HOMING)
|
|
1851
|
+ #error "Z_HOME_DIR must be -1 when homing Z with the probe."
|
1846
|
1852
|
#elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
|
1847
|
1853
|
#error "Enable USE_ZMAX_PLUG when homing Z to MAX."
|
1848
|
1854
|
#endif
|