From 5eac0f6449bb1dda7f3204a9100bbca7b11b9d29 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Wed, 5 Jun 2024 18:18:14 +0200 Subject: [PATCH] fix STEPTEST macro to restore homing with dual Z endstops This macro builds a string starting with "HAS_" but "HAS_" was replaced with "USE_" in Marlin 2.1.2.2. Backport the upstream patch should restore correct endstop polling and fix the bad homing behavior. Fixes: #523 --- Marlin/src/module/stepper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 171fb7e2ee..9d30e3a479 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -274,7 +274,7 @@ xyze_int8_t Stepper::count_direction{0}; #define MINDIR(A) (count_direction[_AXIS(A)] < 0) #define MAXDIR(A) (count_direction[_AXIS(A)] > 0) -#define STEPTEST(A,M,I) TERN0(HAS_ ##A## ##I## _ ##M, !(TEST(endstops.state(), A## ##I## _ ##M) && M## DIR(A)) && !locked_ ##A## ##I## _motor) +#define STEPTEST(A,M,I) TERN0(USE_##A##I##_##M, !(TEST(endstops.state(), A##I##_##M) && M## DIR(A)) && !locked_ ##A##I##_motor) #define DUAL_ENDSTOP_APPLY_STEP(A,V) \ if (separate_multi_axis) { \