Skip to content

Commit

Permalink
Improve DUAL_X_CARRIAGE sanity check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed May 18, 2016
1 parent 516e79b commit 2a7b1a8
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Marlin/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,18 @@
* Dual X Carriage requirements
*/
#if ENABLED(DUAL_X_CARRIAGE)
#if EXTRUDERS == 1 || ENABLED(COREXY) \
|| !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR \
|| !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
|| !HAS_X_MAX
#error "Missing or invalid definitions for DUAL_X_CARRIAGE mode."
#endif
#if X_HOME_DIR != -1 || X2_HOME_DIR != 1
#error "Please use canonical x-carriage assignment."
#if EXTRUDERS == 1
#error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
#elif ENABLED(COREXY) || ENABLED(COREXZ)
#error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ."
#elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
#error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
#elif !HAS_X_MAX
#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 // DUAL_X_CARRIAGE

Expand Down

0 comments on commit 2a7b1a8

Please sign in to comment.