mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 07:17:59 +00:00
🔧 Fix Z_MULTI_ENDSTOPS pin post-process (#27137)
This commit is contained in:
parent
320e00267d
commit
1d29a56344
@ -2466,6 +2466,51 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
|||||||
#elif Z_SPI_SENSORLESS && !(AXIS_HAS_SPI(Z2) && (NUM_Z_STEPPERS < 3 || AXIS_HAS_SPI(Z3)) && (NUM_Z_STEPPERS < 4 || AXIS_HAS_SPI(Z4)))
|
#elif Z_SPI_SENSORLESS && !(AXIS_HAS_SPI(Z2) && (NUM_Z_STEPPERS < 3 || AXIS_HAS_SPI(Z3)) && (NUM_Z_STEPPERS < 4 || AXIS_HAS_SPI(Z4)))
|
||||||
#error "All Z Stepper Drivers must be SPI-capable to use SPI Endstops on Z."
|
#error "All Z Stepper Drivers must be SPI-capable to use SPI Endstops on Z."
|
||||||
#endif
|
#endif
|
||||||
|
#if PIN_EXISTS(Z2_STOP)
|
||||||
|
#if X_HOME_TO_MIN && Z2_STOP_PIN == X_MIN_PIN
|
||||||
|
#error "Z2_STOP_PIN can't be the same as X_MIN_PIN when homing to X_MIN"
|
||||||
|
#elif X_HOME_TO_MAX && Z2_STOP_PIN == X_MAX_PIN
|
||||||
|
#error "Z2_STOP_PIN can't be the same as X_MAX_PIN when homing to X_MAX"
|
||||||
|
#elif Y_HOME_TO_MIN && Z2_STOP_PIN == Y_MIN_PIN
|
||||||
|
#error "Z2_STOP_PIN can't be the same as Y_MIN_PIN when homing to Y_MIN"
|
||||||
|
#elif Y_HOME_TO_MAX && Z2_STOP_PIN == Y_MAX_PIN
|
||||||
|
#error "Z2_STOP_PIN can't be the same as Y_MAX_PIN when homing to Y_MAX"
|
||||||
|
#elif Z_HOME_TO_MIN && Z2_STOP_PIN == Z_MIN_PIN
|
||||||
|
#error "Z2_STOP_PIN can't be the same as Z_MIN_PIN when homing to Z_MIN"
|
||||||
|
#elif Z_HOME_TO_MAX && Z2_STOP_PIN == Z_MAX_PIN
|
||||||
|
#error "Z2_STOP_PIN can't be the same as Z_MAX_PIN when homing to Z_MAX"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(Z3_STOP)
|
||||||
|
#if X_HOME_TO_MIN && Z3_STOP_PIN == X_MIN_PIN
|
||||||
|
#error "Z3_STOP_PIN can't be the same as X_MIN_PIN when homing to X_MIN"
|
||||||
|
#elif X_HOME_TO_MAX && Z3_STOP_PIN == X_MAX_PIN
|
||||||
|
#error "Z3_STOP_PIN can't be the same as X_MAX_PIN when homing to X_MAX"
|
||||||
|
#elif Y_HOME_TO_MIN && Z3_STOP_PIN == Y_MIN_PIN
|
||||||
|
#error "Z3_STOP_PIN can't be the same as Y_MIN_PIN when homing to Y_MIN"
|
||||||
|
#elif Y_HOME_TO_MAX && Z3_STOP_PIN == Y_MAX_PIN
|
||||||
|
#error "Z3_STOP_PIN can't be the same as Y_MAX_PIN when homing to Y_MAX"
|
||||||
|
#elif Z_HOME_TO_MIN && Z3_STOP_PIN == Z_MIN_PIN
|
||||||
|
#error "Z3_STOP_PIN can't be the same as Z_MIN_PIN when homing to Z_MIN"
|
||||||
|
#elif Z_HOME_TO_MAX && Z3_STOP_PIN == Z_MAX_PIN
|
||||||
|
#error "Z3_STOP_PIN can't be the same as Z_MAX_PIN when homing to Z_MAX"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(Z4_STOP)
|
||||||
|
#if X_HOME_TO_MIN && Z4_STOP_PIN == X_MIN_PIN
|
||||||
|
#error "Z4_STOP_PIN can't be the same as X_MIN_PIN when homing to X_MIN"
|
||||||
|
#elif X_HOME_TO_MAX && Z4_STOP_PIN == X_MAX_PIN
|
||||||
|
#error "Z4_STOP_PIN can't be the same as X_MAX_PIN when homing to X_MAX"
|
||||||
|
#elif Y_HOME_TO_MIN && Z4_STOP_PIN == Y_MIN_PIN
|
||||||
|
#error "Z4_STOP_PIN can't be the same as Y_MIN_PIN when homing to Y_MIN"
|
||||||
|
#elif Y_HOME_TO_MAX && Z4_STOP_PIN == Y_MAX_PIN
|
||||||
|
#error "Z4_STOP_PIN can't be the same as Y_MAX_PIN when homing to Y_MAX"
|
||||||
|
#elif Z_HOME_TO_MIN && Z4_STOP_PIN == Z_MIN_PIN
|
||||||
|
#error "Z4_STOP_PIN can't be the same as Z_MIN_PIN when homing to Z_MIN"
|
||||||
|
#elif Z_HOME_TO_MAX && Z4_STOP_PIN == Z_MAX_PIN
|
||||||
|
#error "Z4_STOP_PIN can't be the same as Z_MAX_PIN when homing to Z_MAX"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENDSTOP_NOISE_THRESHOLD) && !WITHIN(ENDSTOP_NOISE_THRESHOLD, 2, 7)
|
#if defined(ENDSTOP_NOISE_THRESHOLD) && !WITHIN(ENDSTOP_NOISE_THRESHOLD, 2, 7)
|
||||||
|
@ -556,20 +556,20 @@
|
|||||||
#elif Z_HOME_TO_MAX
|
#elif Z_HOME_TO_MAX
|
||||||
#define Z_MAX_PIN Z_STOP_PIN
|
#define Z_MAX_PIN Z_STOP_PIN
|
||||||
#endif
|
#endif
|
||||||
#elif Z_HOME_TO_MIN
|
|
||||||
#define Z_STOP_PIN Z_MIN_PIN
|
|
||||||
#elif Z_HOME_TO_MAX
|
|
||||||
#define Z_STOP_PIN Z_MAX_PIN
|
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && PIN_EXISTS(Z_STOP)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
#ifndef Z2_STOP_PIN
|
#if ((Z_HOME_TO_MIN && !defined(Z2_MIN_PIN)) || (Z_HOME_TO_MAX && !defined(Z2_MAX_PIN))) && !defined(Z2_STOP_PIN)
|
||||||
#define Z2_STOP_PIN Z_STOP_PIN
|
#error "Z2_STOP_PIN is required for Z_MULTI_ENDSTOPS. Define Z2_STOP_PIN in Configuration_adv.h."
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPERS >= 3 && !defined(Z3_STOP_PIN)
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#define Z3_STOP_PIN Z_STOP_PIN
|
#if ((Z_HOME_TO_MIN && !defined(Z3_MIN_PIN)) || (Z_HOME_TO_MAX && !defined(Z3_MAX_PIN))) && !defined(Z3_STOP_PIN)
|
||||||
|
#error "Z3_STOP_PIN is required for Z_MULTI_ENDSTOPS with NUM_Z_STEPPERS >= 3. Define Z3_STOP_PIN in Configuration_adv.h."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if NUM_Z_STEPPERS >= 4
|
||||||
|
#if ((Z_HOME_TO_MIN && !defined(Z4_MIN_PIN)) || (Z_HOME_TO_MAX && !defined(Z4_MAX_PIN))) && !defined(Z4_STOP_PIN)
|
||||||
|
#error "Z4_STOP_PIN is required for Z_MULTI_ENDSTOPS with NUM_Z_STEPPERS == 4. Define Z4_STOP_PIN in Configuration_adv.h."
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPERS >= 4 && !defined(Z4_STOP_PIN)
|
|
||||||
#define Z4_STOP_PIN Z_STOP_PIN
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,7 +25,8 @@ restore_configs
|
|||||||
opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
|
opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
|
||||||
EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
|
EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
|
||||||
Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 Z4_DRIVER_TYPE A4988 \
|
Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 Z4_DRIVER_TYPE A4988 \
|
||||||
DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }'
|
DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }' \
|
||||||
|
Z3_STOP_PIN PI7 Z4_STOP_PIN PF6
|
||||||
opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \
|
opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \
|
||||||
REPRAP_DISCOUNT_SMART_CONTROLLER PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS TC_GCODE_USE_GLOBAL_X TC_GCODE_USE_GLOBAL_Y
|
REPRAP_DISCOUNT_SMART_CONTROLLER PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS TC_GCODE_USE_GLOBAL_X TC_GCODE_USE_GLOBAL_Y
|
||||||
exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3"
|
exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3"
|
||||||
|
Loading…
Reference in New Issue
Block a user