Merge pull request #9544 from thinkyhead/bf2_reliable_probe_heaters_off

[2.0.x] More reliable PROBING_HEATERS_OFF with BED_LIMIT_SWITCHING
This commit is contained in:
Scott Lahteine 2018-02-09 07:12:29 -06:00 committed by GitHub
commit 9be6aa3f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -744,6 +744,10 @@ float Temperature::get_pid_output(const int8_t e) {
*/ */
void Temperature::manage_heater() { void Temperature::manage_heater() {
#if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING)
static bool last_pause_state;
#endif
if (!temp_meas_ready) return; if (!temp_meas_ready) return;
updateTemperaturesFromRawValues(); // also resets the watchdog updateTemperaturesFromRawValues(); // also resets the watchdog
@ -820,8 +824,15 @@ void Temperature::manage_heater() {
#endif // WATCH_THE_BED #endif // WATCH_THE_BED
#if DISABLED(PIDTEMPBED) #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; next_bed_check_ms = ms + BED_CHECK_INTERVAL;
#if ENABLED(PROBING_HEATERS_OFF) && ENABLED(BED_LIMIT_SWITCHING)
last_pause_state = paused;
#endif
#endif #endif
#if HAS_TEMP_BED #if HAS_TEMP_BED