Browse Source

Fix endstop when no interrupt (#12158)

pull/1/head
Giuliano Zaro 6 years ago
committed by Scott Lahteine
parent
commit
aa9202260d
  1. 20
      Marlin/src/module/endstops.cpp

20
Marlin/src/module/endstops.cpp

@ -278,17 +278,15 @@ void Endstops::enable(const bool onoff) {
void Endstops::not_homing() { void Endstops::not_homing() {
enabled = enabled_globally; enabled = enabled_globally;
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) // Still 'enabled'? Then endstops are always on and kept in sync.
// Still 'enabled'? Then endstops are always on and kept in sync. // Otherwise reset 'live's variables to let axes move in both directions.
// Otherwise reset 'live's variables to let axes move in both directions. if (!enabled) {
if (!enabled) { #if ENDSTOP_NOISE_THRESHOLD
#if ENDSTOP_NOISE_THRESHOLD endstop_poll_count = 0; // Stop filtering (MUST be done first to prevent race condition)
endstop_poll_count = 0; // Stop filtering (MUST be done first to prevent race condition) validated_live_state = 0;
validated_live_state = 0; #endif
#endif live_state = 0;
live_state = 0; }
}
#endif
} }
#if ENABLED(VALIDATE_HOMING_ENDSTOPS) #if ENABLED(VALIDATE_HOMING_ENDSTOPS)

Loading…
Cancel
Save