diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 27eb1f09798c..02af062eca68 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -913,7 +913,7 @@ void Endstops::update() { #if ENABLED(G38_PROBE_TARGET) // For G38 moves check the probe's pin for ALL movement - if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) { + if (G38_move && TEST_ENDSTOP(Z_MIN_PROBE) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) { G38_did_trigger = true; #define _G38_SET(Q) | (stepper.axis_is_moving(_AXIS(Q)) << _AXIS(Q)) #define _G38_RESP(Q) if (moving[_AXIS(Q)]) { _ENDSTOP_HIT(Q, ENDSTOP); planner.endstop_triggered(_AXIS(Q)); } diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index 76c8d454d7b8..e0c0de39a176 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -96,7 +96,7 @@ enum EndstopEnum : char { #endif #endif #if HAS_Z_MIN || HAS_Z_MAX || HOMING_Z_WITH_PROBE - , Z_ENDSTOP = TERN(Z_HOME_TO_MAX, Z_MAX, TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, Z_MIN)) + , Z_ENDSTOP = TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, TERN(Z_HOME_TO_MAX, Z_MAX, Z_MIN)) #endif #if HAS_I_MIN || HAS_I_MAX , I_ENDSTOP = TERN(I_HOME_TO_MAX, I_MAX, I_MIN)