Improve DUAL_X_CARRIAGE sanity check errors

This commit is contained in:
Scott Lahteine 2016-05-18 15:59:28 -07:00
parent 516e79bbda
commit 2a7b1a85f7

View File

@ -398,14 +398,18 @@
* Dual X Carriage requirements * Dual X Carriage requirements
*/ */
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
#if EXTRUDERS == 1 || ENABLED(COREXY) \ #if EXTRUDERS == 1
|| !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR \ #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
|| !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \ #elif ENABLED(COREXY) || ENABLED(COREXZ)
|| !HAS_X_MAX #error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ."
#error "Missing or invalid definitions for DUAL_X_CARRIAGE mode." #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
#endif #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
#if X_HOME_DIR != -1 || X2_HOME_DIR != 1 #elif !HAS_X_MAX
#error "Please use canonical x-carriage assignment." #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
#elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
#error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
#elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
#error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
#endif #endif
#endif // DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE