Skip to content

Commit

Permalink
Tweak some SPI_ENDSTOPS code
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 12, 2021
1 parent 6e7dff8 commit b206fd0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,8 @@ void idle(bool no_stepper_sleep/*=false*/) {

// Run StallGuard endstop checks
#if ENABLED(SPI_ENDSTOPS)
if (endstops.tmc_spi_homing.any
&& TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period))
) LOOP_L_N(i, 4) // Read SGT 4 times per idle loop
if (endstops.tmc_spi_homing_check()) break;
if (endstops.tmc_spi_homing.any && TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period)))
LOOP_L_N(i, 4) if (endstops.tmc_spi_homing_check()) break; // Read SGT 4 times per idle loop
#endif

// Handle SD Card insert / remove
Expand Down

0 comments on commit b206fd0

Please sign in to comment.