diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -49,23 +49,30 @@ int main(void) // Soft timers uint32_t last_pid = 0; uint32_t last_thermostat = 0; + uint32_t last_1hz = 0; while (1) { float duty = 0.0; + if(HAL_GetTick() - last_1hz > 750) + { + display_1hz(); + last_1hz = HAL_GetTick(); + } + if(flash_getsettings()->val.control_mode == MODE_PID && (HAL_GetTick() - last_pid > PID_PERIOD)) { - runtime_status()->temp = tempsense_readtemp(); - duty = pid_process(); +// runtime_status()->temp = tempsense_readtemp(); +// duty = pid_process(); last_pid = HAL_GetTick(); } // Thermostatic control if(flash_getsettings()->val.control_mode == MODE_THERMOSTAT && HAL_GetTick() - last_thermostat > SSR_PERIOD) { - runtime_status()->temp = tempsense_readtemp(); - duty = thermostat_process(); +// runtime_status()->temp = tempsense_readtemp(); +// duty = thermostat_process(); last_thermostat = HAL_GetTick(); }