Skip to content

Commit 39471a5

Browse files
committed
Use Z_MIN_PROBE convenience enum
1 parent 62641bb commit 39471a5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Marlin/src/module/endstops.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ void Endstops::update() {
519519

520520
#if ENABLED(G38_PROBE_TARGET)
521521
// For G38 moves check the probe's pin for ALL movement
522-
if (G38_move) UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN));
522+
if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
523523
#endif
524524

525525
// With Dual X, endstops are only checked in the homing direction for the active extruder
@@ -624,8 +624,7 @@ void Endstops::update() {
624624

625625
#if HAS_BED_PROBE
626626
// When closing the gap check the enabled probe
627-
if (probe_switch_activated())
628-
UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN));
627+
if (probe_switch_activated()) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
629628
#endif
630629

631630
#if HAS_Z_MAX && !Z_SPI_SENSORLESS
@@ -913,7 +912,7 @@ void Endstops::update() {
913912

914913
#if ENABLED(G38_PROBE_TARGET)
915914
// For G38 moves check the probe's pin for ALL movement
916-
if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) {
915+
if (G38_move && TEST_ENDSTOP(Z_MIN_PROBE) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) {
917916
G38_did_trigger = true;
918917
#define _G38_SET(Q) | (stepper.axis_is_moving(_AXIS(Q)) << _AXIS(Q))
919918
#define _G38_RESP(Q) if (moving[_AXIS(Q)]) { _ENDSTOP_HIT(Q, ENDSTOP); planner.endstop_triggered(_AXIS(Q)); }

0 commit comments

Comments
 (0)