Skip to content

Commit

Permalink
🐛Fix IDEX X2 Direction (MarlinFirmware#26958)
Browse files Browse the repository at this point in the history
* Fix IDEX X2 Direction

* Sanity Check IDEX X1_MAX_POS
  • Loading branch information
InsanityAutomation authored and RPGFabi committed May 5, 2024
1 parent 2f92c25 commit 2ac9db7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,12 @@
#define HAS_MOTOR_CURRENT_I2C 1
#endif

#if ENABLED(DUAL_X_CARRIAGE)
#ifndef INVERT_X2_DIR
#define INVERT_X2_DIR INVERT_X_DIR
#endif
#endif

// X2 but not IDEX => Dual Synchronized X Steppers
#if defined(X2_DRIVER_TYPE) && DISABLED(DUAL_X_CARRIAGE)
#define HAS_SYNCED_X_STEPPERS 1
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
#elif X_HOME_TO_MAX
#error "DUAL_X_CARRIAGE requires X_HOME_DIR -1."
#elif (X2_HOME_POS <= X1_MAX_POS) || (X2_MAX_POS < X1_MAX_POS)
#error "DUAL_X_CARRIAGE will crash if X1 can meet or exceed X2 travel."
#endif
#endif

Expand Down

0 comments on commit 2ac9db7

Please sign in to comment.