From 283d5566f14eca280005ad21c5d13686a8e98ce4 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Wed, 25 May 2022 19:44:41 +0200 Subject: [PATCH] Limit the rate manage_heater() as it did previously Avoid running the user-level error handlers too fast. --- Firmware/temperature.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index d2cb7ddde..40b10f2dc 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -485,9 +485,13 @@ void manage_heater() wdt_reset(); #endif //WATCHDOG + // limit execution to the same rate as temp_mgr (low-level fault handling is already handled - + // any remaining error handling is just user-facing and can wait one extra cycle) + if(!temp_meas_ready) + return; + // syncronize temperatures with isr - if(temp_meas_ready) - updateTemperatures(); + updateTemperatures(); // handle temperature errors if(temp_error_state.v)