From 36ba7548428bbb2121f7c58df1cf4bca4e8def69 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 8 Feb 2018 20:34:56 -0600 Subject: [PATCH] More reliable PROBING_HEATERS_OFF with BED_LIMIT_SWITCHING --- Marlin/temperature.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 485c7f0807..227bc8d000 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -738,6 +738,10 @@ float Temperature::get_pid_output(const int8_t e) { */ void Temperature::manage_heater() { + #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + static bool last_pause_state; + #endif + if (!temp_meas_ready) return; updateTemperaturesFromRawValues(); // also resets the watchdog @@ -814,8 +818,15 @@ void Temperature::manage_heater() { #endif // WATCH_THE_BED #if DISABLED(PIDTEMPBED) - if (PENDING(ms, next_bed_check_ms)) return; + if (PENDING(ms, next_bed_check_ms) + #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + && paused == last_pause_state + #endif + ) return; next_bed_check_ms = ms + BED_CHECK_INTERVAL; + #if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING) + last_pause_state = paused; + #endif #endif #if HAS_TEMP_BED