Limit the rate manage_heater() as it did previously

Avoid running the user-level error handlers too fast.
This commit is contained in:
Yuri D'Elia 2022-05-25 19:44:41 +02:00
parent de77a47906
commit 283d5566f1

View File

@ -485,8 +485,12 @@ 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();
// handle temperature errors