🏗️ Support for up to 6 linear axes (#19112)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
DerAndere
2021-06-05 09:18:47 +02:00
committed by GitHub
parent 733d5fd57d
commit 7726af9c53
98 changed files with 5040 additions and 2256 deletions

View File

@@ -402,40 +402,89 @@
#define X_STOP_PIN X_MAX_PIN
#endif
#ifdef Y_STOP_PIN
#if Y_HOME_TO_MIN
#define Y_MIN_PIN Y_STOP_PIN
#ifndef Y_MAX_PIN
#define Y_MAX_PIN -1
#if HAS_Y_AXIS
#ifdef Y_STOP_PIN
#if Y_HOME_TO_MIN
#define Y_MIN_PIN Y_STOP_PIN
#ifndef Y_MAX_PIN
#define Y_MAX_PIN -1
#endif
#else
#define Y_MAX_PIN Y_STOP_PIN
#ifndef Y_MIN_PIN
#define Y_MIN_PIN -1
#endif
#endif
#elif Y_HOME_TO_MIN
#define Y_STOP_PIN Y_MIN_PIN
#else
#define Y_MAX_PIN Y_STOP_PIN
#ifndef Y_MIN_PIN
#define Y_MIN_PIN -1
#endif
#define Y_STOP_PIN Y_MAX_PIN
#endif
#elif Y_HOME_TO_MIN
#define Y_STOP_PIN Y_MIN_PIN
#else
#define Y_STOP_PIN Y_MAX_PIN
#endif
#ifdef Z_STOP_PIN
#if Z_HOME_TO_MIN
#define Z_MIN_PIN Z_STOP_PIN
#ifndef Z_MAX_PIN
#define Z_MAX_PIN -1
#if HAS_Z_AXIS
#ifdef Z_STOP_PIN
#if Z_HOME_TO_MIN
#define Z_MIN_PIN Z_STOP_PIN
#ifndef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif
#else
#define Z_MAX_PIN Z_STOP_PIN
#ifndef Z_MIN_PIN
#define Z_MIN_PIN -1
#endif
#endif
#elif Z_HOME_TO_MIN
#define Z_STOP_PIN Z_MIN_PIN
#else
#define Z_MAX_PIN Z_STOP_PIN
#ifndef Z_MIN_PIN
#define Z_MIN_PIN -1
#define Z_STOP_PIN Z_MAX_PIN
#endif
#endif
#if LINEAR_AXES >= 4
#ifdef I_STOP_PIN
#if I_HOME_TO_MIN
#define I_MIN_PIN I_STOP_PIN
#define I_MAX_PIN -1
#else
#define I_MIN_PIN -1
#define I_MAX_PIN I_STOP_PIN
#endif
#endif
#elif Z_HOME_TO_MIN
#define Z_STOP_PIN Z_MIN_PIN
#else
#define Z_STOP_PIN Z_MAX_PIN
#undef I_MIN_PIN
#undef I_MAX_PIN
#endif
#if LINEAR_AXES >= 5
#ifdef J_STOP_PIN
#if J_HOME_TO_MIN
#define J_MIN_PIN J_STOP_PIN
#define J_MAX_PIN -1
#else
#define J_MIN_PIN -1
#define J_MAX_PIN J_STOP_PIN
#endif
#endif
#else
#undef J_MIN_PIN
#undef J_MAX_PIN
#endif
#if LINEAR_AXES >= 6
#ifdef K_STOP_PIN
#if K_HOME_TO_MIN
#define K_MIN_PIN K_STOP_PIN
#define K_MAX_PIN -1
#else
#define K_MIN_PIN -1
#define K_MAX_PIN K_STOP_PIN
#endif
#endif
#else
#undef K_MIN_PIN
#undef K_MAX_PIN
#endif
// Filament Sensor first pin alias
@@ -863,6 +912,19 @@
#undef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif
#if DISABLED(USE_IMAX_PLUG)
#undef I_MAX_PIN
#define I_MAX_PIN -1
#endif
#if DISABLED(USE_JMAX_PLUG)
#undef J_MAX_PIN
#define J_MAX_PIN -1
#endif
#if DISABLED(USE_KMAX_PLUG)
#undef K_MAX_PIN
#define K_MAX_PIN -1
#endif
#if DISABLED(USE_XMIN_PLUG)
#undef X_MIN_PIN
#define X_MIN_PIN -1
@@ -906,6 +968,19 @@
#undef Z4_MAX_PIN
#endif
#if DISABLED(USE_IMIN_PLUG)
#undef I_MIN_PIN
#define I_MIN_PIN -1
#endif
#if DISABLED(USE_JMIN_PLUG)
#undef J_MIN_PIN
#define J_MIN_PIN -1
#endif
#if DISABLED(USE_KMIN_PLUG)
#undef K_MIN_PIN
#define K_MIN_PIN -1
#endif
//
// Default DOGLCD SPI delays
//