improve fault handling
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user