Skip to content

Commit 04874e5

Browse files
committed
🩹 Fixup USE_Z_MIN conditions
Do not define USE_Z_MIN or HAS_Z_MIN_STATE when using USE_PROBE_FOR_Z_HOMING and not Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN.
1 parent c476e62 commit 04874e5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Marlin/src/inc/Conditionals_post.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@
19921992
#define HAS_Y_STATE 1
19931993
#endif
19941994

1995-
#if _USE_STOP(Z,,MIN,ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
1995+
#if _USE_STOP(Z,,MIN,ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) && !(ENABLED(USE_PROBE_FOR_Z_HOMING) && DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
19961996
#define USE_Z_MIN 1
19971997
#endif
19981998
#if _USE_STOP(Z,,MAX,)

Marlin/src/inc/SanityCheck.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2384,8 +2384,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
23842384
#error "Y_MIN_PIN, Y_STOP_PIN, or Y_SPI_SENSORLESS is required for Y axis homing."
23852385
#elif Y_HOME_TO_MAX && !HAS_Y_MAX_STATE
23862386
#error "Y_MAX_PIN, Y_STOP_PIN, or Y_SPI_SENSORLESS is required for Y axis homing."
2387-
#elif Z_HOME_TO_MIN && !HAS_Z_MIN_STATE
2388-
#error "Z_MIN_PIN, Z_STOP_PIN, or Z_SPI_SENSORLESS is required for Z axis homing."
2387+
#elif Z_HOME_TO_MIN && !(HAS_Z_MIN_STATE || ENABLED(USE_PROBE_FOR_Z_HOMING))
2388+
#error "Z_MIN_PIN, Z_STOP_PIN, Z_SPI_SENSORLESS, or USE_PROBE_FOR_Z_HOMING is required for Z axis homing."
23892389
#elif Z_HOME_TO_MAX && !HAS_Z_MAX_STATE
23902390
#error "Z_MAX_PIN, Z_STOP_PIN, or Z_SPI_SENSORLESS is required for Z axis homing."
23912391
#elif I_HOME_TO_MIN && !HAS_I_MIN_STATE

0 commit comments

Comments
 (0)