From a7f10212659118201ec3fa97d1fd39db95dc2df4 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat, 10 Aug 2019 00:00:20 +0200 Subject: [PATCH] Fix SPI_ENDSTOPS compile error (#14906) --- Marlin/src/Marlin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 993dd2652..d6285225c 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -661,9 +661,14 @@ void idle( ) { #if ENABLED(SPI_ENDSTOPS) - if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period)) + if (endstops.tmc_spi_homing.any + #if ENABLED(IMPROVE_HOMING_RELIABILITY) + && ELAPSED(millis(), sg_guard_period) + #endif + ) { for (uint8_t i = 4; i--;) // Read SGT 4 times per idle loop if (endstops.tmc_spi_homing_check()) break; + } #endif #if ENABLED(MAX7219_DEBUG)