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

@ -7,7 +7,7 @@
#include "inputs.h"
#define MAX_DN18B20_SENSORS 4U
#define ONE_WIRE_LOOPS 2U // try to read the 1-Wire sensors that often
#define ONE_WIRE_LOOPS 4U // try to read the 1-Wire sensors that often
#define PERIODIC_INTERVAL 1U // read and compute the inputs every 1sec
static const char *TAG = "smart-oil-heater-control-system-inputs";
@ -163,6 +163,7 @@ void taskInput(void *pvParameters)
if (ds18x20_measure_and_read_multi(uDS18B20Pin, uOneWireAddresses, sSensorCount, fDS18B20Temps) != ESP_OK)
{
ESP_LOGE(TAG, "1-Wire devices read error");
vTaskDelay(PERIODIC_INTERVAL * 100U / portTICK_PERIOD_MS); //Wait 100ms if bus error occurred
}
else
{