From 1cd31b32caed45b588167eaed5b199a5108baa70 Mon Sep 17 00:00:00 2001 From: GMagician Date: Fri, 19 Oct 2018 19:33:35 +0200 Subject: [PATCH] [2.0.x] Fix endstop when no interrupt #11900 fix is needed also when interrupt endstop are disabled --- Marlin/src/module/endstops.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 3ac7aef31a08..7049edb07ca1 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -278,17 +278,15 @@ void Endstops::enable(const bool onoff) { void Endstops::not_homing() { enabled = enabled_globally; - #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) - // Still 'enabled'? Then endstops are always on and kept in sync. - // Otherwise reset 'live's variables to let axes move in both directions. - if (!enabled) { - #if ENDSTOP_NOISE_THRESHOLD - endstop_poll_count = 0; // Stop filtering (MUST be done first to prevent race condition) - validated_live_state = 0; - #endif - live_state = 0; - } - #endif + // Still 'enabled'? Then endstops are always on and kept in sync. + // Otherwise reset 'live's variables to let axes move in both directions. + if (!enabled) { + #if ENDSTOP_NOISE_THRESHOLD + endstop_poll_count = 0; // Stop filtering (MUST be done first to prevent race condition) + validated_live_state = 0; + #endif + live_state = 0; + } } #if ENABLED(VALIDATE_HOMING_ENDSTOPS)