@ -666,7 +666,7 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of Linear Axes (e.g., XYZ)
|
||||
* Number of Linear Axes (e.g., XYZIJKUVW)
|
||||
* All the logical axes except for the tool (E) axis
|
||||
*/
|
||||
#ifdef LINEAR_AXES
|
||||
@ -674,22 +674,28 @@
|
||||
#define LINEAR_AXES_WARNING 1
|
||||
#endif
|
||||
|
||||
#ifdef K_DRIVER_TYPE
|
||||
#define LINEAR_AXES 6
|
||||
#ifdef W_DRIVER_TYPE
|
||||
#define NUM_AXES 9
|
||||
#elif defined(V_DRIVER_TYPE)
|
||||
#define NUM_AXES 8
|
||||
#elif defined(U_DRIVER_TYPE)
|
||||
#define NUM_AXES 7
|
||||
#elif defined(K_DRIVER_TYPE)
|
||||
#define NUM_AXES 6
|
||||
#elif defined(J_DRIVER_TYPE)
|
||||
#define LINEAR_AXES 5
|
||||
#define NUM_AXES 5
|
||||
#elif defined(I_DRIVER_TYPE)
|
||||
#define LINEAR_AXES 4
|
||||
#define NUM_AXES 4
|
||||
#elif defined(Z_DRIVER_TYPE)
|
||||
#define LINEAR_AXES 3
|
||||
#define NUM_AXES 3
|
||||
#elif defined(Y_DRIVER_TYPE)
|
||||
#define LINEAR_AXES 2
|
||||
#define NUM_AXES 2
|
||||
#else
|
||||
#define LINEAR_AXES 1
|
||||
#define NUM_AXES 1
|
||||
#endif
|
||||
#if LINEAR_AXES >= XY
|
||||
#if NUM_AXES >= XY
|
||||
#define HAS_Y_AXIS 1
|
||||
#if LINEAR_AXES >= XYZ
|
||||
#if NUM_AXES >= XYZ
|
||||
#define HAS_Z_AXIS 1
|
||||
#ifdef Z4_DRIVER_TYPE
|
||||
#define NUM_Z_STEPPERS 4
|
||||
@ -700,12 +706,21 @@
|
||||
#else
|
||||
#define NUM_Z_STEPPERS 1
|
||||
#endif
|
||||
#if LINEAR_AXES >= 4
|
||||
#if NUM_AXES >= 4
|
||||
#define HAS_I_AXIS 1
|
||||
#if LINEAR_AXES >= 5
|
||||
#if NUM_AXES >= 5
|
||||
#define HAS_J_AXIS 1
|
||||
#if LINEAR_AXES >= 6
|
||||
#if NUM_AXES >= 6
|
||||
#define HAS_K_AXIS 1
|
||||
#if NUM_AXES >= 7
|
||||
#define HAS_U_AXIS 1
|
||||
#if NUM_AXES >= 8
|
||||
#define HAS_V_AXIS 1
|
||||
#if NUM_AXES >= 9
|
||||
#define HAS_W_AXIS 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@ -863,14 +878,58 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of Logical Axes (e.g., XYZE)
|
||||
* All the logical axes that can be commanded directly by G-code.
|
||||
* Number of Primary Linear Axes (e.g., XYZ)
|
||||
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
|
||||
*/
|
||||
#if NUM_AXES >= 3
|
||||
#define PRIMARY_LINEAR_AXES 3
|
||||
#else
|
||||
#define PRIMARY_LINEAR_AXES NUM_AXES
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of Secondary Axes (e.g., IJKUVW)
|
||||
* All linear/rotational axes between XYZ and E.
|
||||
*/
|
||||
#define SECONDARY_AXES SUB3(NUM_AXES)
|
||||
|
||||
/**
|
||||
* Number of Rotational Axes (e.g., IJK)
|
||||
* All axes for which AXIS*_ROTATES is defined.
|
||||
* For these axes, positions are specified in angular degrees.
|
||||
*/
|
||||
#if ENABLED(AXIS9_ROTATES)
|
||||
#define ROTATIONAL_AXES 6
|
||||
#elif ENABLED(AXIS8_ROTATES)
|
||||
#define ROTATIONAL_AXES 5
|
||||
#elif ENABLED(AXIS7_ROTATES)
|
||||
#define ROTATIONAL_AXES 4
|
||||
#elif ENABLED(AXIS6_ROTATES)
|
||||
#define ROTATIONAL_AXES 3
|
||||
#elif ENABLED(AXIS5_ROTATES)
|
||||
#define ROTATIONAL_AXES 2
|
||||
#elif ENABLED(AXIS4_ROTATES)
|
||||
#define ROTATIONAL_AXES 1
|
||||
#else
|
||||
#define ROTATIONAL_AXES 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of Secondary Linear Axes (e.g., UVW)
|
||||
* All secondary axes for which AXIS*_ROTATES is not defined.
|
||||
* Excluding primary axes and excluding duplicate axes (X2, Y2, Z2, Z3, Z4)
|
||||
*/
|
||||
#define SECONDARY_LINEAR_AXES (NUM_AXES - PRIMARY_LINEAR_AXES - ROTATIONAL_AXES)
|
||||
|
||||
/**
|
||||
* Number of Logical Axes (e.g., XYZIJKUVWE)
|
||||
* All logical axes that can be commanded directly by G-code.
|
||||
* Delta maps stepper-specific values to ABC steppers.
|
||||
*/
|
||||
#if HAS_EXTRUDERS
|
||||
#define LOGICAL_AXES INCREMENT(LINEAR_AXES)
|
||||
#define LOGICAL_AXES INCREMENT(NUM_AXES)
|
||||
#else
|
||||
#define LOGICAL_AXES LINEAR_AXES
|
||||
#define LOGICAL_AXES NUM_AXES
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -888,7 +947,7 @@
|
||||
* distinguished.
|
||||
*/
|
||||
#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
|
||||
#define DISTINCT_AXES (LINEAR_AXES + E_STEPPERS)
|
||||
#define DISTINCT_AXES (NUM_AXES + E_STEPPERS)
|
||||
#define DISTINCT_E E_STEPPERS
|
||||
#define E_INDEX_N(E) (E)
|
||||
#else
|
||||
@ -1118,6 +1177,21 @@
|
||||
#elif K_HOME_DIR < 0
|
||||
#define K_HOME_TO_MIN 1
|
||||
#endif
|
||||
#if U_HOME_DIR > 0
|
||||
#define U_HOME_TO_MAX 1
|
||||
#elif U_HOME_DIR < 0
|
||||
#define U_HOME_TO_MIN 1
|
||||
#endif
|
||||
#if V_HOME_DIR > 0
|
||||
#define V_HOME_TO_MAX 1
|
||||
#elif V_HOME_DIR < 0
|
||||
#define V_HOME_TO_MIN 1
|
||||
#endif
|
||||
#if W_HOME_DIR > 0
|
||||
#define W_HOME_TO_MAX 1
|
||||
#elif W_HOME_DIR < 0
|
||||
#define W_HOME_TO_MIN 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Conditionals based on the type of Bed Probe
|
||||
|
@ -911,30 +911,45 @@
|
||||
#endif
|
||||
|
||||
// Remove unused STEALTHCHOP flags
|
||||
#if LINEAR_AXES < 6
|
||||
#undef STEALTHCHOP_K
|
||||
#undef CALIBRATION_MEASURE_KMIN
|
||||
#undef CALIBRATION_MEASURE_KMAX
|
||||
#if LINEAR_AXES < 5
|
||||
#undef STEALTHCHOP_J
|
||||
#undef CALIBRATION_MEASURE_JMIN
|
||||
#undef CALIBRATION_MEASURE_JMAX
|
||||
#if LINEAR_AXES < 4
|
||||
#undef STEALTHCHOP_I
|
||||
#undef CALIBRATION_MEASURE_IMIN
|
||||
#undef CALIBRATION_MEASURE_IMAX
|
||||
#if LINEAR_AXES < 3
|
||||
#undef Z_IDLE_HEIGHT
|
||||
#undef STEALTHCHOP_Z
|
||||
#undef Z_PROBE_SLED
|
||||
#undef Z_SAFE_HOMING
|
||||
#undef HOME_Z_FIRST
|
||||
#undef HOMING_Z_WITH_PROBE
|
||||
#undef ENABLE_LEVELING_FADE_HEIGHT
|
||||
#undef NUM_Z_STEPPERS
|
||||
#undef CNC_WORKSPACE_PLANES
|
||||
#if LINEAR_AXES < 2
|
||||
#undef STEALTHCHOP_Y
|
||||
#if NUM_AXES < 9
|
||||
#undef STEALTHCHOP_W
|
||||
#undef CALIBRATION_MEASURE_WMIN
|
||||
#undef CALIBRATION_MEASURE_WMAX
|
||||
#if NUM_AXES < 8
|
||||
#undef STEALTHCHOP_V
|
||||
#undef CALIBRATION_MEASURE_VMIN
|
||||
#undef CALIBRATION_MEASURE_VMAX
|
||||
#if NUM_AXES < 7
|
||||
#undef STEALTHCHOP_U
|
||||
#undef CALIBRATION_MEASURE_UMIN
|
||||
#undef CALIBRATION_MEASURE_UMAX
|
||||
#if NUM_AXES < 6
|
||||
#undef STEALTHCHOP_K
|
||||
#undef CALIBRATION_MEASURE_KMIN
|
||||
#undef CALIBRATION_MEASURE_KMAX
|
||||
#if NUM_AXES < 5
|
||||
#undef STEALTHCHOP_J
|
||||
#undef CALIBRATION_MEASURE_JMIN
|
||||
#undef CALIBRATION_MEASURE_JMAX
|
||||
#if NUM_AXES < 4
|
||||
#undef STEALTHCHOP_I
|
||||
#undef CALIBRATION_MEASURE_IMIN
|
||||
#undef CALIBRATION_MEASURE_IMAX
|
||||
#if NUM_AXES < 3
|
||||
#undef Z_IDLE_HEIGHT
|
||||
#undef STEALTHCHOP_Z
|
||||
#undef Z_PROBE_SLED
|
||||
#undef Z_SAFE_HOMING
|
||||
#undef HOME_Z_FIRST
|
||||
#undef HOMING_Z_WITH_PROBE
|
||||
#undef ENABLE_LEVELING_FADE_HEIGHT
|
||||
#undef NUM_Z_STEPPERS
|
||||
#undef CNC_WORKSPACE_PLANES
|
||||
#if NUM_AXES < 2
|
||||
#undef STEALTHCHOP_Y
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
@ -87,6 +87,19 @@
|
||||
#if HAS_K_AXIS && !defined(AXIS6_NAME)
|
||||
#define AXIS6_NAME 'C'
|
||||
#endif
|
||||
#if HAS_U_AXIS && !defined(AXIS7_NAME)
|
||||
#define AXIS7_NAME 'U'
|
||||
#endif
|
||||
#if HAS_V_AXIS && !defined(AXIS8_NAME)
|
||||
#define AXIS8_NAME 'V'
|
||||
#endif
|
||||
#if HAS_W_AXIS && !defined(AXIS9_NAME)
|
||||
#define AXIS9_NAME 'W'
|
||||
#endif
|
||||
|
||||
#if ANY(AXIS4_ROTATES, AXIS5_ROTATES, AXIS6_ROTATES, AXIS7_ROTATES, AXIS8_ROTATES, AXIS9_ROTATES)
|
||||
#define HAS_ROTATIONAL_AXES 1
|
||||
#endif
|
||||
|
||||
#define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
|
||||
#if HAS_Y_AXIS
|
||||
@ -106,6 +119,15 @@
|
||||
#if HAS_K_AXIS
|
||||
#define K_MAX_LENGTH (K_MAX_POS - (K_MIN_POS))
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define U_MAX_LENGTH (U_MAX_POS - (U_MIN_POS))
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define V_MAX_LENGTH (V_MAX_POS - (V_MIN_POS))
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define W_MAX_LENGTH (W_MAX_POS - (W_MIN_POS))
|
||||
#endif
|
||||
|
||||
// Defined only if the sanity-check is bypassed
|
||||
#ifndef X_BED_SIZE
|
||||
@ -123,6 +145,15 @@
|
||||
#if HAS_K_AXIS && !defined(K_BED_SIZE)
|
||||
#define K_BED_SIZE K_MAX_LENGTH
|
||||
#endif
|
||||
#if HAS_U_AXIS && !defined(U_BED_SIZE)
|
||||
#define U_BED_SIZE U_MAX_LENGTH
|
||||
#endif
|
||||
#if HAS_V_AXIS && !defined(V_BED_SIZE)
|
||||
#define V_BED_SIZE V_MAX_LENGTH
|
||||
#endif
|
||||
#if HAS_W_AXIS && !defined(W_BED_SIZE)
|
||||
#define W_BED_SIZE W_MAX_LENGTH
|
||||
#endif
|
||||
|
||||
// Require 0,0 bed center for Delta and SCARA
|
||||
#if IS_KINEMATIC
|
||||
@ -143,6 +174,15 @@
|
||||
#if HAS_K_AXIS
|
||||
#define _K_HALF_KMAX ((K_BED_SIZE) / 2)
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define _U_HALF_UMAX ((U_BED_SIZE) / 2)
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define _V_HALF_VMAX ((V_BED_SIZE) / 2)
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define _W_HALF_WMAX ((W_BED_SIZE) / 2)
|
||||
#endif
|
||||
|
||||
#define X_CENTER TERN(BED_CENTER_AT_0_0, 0, _X_HALF_BED)
|
||||
#if HAS_Y_AXIS
|
||||
@ -158,6 +198,15 @@
|
||||
#if HAS_K_AXIS
|
||||
#define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED)
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define U_CENTER TERN(BED_CENTER_AT_0_0, 0, _U_HALF_BED)
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define V_CENTER TERN(BED_CENTER_AT_0_0, 0, _V_HALF_BED)
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define W_CENTER TERN(BED_CENTER_AT_0_0, 0, _W_HALF_BED)
|
||||
#endif
|
||||
|
||||
// Get the linear boundaries of the bed
|
||||
#define X_MIN_BED (X_CENTER - _X_HALF_BED)
|
||||
@ -178,6 +227,18 @@
|
||||
#define K_MINIM (K_CENTER - _K_HALF_BED_SIZE)
|
||||
#define K_MAXIM (K_MINIM + K_BED_SIZE)
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define U_MINIM (U_CENTER - _U_HALF_BED_SIZE)
|
||||
#define U_MAXIM (U_MINIM + U_BED_SIZE)
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define V_MINIM (V_CENTER - _V_HALF_BED_SIZE)
|
||||
#define V_MAXIM (V_MINIM + V_BED_SIZE)
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define W_MINIM (W_CENTER - _W_HALF_BED_SIZE)
|
||||
#define W_MAXIM (W_MINIM + W_BED_SIZE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Dual X Carriage
|
||||
@ -274,6 +335,27 @@
|
||||
#define K_HOME_POS TERN(K_HOME_TO_MIN, K_MIN_POS, K_MAX_POS)
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#ifdef MANUAL_U_HOME_POS
|
||||
#define U_HOME_POS MANUAL_U_HOME_POS
|
||||
#else
|
||||
#define U_HOME_POS (U_HOME_DIR < 0 ? U_MIN_POS : U_MAX_POS)
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#ifdef MANUAL_V_HOME_POS
|
||||
#define V_HOME_POS MANUAL_V_HOME_POS
|
||||
#else
|
||||
#define V_HOME_POS (V_HOME_DIR < 0 ? V_MIN_POS : V_MAX_POS)
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#ifdef MANUAL_W_HOME_POS
|
||||
#define W_HOME_POS MANUAL_W_HOME_POS
|
||||
#else
|
||||
#define W_HOME_POS (W_HOME_DIR < 0 ? W_MIN_POS : W_MAX_POS)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If DELTA_HEIGHT isn't defined use the old setting
|
||||
@ -1440,6 +1522,15 @@
|
||||
#if ENABLED(USE_KMAX_PLUG)
|
||||
#define ENDSTOPPULLUP_KMAX
|
||||
#endif
|
||||
#if ENABLED(USE_UMAX_PLUG)
|
||||
#define ENDSTOPPULLUP_UMAX
|
||||
#endif
|
||||
#if ENABLED(USE_VMAX_PLUG)
|
||||
#define ENDSTOPPULLUP_VMAX
|
||||
#endif
|
||||
#if ENABLED(USE_WMAX_PLUG)
|
||||
#define ENDSTOPPULLUP_WMAX
|
||||
#endif
|
||||
#if ENABLED(USE_XMIN_PLUG)
|
||||
#define ENDSTOPPULLUP_XMIN
|
||||
#endif
|
||||
@ -1458,6 +1549,15 @@
|
||||
#if ENABLED(USE_KMIN_PLUG)
|
||||
#define ENDSTOPPULLUP_KMIN
|
||||
#endif
|
||||
#if ENABLED(USE_UMIN_PLUG)
|
||||
#define ENDSTOPPULLUP_UMIN
|
||||
#endif
|
||||
#if ENABLED(USE_VMIN_PLUG)
|
||||
#define ENDSTOPPULLUP_VMIN
|
||||
#endif
|
||||
#if ENABLED(USE_WMIN_PLUG)
|
||||
#define ENDSTOPPULLUP_WMIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1680,6 +1780,66 @@
|
||||
#undef DISABLE_INACTIVE_K
|
||||
#endif
|
||||
|
||||
#if HAS_U_AXIS
|
||||
#if PIN_EXISTS(U_ENABLE) || AXIS_IS_L64XX(U) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(U))
|
||||
#define HAS_U_ENABLE 1
|
||||
#endif
|
||||
#if PIN_EXISTS(U_DIR)
|
||||
#define HAS_U_DIR 1
|
||||
#endif
|
||||
#if PIN_EXISTS(U_STEP)
|
||||
#define HAS_U_STEP 1
|
||||
#endif
|
||||
#if PIN_EXISTS(U_MS1)
|
||||
#define HAS_U_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
|
||||
#define DISABLE_INACTIVE_U 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_U
|
||||
#endif
|
||||
|
||||
#if HAS_V_AXIS
|
||||
#if PIN_EXISTS(V_ENABLE) || AXIS_IS_L64XX(V) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(V))
|
||||
#define HAS_V_ENABLE 1
|
||||
#endif
|
||||
#if PIN_EXISTS(V_DIR)
|
||||
#define HAS_V_DIR 1
|
||||
#endif
|
||||
#if PIN_EXISTS(V_STEP)
|
||||
#define HAS_V_STEP 1
|
||||
#endif
|
||||
#if PIN_EXISTS(V_MS1)
|
||||
#define HAS_V_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
|
||||
#define DISABLE_INACTIVE_V 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_V
|
||||
#endif
|
||||
|
||||
#if HAS_W_AXIS
|
||||
#if PIN_EXISTS(W_ENABLE) || AXIS_IS_L64XX(W) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(W))
|
||||
#define HAS_W_ENABLE 1
|
||||
#endif
|
||||
#if PIN_EXISTS(W_DIR)
|
||||
#define HAS_W_DIR 1
|
||||
#endif
|
||||
#if PIN_EXISTS(W_STEP)
|
||||
#define HAS_W_STEP 1
|
||||
#endif
|
||||
#if PIN_EXISTS(W_MS1)
|
||||
#define HAS_W_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
|
||||
#define DISABLE_INACTIVE_W 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_W
|
||||
#endif
|
||||
|
||||
// Extruder steppers and solenoids
|
||||
#if HAS_EXTRUDERS
|
||||
|
||||
@ -1848,7 +2008,7 @@
|
||||
//
|
||||
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
#if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K)
|
||||
#if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K, STEALTHCHOP_U, STEALTHCHOP_V, STEALTHCHOP_W)
|
||||
#define STEALTHCHOP_ENABLED 1
|
||||
#endif
|
||||
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
|
||||
@ -1937,6 +2097,15 @@
|
||||
#define Y2_SLAVE_ADDRESS 0
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define U_SPI_SENSORLESS U_SENSORLESS
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define V_SPI_SENSORLESS V_SENSORLESS
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define W_SPI_SENSORLESS W_SENSORLESS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z)
|
||||
@ -2074,6 +2243,69 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(U)
|
||||
#if defined(U_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(U)
|
||||
#define U_SENSORLESS 1
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(U)
|
||||
#define U_HAS_STEALTHCHOP 1
|
||||
#endif
|
||||
#if ENABLED(SPI_ENDSTOPS)
|
||||
#define U_SPI_SENSORLESS U_SENSORLESS
|
||||
#endif
|
||||
#ifndef U_INTERPOLATE
|
||||
#define U_INTERPOLATE INTERPOLATE
|
||||
#endif
|
||||
#ifndef U_HOLD_MULTIPLIER
|
||||
#define U_HOLD_MULTIPLIER HOLD_MULTIPLIER
|
||||
#endif
|
||||
#ifndef U_SLAVE_ADDRESS
|
||||
#define U_SLAVE_ADDRESS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(V)
|
||||
#if defined(V_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(V)
|
||||
#define V_SENSORLESS 1
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(V)
|
||||
#define V_HAS_STEALTHCHOP 1
|
||||
#endif
|
||||
#if ENABLED(SPI_ENDSTOPS)
|
||||
#define V_SPI_SENSORLESS V_SENSORLESS
|
||||
#endif
|
||||
#ifndef V_INTERPOLATE
|
||||
#define V_INTERPOLATE INTERPOLATE
|
||||
#endif
|
||||
#ifndef V_HOLD_MULTIPLIER
|
||||
#define V_HOLD_MULTIPLIER HOLD_MULTIPLIER
|
||||
#endif
|
||||
#ifndef V_SLAVE_ADDRESS
|
||||
#define V_SLAVE_ADDRESS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(W)
|
||||
#if defined(W_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(W)
|
||||
#define W_SENSORLESS 1
|
||||
#endif
|
||||
#if AXIS_HAS_STEALTHCHOP(W)
|
||||
#define W_HAS_STEALTHCHOP 1
|
||||
#endif
|
||||
#if ENABLED(SPI_ENDSTOPS)
|
||||
#define W_SPI_SENSORLESS W_SENSORLESS
|
||||
#endif
|
||||
#ifndef W_INTERPOLATE
|
||||
#define W_INTERPOLATE INTERPOLATE
|
||||
#endif
|
||||
#ifndef W_HOLD_MULTIPLIER
|
||||
#define W_HOLD_MULTIPLIER HOLD_MULTIPLIER
|
||||
#endif
|
||||
#ifndef W_SLAVE_ADDRESS
|
||||
#define W_SLAVE_ADDRESS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E0)
|
||||
#if AXIS_HAS_STEALTHCHOP(E0)
|
||||
#define E0_HAS_STEALTHCHOP 1
|
||||
@ -2215,6 +2447,7 @@
|
||||
#define ANY_SERIAL_IS(N) ( CONF_SERIAL_IS(N) \
|
||||
|| TMC_UART_IS(X, N) || TMC_UART_IS(Y , N) || TMC_UART_IS(Z , N) \
|
||||
|| TMC_UART_IS(I, N) || TMC_UART_IS(J , N) || TMC_UART_IS(K , N) \
|
||||
|| TMC_UART_IS(U, N) || TMC_UART_IS(V , N) || TMC_UART_IS(W , N) \
|
||||
|| TMC_UART_IS(X2, N) || TMC_UART_IS(Y2, N) || TMC_UART_IS(Z2, N) || TMC_UART_IS(Z3, N) || TMC_UART_IS(Z4, N) \
|
||||
|| TMC_UART_IS(E0, N) || TMC_UART_IS(E1, N) || TMC_UART_IS(E2, N) || TMC_UART_IS(E3, N) || TMC_UART_IS(E4, N) )
|
||||
|
||||
@ -2349,6 +2582,24 @@
|
||||
#if _HAS_STOP(K,MAX)
|
||||
#define HAS_K_MAX 1
|
||||
#endif
|
||||
#if _HAS_STOP(U,MIN)
|
||||
#define HAS_U_MIN 1
|
||||
#endif
|
||||
#if _HAS_STOP(U,MAX)
|
||||
#define HAS_U_MAX 1
|
||||
#endif
|
||||
#if _HAS_STOP(V,MIN)
|
||||
#define HAS_V_MIN 1
|
||||
#endif
|
||||
#if _HAS_STOP(V,MAX)
|
||||
#define HAS_V_MAX 1
|
||||
#endif
|
||||
#if _HAS_STOP(W,MIN)
|
||||
#define HAS_W_MIN 1
|
||||
#endif
|
||||
#if _HAS_STOP(W,MAX)
|
||||
#define HAS_W_MAX 1
|
||||
#endif
|
||||
#if PIN_EXISTS(X2_MIN)
|
||||
#define HAS_X2_MIN 1
|
||||
#endif
|
||||
@ -2849,7 +3100,7 @@
|
||||
#if HAS_EXTRUDERS && PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
#define HAS_MOTOR_CURRENT_PWM_E 1
|
||||
#endif
|
||||
#if HAS_MOTOR_CURRENT_PWM_E || ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_I, MOTOR_CURRENT_PWM_J, MOTOR_CURRENT_PWM_K)
|
||||
#if HAS_MOTOR_CURRENT_PWM_E || ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_I, MOTOR_CURRENT_PWM_J, MOTOR_CURRENT_PWM_K, MOTOR_CURRENT_PWM_U, MOTOR_CURRENT_PWM_V, MOTOR_CURRENT_PWM_W)
|
||||
#define HAS_MOTOR_CURRENT_PWM 1
|
||||
#endif
|
||||
|
||||
@ -2859,7 +3110,7 @@
|
||||
#if ANY(HAS_E0_MS_PINS, HAS_E1_MS_PINS, HAS_E2_MS_PINS, HAS_E3_MS_PINS, HAS_E4_MS_PINS, HAS_E5_MS_PINS, HAS_E6_MS_PINS, HAS_E7_MS_PINS)
|
||||
#define HAS_SOME_E_MS_PINS 1
|
||||
#endif
|
||||
#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_SOME_E_MS_PINS)
|
||||
#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_U_MS_PINS, HAS_V_MS_PINS, HAS_W_MS_PINS, HAS_SOME_E_MS_PINS)
|
||||
#define HAS_MICROSTEPS 1
|
||||
#endif
|
||||
|
||||
|
@ -35,8 +35,8 @@
|
||||
#endif
|
||||
|
||||
// Strings for sanity check messages
|
||||
#define _LINEAR_AXES_STR LINEAR_AXIS_GANG("X ", "Y ", "Z ", "I ", "J ", "K ")
|
||||
#define _LOGICAL_AXES_STR LOGICAL_AXIS_GANG("E ", "X ", "Y ", "Z ", "I ", "J ", "K ")
|
||||
#define _NUM_AXES_STR NUM_AXIS_GANG("X ", "Y ", "Z ", "I ", "J ", "K ", "U ", "V ", "W ")
|
||||
#define _LOGICAL_AXES_STR LOGICAL_AXIS_GANG("E ", "X ", "Y ", "Z ", "I ", "J ", "K ", "U ", "V ", "W ")
|
||||
|
||||
// Make sure macros aren't borked
|
||||
#define TEST1
|
||||
@ -806,6 +806,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "Enable only one of ENDSTOPPULLUP_J_MAX or ENDSTOPPULLDOWN_J_MAX."
|
||||
#elif BOTH(ENDSTOPPULLUP_KMAX, ENDSTOPPULLDOWN_KMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_K_MAX or ENDSTOPPULLDOWN_K_MAX."
|
||||
#elif BOTH(ENDSTOPPULLUP_UMAX, ENDSTOPPULLDOWN_UMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_U_MAX or ENDSTOPPULLDOWN_U_MAX."
|
||||
#elif BOTH(ENDSTOPPULLUP_VMAX, ENDSTOPPULLDOWN_VMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_V_MAX or ENDSTOPPULLDOWN_V_MAX."
|
||||
#elif BOTH(ENDSTOPPULLUP_WMAX, ENDSTOPPULLDOWN_WMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_W_MAX or ENDSTOPPULLDOWN_W_MAX."
|
||||
#elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN."
|
||||
#elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN)
|
||||
@ -818,6 +824,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "Enable only one of ENDSTOPPULLUP_J_MIN or ENDSTOPPULLDOWN_J_MIN."
|
||||
#elif BOTH(ENDSTOPPULLUP_KMIN, ENDSTOPPULLDOWN_KMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_K_MIN or ENDSTOPPULLDOWN_K_MIN."
|
||||
#elif BOTH(ENDSTOPPULLUP_UMIN, ENDSTOPPULLDOWN_UMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_U_MIN or ENDSTOPPULLDOWN_U_MIN."
|
||||
#elif BOTH(ENDSTOPPULLUP_VMIN, ENDSTOPPULLDOWN_VMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_V_MIN or ENDSTOPPULLDOWN_V_MIN."
|
||||
#elif BOTH(ENDSTOPPULLUP_WMIN, ENDSTOPPULLDOWN_WMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_W_MIN or ENDSTOPPULLDOWN_W_MIN."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1453,16 +1465,18 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Features that require a min/max/specific LINEAR_AXES
|
||||
* Features that require a min/max/specific NUM_AXES
|
||||
*/
|
||||
#if HAS_LEVELING && !HAS_Z_AXIS
|
||||
#error "Leveling in Marlin requires three or more axes, with Z as the vertical axis."
|
||||
#elif ENABLED(CNC_WORKSPACE_PLANES) && !HAS_Z_AXIS
|
||||
#error "CNC_WORKSPACE_PLANES currently requires LINEAR_AXES >= 3"
|
||||
#elif ENABLED(DIRECT_STEPPING) && LINEAR_AXES > XYZ
|
||||
#error "DIRECT_STEPPING currently requires LINEAR_AXES 3"
|
||||
#elif ENABLED(FOAMCUTTER_XYUV) && LINEAR_AXES < 5
|
||||
#error "FOAMCUTTER_XYUV requires LINEAR_AXES >= 5."
|
||||
#error "CNC_WORKSPACE_PLANES currently requires NUM_AXES >= 3"
|
||||
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > XYZ
|
||||
#error "DIRECT_STEPPING currently requires NUM_AXES 3"
|
||||
#elif ENABLED(FOAMCUTTER_XYUV) && NUM_AXES < 5
|
||||
#error "FOAMCUTTER_XYUV requires NUM_AXES >= 5."
|
||||
#elif ENABLED(LINEAR_ADVANCE) && HAS_I_AXIS
|
||||
#error "LINEAR_ADVANCE currently requires NUM_AXES <= 3."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1470,33 +1484,76 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
*/
|
||||
#if HAS_I_AXIS
|
||||
#if !defined(I_MIN_POS) || !defined(I_MAX_POS)
|
||||
#error "I_MIN_POS and I_MAX_POS are required with LINEAR_AXES >= 4."
|
||||
#error "I_MIN_POS and I_MAX_POS are required with NUM_AXES >= 4."
|
||||
#elif !defined(I_HOME_DIR)
|
||||
#error "I_HOME_DIR is required with LINEAR_AXES >= 4."
|
||||
#error "I_HOME_DIR is required with NUM_AXES >= 4."
|
||||
#elif HAS_I_ENABLE && !defined(I_ENABLE_ON)
|
||||
#error "I_ENABLE_ON is required for your I driver with LINEAR_AXES >= 4."
|
||||
#error "I_ENABLE_ON is required for your I driver with NUM_AXES >= 4."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_J_AXIS
|
||||
#if AXIS5_NAME == AXIS4_NAME
|
||||
#error "AXIS5_NAME must be unique."
|
||||
#elif ENABLED(AXIS5_ROTATES) && DISABLED(AXIS4_ROTATES)
|
||||
#error "AXIS5_ROTATES requires AXIS4_ROTATES."
|
||||
#elif !defined(J_MIN_POS) || !defined(J_MAX_POS)
|
||||
#error "J_MIN_POS and J_MAX_POS are required with LINEAR_AXES >= 5."
|
||||
#error "J_MIN_POS and J_MAX_POS are required with NUM_AXES >= 5."
|
||||
#elif !defined(J_HOME_DIR)
|
||||
#error "J_HOME_DIR is required with LINEAR_AXES >= 5."
|
||||
#error "J_HOME_DIR is required with NUM_AXES >= 5."
|
||||
#elif HAS_J_ENABLE && !defined(J_ENABLE_ON)
|
||||
#error "J_ENABLE_ON is required for your J driver with LINEAR_AXES >= 5."
|
||||
#error "J_ENABLE_ON is required for your J driver with NUM_AXES >= 5."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_K_AXIS
|
||||
#if AXIS6_NAME == AXIS5_NAME || AXIS6_NAME == AXIS4_NAME
|
||||
#error "AXIS6_NAME must be unique."
|
||||
#elif ENABLED(AXIS6_ROTATES) && DISABLED(AXIS5_ROTATES)
|
||||
#error "AXIS6_ROTATES requires AXIS5_ROTATES."
|
||||
#elif !defined(K_MIN_POS) || !defined(K_MAX_POS)
|
||||
#error "K_MIN_POS and K_MAX_POS are required with LINEAR_AXES >= 6."
|
||||
#error "K_MIN_POS and K_MAX_POS are required with NUM_AXES >= 6."
|
||||
#elif !defined(K_HOME_DIR)
|
||||
#error "K_HOME_DIR is required with LINEAR_AXES >= 6."
|
||||
#error "K_HOME_DIR is required with NUM_AXES >= 6."
|
||||
#elif HAS_K_ENABLE && !defined(K_ENABLE_ON)
|
||||
#error "K_ENABLE_ON is required for your K driver with LINEAR_AXES >= 6."
|
||||
#error "K_ENABLE_ON is required for your K driver with NUM_AXES >= 6."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#if AXIS7_NAME == AXIS6_NAME || AXIS7_NAME == AXIS5_NAME || AXIS7_NAME == AXIS4_NAME
|
||||
#error "AXIS7_NAME must be unique."
|
||||
#elif ENABLED(AXIS7_ROTATES) && DISABLED(AXIS6_ROTATES)
|
||||
#error "AXIS7_ROTATES requires AXIS6_ROTATES."
|
||||
#elif !defined(U_MIN_POS) || !defined(U_MAX_POS)
|
||||
#error "U_MIN_POS and U_MAX_POS are required with NUM_AXES >= 7."
|
||||
#elif !defined(U_HOME_DIR)
|
||||
#error "U_HOME_DIR is required with NUM_AXES >= 7."
|
||||
#elif HAS_U_ENABLE && !defined(U_ENABLE_ON)
|
||||
#error "U_ENABLE_ON is required for your U driver with NUM_AXES >= 7."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#if AXIS8_NAME == AXIS7_NAME || AXIS8_NAME == AXIS6_NAME || AXIS8_NAME == AXIS5_NAME || AXIS8_NAME == AXIS4_NAME
|
||||
#error "AXIS8_NAME must be unique."
|
||||
#elif ENABLED(AXIS8_ROTATES) && DISABLED(AXIS7_ROTATES)
|
||||
#error "AXIS8_ROTATES requires AXIS7_ROTATES."
|
||||
#elif !defined(V_MIN_POS) || !defined(V_MAX_POS)
|
||||
#error "V_MIN_POS and V_MAX_POS are required with NUM_AXES >= 8."
|
||||
#elif !defined(V_HOME_DIR)
|
||||
#error "V_HOME_DIR is required with NUM_AXES >= 8."
|
||||
#elif HAS_V_ENABLE && !defined(V_ENABLE_ON)
|
||||
#error "V_ENABLE_ON is required for your V driver with NUM_AXES >= 8."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#if AXIS9_NAME == AXIS8_NAME || AXIS9_NAME == AXIS7_NAME || AXIS9_NAME == AXIS6_NAME || AXIS9_NAME == AXIS5_NAME || AXIS9_NAME == AXIS4_NAME
|
||||
#error "AXIS9_NAME must be unique."
|
||||
#elif ENABLED(AXIS9_ROTATES) && DISABLED(AXIS8_ROTATES)
|
||||
#error "AXIS9_ROTATES requires AXIS8_ROTATES."
|
||||
#elif !defined(W_MIN_POS) || !defined(W_MAX_POS)
|
||||
#error "W_MIN_POS and W_MAX_POS are required with NUM_AXES >= 9."
|
||||
#elif !defined(W_HOME_DIR)
|
||||
#error "W_HOME_DIR is required with NUM_AXES >= 9."
|
||||
#elif HAS_W_ENABLE && !defined(W_ENABLE_ON)
|
||||
#error "W_ENABLE_ON is required for your W driver with NUM_AXES >= 9."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -1886,49 +1943,61 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "Required setting HOMING_BUMP_DIVISOR is missing!"
|
||||
#else
|
||||
constexpr float hbm[] = HOMING_BUMP_MM, hbd[] = HOMING_BUMP_DIVISOR;
|
||||
static_assert(COUNT(hbm) == LINEAR_AXES, "HOMING_BUMP_MM must have " _LINEAR_AXES_STR "elements (and no others).");
|
||||
LINEAR_AXIS_CODE(
|
||||
static_assert(COUNT(hbm) == NUM_AXES, "HOMING_BUMP_MM must have " _NUM_AXES_STR "elements (and no others).");
|
||||
NUM_AXIS_CODE(
|
||||
static_assert(hbm[X_AXIS] >= 0, "HOMING_BUMP_MM.X must be greater than or equal to 0."),
|
||||
static_assert(hbm[Y_AXIS] >= 0, "HOMING_BUMP_MM.Y must be greater than or equal to 0."),
|
||||
static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal to 0."),
|
||||
static_assert(hbm[I_AXIS] >= 0, "HOMING_BUMP_MM.I must be greater than or equal to 0."),
|
||||
static_assert(hbm[J_AXIS] >= 0, "HOMING_BUMP_MM.J must be greater than or equal to 0."),
|
||||
static_assert(hbm[K_AXIS] >= 0, "HOMING_BUMP_MM.K must be greater than or equal to 0.")
|
||||
static_assert(hbm[K_AXIS] >= 0, "HOMING_BUMP_MM.K must be greater than or equal to 0."),
|
||||
static_assert(hbm[U_AXIS] >= 0, "HOMING_BUMP_MM.U must be greater than or equal to 0."),
|
||||
static_assert(hbm[V_AXIS] >= 0, "HOMING_BUMP_MM.V must be greater than or equal to 0."),
|
||||
static_assert(hbm[W_AXIS] >= 0, "HOMING_BUMP_MM.W must be greater than or equal to 0.")
|
||||
);
|
||||
static_assert(COUNT(hbd) == LINEAR_AXES, "HOMING_BUMP_DIVISOR must have " _LINEAR_AXES_STR "elements (and no others).");
|
||||
LINEAR_AXIS_CODE(
|
||||
static_assert(COUNT(hbd) == NUM_AXES, "HOMING_BUMP_DIVISOR must have " _NUM_AXES_STR "elements (and no others).");
|
||||
NUM_AXIS_CODE(
|
||||
static_assert(hbd[X_AXIS] >= 1, "HOMING_BUMP_DIVISOR.X must be greater than or equal to 1."),
|
||||
static_assert(hbd[Y_AXIS] >= 1, "HOMING_BUMP_DIVISOR.Y must be greater than or equal to 1."),
|
||||
static_assert(hbd[Z_AXIS] >= 1, "HOMING_BUMP_DIVISOR.Z must be greater than or equal to 1."),
|
||||
static_assert(hbd[I_AXIS] >= 1, "HOMING_BUMP_DIVISOR.I must be greater than or equal to 1."),
|
||||
static_assert(hbd[J_AXIS] >= 1, "HOMING_BUMP_DIVISOR.J must be greater than or equal to 1."),
|
||||
static_assert(hbd[K_AXIS] >= 1, "HOMING_BUMP_DIVISOR.K must be greater than or equal to 1.")
|
||||
static_assert(hbd[K_AXIS] >= 1, "HOMING_BUMP_DIVISOR.K must be greater than or equal to 1."),
|
||||
static_assert(hbd[U_AXIS] >= 1, "HOMING_BUMP_DIVISOR.U must be greater than or equal to 1."),
|
||||
static_assert(hbd[V_AXIS] >= 1, "HOMING_BUMP_DIVISOR.V must be greater than or equal to 1."),
|
||||
static_assert(hbd[W_AXIS] >= 1, "HOMING_BUMP_DIVISOR.W must be greater than or equal to 1.")
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef HOMING_BACKOFF_POST_MM
|
||||
constexpr float hbp[] = HOMING_BACKOFF_POST_MM;
|
||||
static_assert(COUNT(hbp) == LINEAR_AXES, "HOMING_BACKOFF_POST_MM must have " _LINEAR_AXES_STR "elements (and no others).");
|
||||
LINEAR_AXIS_CODE(
|
||||
static_assert(COUNT(hbp) == NUM_AXES, "HOMING_BACKOFF_POST_MM must have " _NUM_AXES_STR "elements (and no others).");
|
||||
NUM_AXIS_CODE(
|
||||
static_assert(hbp[X_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.X must be greater than or equal to 0."),
|
||||
static_assert(hbp[Y_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.Y must be greater than or equal to 0."),
|
||||
static_assert(hbp[Z_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.Z must be greater than or equal to 0."),
|
||||
static_assert(hbp[I_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.I must be greater than or equal to 0."),
|
||||
static_assert(hbp[J_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.J must be greater than or equal to 0."),
|
||||
static_assert(hbp[K_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.K must be greater than or equal to 0.")
|
||||
static_assert(hbp[K_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.K must be greater than or equal to 0."),
|
||||
static_assert(hbp[U_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.U must be greater than or equal to 0."),
|
||||
static_assert(hbp[V_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.V must be greater than or equal to 0."),
|
||||
static_assert(hbp[W_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.W must be greater than or equal to 0.")
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef SENSORLESS_BACKOFF_MM
|
||||
constexpr float sbm[] = SENSORLESS_BACKOFF_MM;
|
||||
static_assert(COUNT(sbm) == LINEAR_AXES, "SENSORLESS_BACKOFF_MM must have " _LINEAR_AXES_STR "elements (and no others).");
|
||||
LINEAR_AXIS_CODE(
|
||||
static_assert(COUNT(sbm) == NUM_AXES, "SENSORLESS_BACKOFF_MM must have " _NUM_AXES_STR "elements (and no others).");
|
||||
NUM_AXIS_CODE(
|
||||
static_assert(sbm[X_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.X must be greater than or equal to 0."),
|
||||
static_assert(sbm[Y_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Y must be greater than or equal to 0."),
|
||||
static_assert(sbm[Z_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Z must be greater than or equal to 0."),
|
||||
static_assert(sbm[I_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.I must be greater than or equal to 0."),
|
||||
static_assert(sbm[J_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.J must be greater than or equal to 0."),
|
||||
static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0.")
|
||||
static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0."),
|
||||
static_assert(sbm[U_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.U must be greater than or equal to 0."),
|
||||
static_assert(sbm[V_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.V must be greater than or equal to 0."),
|
||||
static_assert(sbm[W_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.W must be greater than or equal to 0.")
|
||||
);
|
||||
#endif
|
||||
|
||||
@ -1951,9 +2020,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Make sure DISABLE_[XYZ] compatible with selected homing options
|
||||
*/
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K)
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W)
|
||||
#if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING)
|
||||
#error "DISABLE_[XYZIJK] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
|
||||
#error "DISABLE_[XYZIJKUVW] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -2453,7 +2522,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#define _PLUG_UNUSED_TEST(A,P) (DISABLED(USE_##P##MIN_PLUG, USE_##P##MAX_PLUG) \
|
||||
&& !(ENABLED(A##_DUAL_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) \
|
||||
&& !(ENABLED(A##_MULTI_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) )
|
||||
#define _AXIS_PLUG_UNUSED_TEST(A) (1 LINEAR_AXIS_GANG(&& _PLUG_UNUSED_TEST(A,X), && _PLUG_UNUSED_TEST(A,Y), && _PLUG_UNUSED_TEST(A,Z), && _PLUG_UNUSED_TEST(A,I), && _PLUG_UNUSED_TEST(A,J), && _PLUG_UNUSED_TEST(A,K) ) )
|
||||
#define _AXIS_PLUG_UNUSED_TEST(A) (1 NUM_AXIS_GANG(&& _PLUG_UNUSED_TEST(A,X), && _PLUG_UNUSED_TEST(A,Y), && _PLUG_UNUSED_TEST(A,Z), \
|
||||
&& _PLUG_UNUSED_TEST(A,I), && _PLUG_UNUSED_TEST(A,J), && _PLUG_UNUSED_TEST(A,K), \
|
||||
&& _PLUG_UNUSED_TEST(A,U), && _PLUG_UNUSED_TEST(A,V), && _PLUG_UNUSED_TEST(A,W) ) )
|
||||
|
||||
// A machine with endstops must have a minimum of 3
|
||||
#if HAS_ENDSTOPS
|
||||
@ -2475,6 +2546,15 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if HAS_K_AXIS && _AXIS_PLUG_UNUSED_TEST(K)
|
||||
#error "You must enable USE_KMIN_PLUG or USE_KMAX_PLUG."
|
||||
#endif
|
||||
#if HAS_U_AXIS && _AXIS_PLUG_UNUSED_TEST(U)
|
||||
#error "You must enable USE_UMIN_PLUG or USE_UMAX_PLUG."
|
||||
#endif
|
||||
#if HAS_V_AXIS && _AXIS_PLUG_UNUSED_TEST(V)
|
||||
#error "You must enable USE_VMIN_PLUG or USE_VMAX_PLUG."
|
||||
#endif
|
||||
#if HAS_W_AXIS && _AXIS_PLUG_UNUSED_TEST(W)
|
||||
#error "You must enable USE_WMIN_PLUG or USE_WMAX_PLUG."
|
||||
#endif
|
||||
|
||||
// Delta and Cartesian use 3 homing endstops
|
||||
#if NONE(IS_SCARA, SPI_ENDSTOPS)
|
||||
@ -2498,6 +2578,18 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "Enable USE_KMIN_PLUG when homing K to MIN."
|
||||
#elif HAS_K_AXIS && K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG)
|
||||
#error "Enable USE_KMAX_PLUG when homing K to MAX."
|
||||
#elif HAS_U_AXIS && U_HOME_TO_MIN && DISABLED(USE_UMIN_PLUG)
|
||||
#error "Enable USE_UMIN_PLUG when homing U to MIN."
|
||||
#elif HAS_U_AXIS && U_HOME_TO_MAX && DISABLED(USE_UMAX_PLUG)
|
||||
#error "Enable USE_UMAX_PLUG when homing U to MAX."
|
||||
#elif HAS_V_AXIS && V_HOME_TO_MIN && DISABLED(USE_VMIN_PLUG)
|
||||
#error "Enable USE_VMIN_PLUG when homing V to MIN."
|
||||
#elif HAS_V_AXIS && V_HOME_TO_MAX && DISABLED(USE_VMAX_PLUG)
|
||||
#error "Enable USE_VMAX_PLUG when homing V to MAX."
|
||||
#elif HAS_W_AXIS && W_HOME_TO_MIN && DISABLED(USE_WMIN_PLUG)
|
||||
#error "Enable USE_WMIN_PLUG when homing W to MIN."
|
||||
#elif HAS_W_AXIS && W_HOME_TO_MAX && DISABLED(USE_WMAX_PLUG)
|
||||
#error "Enable USE_WMAX_PLUG when homing W to MAX."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -2994,6 +3086,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "An SPI driven TMC on J requires J_CS_PIN."
|
||||
#elif INVALID_TMC_SPI(K)
|
||||
#error "An SPI driven TMC on K requires K_CS_PIN."
|
||||
#elif INVALID_TMC_SPI(U)
|
||||
#error "An SPI driven TMC on U requires U_CS_PIN."
|
||||
#elif INVALID_TMC_SPI(V)
|
||||
#error "An SPI driven TMC on V requires V_CS_PIN."
|
||||
#elif INVALID_TMC_SPI(W)
|
||||
#error "An SPI driven TMC on W requires W_CS_PIN."
|
||||
#endif
|
||||
#undef INVALID_TMC_SPI
|
||||
|
||||
@ -3039,6 +3137,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "TMC2208 or TMC2209 on J requires J_HARDWARE_SERIAL or J_SERIAL_(RX|TX)_PIN."
|
||||
#elif HAS_K_AXIS && INVALID_TMC_UART(K)
|
||||
#error "TMC2208 or TMC2209 on K requires K_HARDWARE_SERIAL or K_SERIAL_(RX|TX)_PIN."
|
||||
#elif HAS_U_AXIS && INVALID_TMC_UART(U)
|
||||
#error "TMC2208 or TMC2209 on U requires U_HARDWARE_SERIAL or U_SERIAL_(RX|TX)_PIN."
|
||||
#elif HAS_V_AXIS && INVALID_TMC_UART(V)
|
||||
#error "TMC2208 or TMC2209 on V requires V_HARDWARE_SERIAL or V_SERIAL_(RX|TX)_PIN."
|
||||
#elif HAS_W_AXIS && INVALID_TMC_UART(W)
|
||||
#error "TMC2208 or TMC2209 on W requires W_HARDWARE_SERIAL or W_SERIAL_(RX|TX)_PIN."
|
||||
|
||||
#endif
|
||||
#undef INVALID_TMC_UART
|
||||
|
||||
@ -3068,6 +3173,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
INVALID_TMC_ADDRESS(J);
|
||||
#elif AXIS_DRIVER_TYPE_K(TMC2209)
|
||||
INVALID_TMC_ADDRESS(K);
|
||||
#elif AXIS_DRIVER_TYPE_U(TMC2209)
|
||||
INVALID_TMC_ADDRESS(U);
|
||||
#elif AXIS_DRIVER_TYPE_V(TMC2209)
|
||||
INVALID_TMC_ADDRESS(V);
|
||||
#elif AXIS_DRIVER_TYPE_W(TMC2209)
|
||||
INVALID_TMC_ADDRESS(W);
|
||||
#elif AXIS_DRIVER_TYPE_E0(TMC2209)
|
||||
INVALID_TMC_ADDRESS(E0);
|
||||
#elif AXIS_DRIVER_TYPE_E1(TMC2209)
|
||||
@ -3129,6 +3240,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
INVALID_TMC_MS(J)
|
||||
#elif HAS_K_AXIS && !TMC_MICROSTEP_IS_VALID(K)
|
||||
INVALID_TMC_MS(K)
|
||||
#elif HAS_U_AXIS && !TMC_MICROSTEP_IS_VALID(U)
|
||||
INVALID_TMC_MS(U)
|
||||
#elif HAS_V_AXIS && !TMC_MICROSTEP_IS_VALID(V)
|
||||
INVALID_TMC_MS(V)
|
||||
#elif HAS_W_AXIS && !TMC_MICROSTEP_IS_VALID(W)
|
||||
INVALID_TMC_MS(W)
|
||||
#endif
|
||||
#undef INVALID_TMC_MS
|
||||
#undef TMC_MICROSTEP_IS_VALID
|
||||
@ -3158,6 +3275,15 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if HAS_K_AXIS
|
||||
#define K_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(K,TMC2209)
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define U_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(U,TMC2209)
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define V_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(V,TMC2209)
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define W_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(W,TMC2209)
|
||||
#endif
|
||||
|
||||
#if NONE(SPI_ENDSTOPS, ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS)
|
||||
#if X_SENSORLESS && X_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_XMIN)
|
||||
@ -3184,6 +3310,19 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) when homing to K_MIN."
|
||||
#elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_KMAX)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) when homing to K_MAX."
|
||||
#elif HAS_U_AXIS && U_SENSORLESS && U_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_UMIN)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMIN (or ENDSTOPPULLUPS) when homing to U_MIN."
|
||||
#elif HAS_U_AXIS && U_SENSORLESS && U_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_UMAX)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMAX (or ENDSTOPPULLUPS) when homing to U_MAX."
|
||||
#elif HAS_V_AXIS && V_SENSORLESS && V_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_VMIN)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMIN (or ENDSTOPPULLUPS) when homing to V_MIN."
|
||||
#elif HAS_V_AXIS && V_SENSORLESS && V_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_VMAX)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMAX (or ENDSTOPPULLUPS) when homing to V_MAX."
|
||||
#elif HAS_W_AXIS && W_SENSORLESS && W_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_WMIN)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMIN (or ENDSTOPPULLUPS) when homing to W_MIN."
|
||||
#elif HAS_W_AXIS && W_SENSORLESS && W_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_WMAX)
|
||||
#error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMAX (or ENDSTOPPULLUPS) when homing to W_MAX."
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -3264,6 +3403,42 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to K_MAX."
|
||||
#endif
|
||||
#elif ALL(HAS_U_AXIS, U_SENSORLESS, U_HOME_TO_MIN) && U_MIN_ENDSTOP_INVERTING != U_ENDSTOP_INVERTING
|
||||
#if U_ENDSTOP_INVERTING
|
||||
#error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_INVERTING = true when homing to U_MIN."
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to U_MIN."
|
||||
#endif
|
||||
#elif ALL(HAS_U_AXIS, U_SENSORLESS, U_HOME_TO_MAX) && U_MAX_ENDSTOP_INVERTING != U_ENDSTOP_INVERTING
|
||||
#if U_ENDSTOP_INVERTING
|
||||
#error "SENSORLESS_HOMING requires U_MAX_ENDSTOP_INVERTING = true when homing to U_MAX."
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires U_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to U_MAX."
|
||||
#endif
|
||||
#elif ALL(HAS_V_AXIS, V_SENSORLESS, V_HOME_TO_MIN) && V_MIN_ENDSTOP_INVERTING != V_ENDSTOP_INVERTING
|
||||
#if V_ENDSTOP_INVERTING
|
||||
#error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_INVERTING = true when homing to V_MIN."
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to V_MIN."
|
||||
#endif
|
||||
#elif ALL(HAS_V_AXIS, V_SENSORLESS, V_HOME_TO_MAX) && V_MAX_ENDSTOP_INVERTING != V_ENDSTOP_INVERTING
|
||||
#if V_ENDSTOP_INVERTING
|
||||
#error "SENSORLESS_HOMING requires V_MAX_ENDSTOP_INVERTING = true when homing to V_MAX."
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires V_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to V_MAX."
|
||||
#endif
|
||||
#elif ALL(HAS_W_AXIS, W_SENSORLESS, W_HOME_TO_MIN) && W_MIN_ENDSTOP_INVERTING != W_ENDSTOP_INVERTING
|
||||
#if W_ENDSTOP_INVERTING
|
||||
#error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_INVERTING = true when homing to W_MIN."
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to W_MIN."
|
||||
#endif
|
||||
#elif ALL(HAS_W_AXIS, W_SENSORLESS, W_HOME_TO_MAX0) && W_MAX_ENDSTOP_INVERTING != W_ENDSTOP_INVERTING
|
||||
#if W_ENDSTOP_INVERTING
|
||||
#error "SENSORLESS_HOMING requires W_MAX_ENDSTOP_INVERTING = true when homing to W_MAX."
|
||||
#else
|
||||
#error "SENSORLESS_HOMING requires W_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to W_MAX."
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -3281,6 +3456,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#undef I_ENDSTOP_INVERTING
|
||||
#undef J_ENDSTOP_INVERTING
|
||||
#undef K_ENDSTOP_INVERTING
|
||||
#undef U_ENDSTOP_INVERTING
|
||||
#undef V_ENDSTOP_INVERTING
|
||||
#undef W_ENDSTOP_INVERTING
|
||||
#endif
|
||||
|
||||
// Sensorless probing requirements
|
||||
@ -3349,6 +3527,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#define CS_COMPARE J_CS_PIN
|
||||
#elif IN_CHAIN(K)
|
||||
#define CS_COMPARE K_CS_PIN
|
||||
#elif IN_CHAIN(U)
|
||||
#define CS_COMPARE U_CS_PIN
|
||||
#elif IN_CHAIN(V)
|
||||
#define CS_COMPARE V_CS_PIN
|
||||
#elif IN_CHAIN(W)
|
||||
#define CS_COMPARE W_CS_PIN
|
||||
#elif IN_CHAIN(E0)
|
||||
#define CS_COMPARE E0_CS_PIN
|
||||
#elif IN_CHAIN(E1)
|
||||
@ -3369,6 +3553,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#define BAD_CS_PIN(A) (IN_CHAIN(A) && A##_CS_PIN != CS_COMPARE)
|
||||
#if BAD_CS_PIN(X ) || BAD_CS_PIN(Y ) || BAD_CS_PIN(Z ) || BAD_CS_PIN(X2) || BAD_CS_PIN(Y2) || BAD_CS_PIN(Z2) || BAD_CS_PIN(Z3) || BAD_CS_PIN(Z4) \
|
||||
|| BAD_CS_PIN(I) || BAD_CS_PIN(J) || BAD_CS_PIN(K) \
|
||||
|| BAD_CS_PIN(U) || BAD_CS_PIN(V) || BAD_CS_PIN(W) \
|
||||
|| BAD_CS_PIN(E0) || BAD_CS_PIN(E1) || BAD_CS_PIN(E2) || BAD_CS_PIN(E3) || BAD_CS_PIN(E4) || BAD_CS_PIN(E5) || BAD_CS_PIN(E6) || BAD_CS_PIN(E7)
|
||||
#error "All chained TMC drivers must use the same CS pin."
|
||||
#endif
|
||||
@ -3382,8 +3567,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* L64XX requirement
|
||||
*/
|
||||
#if HAS_L64XX && HAS_I_AXIS
|
||||
#error "L64XX requires LINEAR_AXES <= 3. Homing with L64XX is not yet implemented for LINEAR_AXES > 3."
|
||||
#if HAS_L64XX && NUM_AXES > 3
|
||||
#error "L64XX requires NUM_AXES <= 3. Homing with L64XX is not yet implemented for NUM_AXES > 3."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -3407,7 +3592,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
#define _EXTRA_NOTE " (Did you forget to enable DISTINCT_E_FACTORS?)"
|
||||
#else
|
||||
#define _EXTRA_NOTE " (Should be " STRINGIFY(LINEAR_AXES) "+" STRINGIFY(E_STEPPERS) ")"
|
||||
#define _EXTRA_NOTE " (Should be " STRINGIFY(NUM_AXES) "+" STRINGIFY(E_STEPPERS) ")"
|
||||
#endif
|
||||
|
||||
constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
|
||||
@ -3426,7 +3611,7 @@ static_assert(COUNT(sanity_arr_3) <= DISTINCT_AXES, "DEFAULT_MAX_ACCELERATION ha
|
||||
static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive.");
|
||||
|
||||
constexpr float sanity_arr_4[] = HOMING_FEEDRATE_MM_M;
|
||||
static_assert(COUNT(sanity_arr_4) == LINEAR_AXES, "HOMING_FEEDRATE_MM_M requires " _LINEAR_AXES_STR "elements (and no others).");
|
||||
static_assert(COUNT(sanity_arr_4) == NUM_AXES, "HOMING_FEEDRATE_MM_M requires " _NUM_AXES_STR "elements (and no others).");
|
||||
static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
|
||||
#ifdef MAX_ACCEL_EDIT_VALUES
|
||||
@ -3872,6 +4057,15 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#if _BAD_DRIVER(K)
|
||||
#error "K_DRIVER_TYPE is not recognized."
|
||||
#endif
|
||||
#if _BAD_DRIVER(U)
|
||||
#error "U_DRIVER_TYPE is not recognized."
|
||||
#endif
|
||||
#if _BAD_DRIVER(V)
|
||||
#error "V_DRIVER_TYPE is not recognized."
|
||||
#endif
|
||||
#if _BAD_DRIVER(W)
|
||||
#error "W_DRIVER_TYPE is not recognized."
|
||||
#endif
|
||||
#if _BAD_DRIVER(X2)
|
||||
#error "X2_DRIVER_TYPE is not recognized."
|
||||
#endif
|
||||
@ -3944,7 +4138,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
|
||||
// Misc. Cleanup
|
||||
#undef _TEST_PWM
|
||||
#undef _LINEAR_AXES_STR
|
||||
#undef _NUM_AXES_STR
|
||||
#undef _LOGICAL_AXES_STR
|
||||
|
||||
// JTAG support in the HAL
|
||||
|
@ -540,6 +540,163 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if AUTO_ASSIGNED_U_STEPPER
|
||||
#warning "Note: Auto-assigned U STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_U_CS
|
||||
#warning "Note: Auto-assigned U_CS_PIN to an unused En_CS_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_U_MS1
|
||||
#warning "Note: Auto-assigned U_MS1_PIN to an unused En_MS1_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_U_MS2
|
||||
#warning "Note: Auto-assigned U_MS2_PIN to an unused En_MS2_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_U_MS3
|
||||
#warning "Note: Auto-assigned U_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_U_DIAG
|
||||
#if U_USE_ENDSTOP == _XMIN_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _XMAX_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif K_USE_ENDSTOP == _YMIN_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _YMAX_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _ZMIN_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _ZMAX_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _XDIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _YDIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _ZDIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E0DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E1DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E2DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E3DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E4DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E5DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E6DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif U_USE_ENDSTOP == _E7DIAG_
|
||||
#warning "Note: Auto-assigned U_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_V_STEPPER
|
||||
#warning "Note: Auto-assigned V STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_V_CS
|
||||
#warning "Note: Auto-assigned V_CS_PIN to an unused En_CS_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_V_MS1
|
||||
#warning "Note: Auto-assigned V_MS1_PIN to an unused En_MS1_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_V_MS2
|
||||
#warning "Note: Auto-assigned V_MS2_PIN to an unused En_MS2_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_V_MS3
|
||||
#warning "Note: Auto-assigned V_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_V_DIAG
|
||||
#if V_USE_ENDSTOP == _XMIN_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _XMAX_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _YMIN_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _YMAX_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _ZMIN_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _ZMAX_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _XDIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _YDIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _ZDIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E0DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E1DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E2DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E3DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E4DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E5DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E6DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif V_USE_ENDSTOP == _E7DIAG_
|
||||
#warning "Note: Auto-assigned V_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_W_STEPPER
|
||||
#warning "Note: Auto-assigned W STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_W_CS
|
||||
#warning "Note: Auto-assigned W_CS_PIN to an unused En_CS_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_W_MS1
|
||||
#warning "Note: Auto-assigned W_MS1_PIN to an unused En_MS1_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_W_MS2
|
||||
#warning "Note: Auto-assigned W_MS2_PIN to an unused En_MS2_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_W_MS3
|
||||
#warning "Note: Auto-assigned W_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#if AUTO_ASSIGNED_W_DIAG
|
||||
#if W_USE_ENDSTOP == _XMIN_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _XMAX_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _YMIN_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _YMAX_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _ZMIN_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _ZMAX_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _XDIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _YDIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _ZDIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E0DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E1DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E2DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E3DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E4DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E5DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E6DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#elif W_USE_ENDSTOP == _E7DIAG_
|
||||
#warning "Note: Auto-assigned W_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(CHAMBER_FAN) && !defined(CHAMBER_FAN_INDEX)
|
||||
#warning "Note: Auto-assigned CHAMBER_FAN_INDEX to the first free FAN pin. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user