improve fault handling

This commit is contained in:
2024-12-25 18:09:04 +01:00
parent 2717f4a8e6
commit c50f36d8a9
3 changed files with 19 additions and 13 deletions

View File

@ -62,6 +62,14 @@ void taskControl(void *pvParameters)
{
ESP_LOGW(TAG, "Control not possible due to safety fault!");
sControlState = CONTROL_FAULT_SAFETY;
if (bHeatingInAction == true)
{
ESP_LOGI(TAG, "Control not possible due to safety fault: Disable burner");
bHeatingInAction = false;
setCirculationPumpState(ENABLED);
setBurnerState(DISABLED);
setSafetyControlState(ENABLED);
}
continue;
}
@ -69,6 +77,14 @@ void taskControl(void *pvParameters)
{
ESP_LOGW(TAG, "Control not possible due to sntp fault!");
sControlState = CONTROL_FAULT_SNTP;
if (bHeatingInAction == true)
{
ESP_LOGI(TAG, "Control not possible due to sntp fault: Disable burner");
bHeatingInAction = false;
setCirculationPumpState(ENABLED);
setBurnerState(DISABLED);
setSafetyControlState(ENABLED);
}
continue;
}