Explorar el Código

Limit the rate manage_heater() as it did previously

Avoid running the user-level error handlers too fast.
Yuri D'Elia hace 2 años
padre
commit
283d5566f1
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      Firmware/temperature.cpp

+ 6 - 2
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)