From 793a851d10365832da15bac30243aeea5c8ab6e0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Aug 2024 14:34:05 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20!ELAPSED=20=3D>=20PENDING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- Marlin/src/module/temperature.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 1ffc372e58..4a4d0a599e 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1336,7 +1336,7 @@ void eachMomentUpdate() { #endif } - if (!PENDING(ms, next_rts_update_ms)) { + if (ELAPSED(ms, next_rts_update_ms)) { next_rts_update_ms = ms + DWIN_UPDATE_INTERVAL; if ((isPrinting() != hmiFlag.printing_flag) && !hmiFlag.home_flag) { diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 0070fa2eea..0290b50dd0 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1150,7 +1150,7 @@ volatile bool Temperature::raw_temps_ready = false; if (ELAPSED(curr_time_ms, next_test_ms)) { hotend.soft_pwm_amount = (int)get_pid_output_hotend(e) >> 1; - if (ELAPSED(curr_time_ms, settle_end_ms) && !ELAPSED(curr_time_ms, test_end_ms) && TERN1(HAS_FAN, !fan0_done)) + if (ELAPSED(curr_time_ms, settle_end_ms) && PENDING(curr_time_ms, test_end_ms) && TERN1(HAS_FAN, !fan0_done)) total_energy_fan0 += mpc.heater_power * hotend.soft_pwm_amount / 127 * MPC_dT + (last_temp - current_temp) * mpc.block_heat_capacity; #if HAS_FAN else if (ELAPSED(curr_time_ms, test_end_ms) && !fan0_done) { @@ -1160,7 +1160,7 @@ volatile bool Temperature::raw_temps_ready = false; test_end_ms = settle_end_ms + test_duration; fan0_done = true; } - else if (ELAPSED(curr_time_ms, settle_end_ms) && !ELAPSED(curr_time_ms, test_end_ms)) + else if (ELAPSED(curr_time_ms, settle_end_ms) && PENDING(curr_time_ms, test_end_ms)) total_energy_fan255 += mpc.heater_power * hotend.soft_pwm_amount / 127 * MPC_dT + (last_temp - current_temp) * mpc.block_heat_capacity; #endif else if (ELAPSED(curr_time_ms, test_end_ms)) break;