Skip to content

Commit

Permalink
compare to hit instead of open
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 19, 2023
1 parent a11d34f commit 0ffdd58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Marlin/src/module/endstops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,8 @@ void Endstops::update() {
#endif

#if HAS_G38_PROBE // TODO (DerAndere): Add support for HAS_I_AXIS
#define _G38_OPEN_STATE TERN(G38_PROBE_AWAY, (G38_move >= 4), LOW)
// 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))) != _G38_OPEN_STATE) {
if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) {
if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, TERN(X_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(X_AXIS); }
#if HAS_Y_AXIS
else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, TERN(Y_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Y_AXIS); }
Expand Down

0 comments on commit 0ffdd58

Please sign in to comment.