1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

👷 !ELAPSED => PENDING

This commit is contained in:
Scott Lahteine 2024-08-16 14:34:05 -05:00
parent 2d609487ac
commit 793a851d10
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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;