Skip to content

Commit

Permalink
🩹 Fixup USE_Z_MIN conditions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
The-EG committed Feb 2, 2024
1 parent c476e62 commit 04874e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@
#define HAS_Y_STATE 1
#endif

#if _USE_STOP(Z,,MIN,ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
#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))
#define USE_Z_MIN 1
#endif
#if _USE_STOP(Z,,MAX,)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2384,8 +2384,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#error "Y_MIN_PIN, Y_STOP_PIN, or Y_SPI_SENSORLESS is required for Y axis homing."
#elif Y_HOME_TO_MAX && !HAS_Y_MAX_STATE
#error "Y_MAX_PIN, Y_STOP_PIN, or Y_SPI_SENSORLESS is required for Y axis homing."
#elif Z_HOME_TO_MIN && !HAS_Z_MIN_STATE
#error "Z_MIN_PIN, Z_STOP_PIN, or Z_SPI_SENSORLESS is required for Z axis homing."
#elif Z_HOME_TO_MIN && !(HAS_Z_MIN_STATE || ENABLED(USE_PROBE_FOR_Z_HOMING))
#error "Z_MIN_PIN, Z_STOP_PIN, Z_SPI_SENSORLESS, or USE_PROBE_FOR_Z_HOMING is required for Z axis homing."
#elif Z_HOME_TO_MAX && !HAS_Z_MAX_STATE
#error "Z_MAX_PIN, Z_STOP_PIN, or Z_SPI_SENSORLESS is required for Z axis homing."
#elif I_HOME_TO_MIN && !HAS_I_MIN_STATE
Expand Down

0 comments on commit 04874e5

Please sign in to comment.