Fix SPI_ENDSTOPS compile error (#14906)

This commit is contained in:
Giuliano Zaro 2019-08-10 00:00:20 +02:00 committed by Scott Lahteine
parent 2971b48a12
commit a7f1021265

View file

@ -661,9 +661,14 @@ void idle(
) { ) {
#if ENABLED(SPI_ENDSTOPS) #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 for (uint8_t i = 4; i--;) // Read SGT 4 times per idle loop
if (endstops.tmc_spi_homing_check()) break; if (endstops.tmc_spi_homing_check()) break;
}
#endif #endif
#if ENABLED(MAX7219_DEBUG) #if ENABLED(MAX7219_DEBUG)