silence error due to missing hardware

This commit is contained in:
Hendrik Schutter 2025-02-17 21:18:48 +01:00
parent a72c0673b1
commit d14ae528c0
3 changed files with 11 additions and 6 deletions

View File

@ -59,13 +59,18 @@ void taskControl(void *pvParameters)
bool bBurnerFaultDetected = false;
int64_t i64BurnerEnableTimestamp = esp_timer_get_time();
time_t now;
while (1)
{
// Get the current time
time(&now);
ESP_LOGW(TAG, "Control loop time: %lli", now);
vTaskDelay(PERIODIC_INTERVAL * 1000U / portTICK_PERIOD_MS);
if (getSafetyState() != SAFETY_NO_ERROR)
{
ESP_LOGW(TAG, "Control not possible due to safety fault!");
//ESP_LOGW(TAG, "Control not possible due to safety fault!");
sControlState = CONTROL_FAULT_SAFETY;
if (bHeatingInAction == true)
{

View File

@ -189,12 +189,12 @@ void taskInput(void *pvParameters)
if (ds18x20_scan_devices(uDS18B20Pin, uOneWireAddresses, MAX_DN18B20_SENSORS, &sSensorCount) != ESP_OK)
{
ESP_LOGE(TAG, "1-Wire device scan error!");
// ESP_LOGE(TAG, "1-Wire device scan error!");
}
if (!sSensorCount)
{
ESP_LOGW(TAG, "No 1-Wire devices detected!");
// ESP_LOGW(TAG, "No 1-Wire devices detected!");
}
else
{
@ -203,14 +203,14 @@ void taskInput(void *pvParameters)
if (sSensorCount > MAX_DN18B20_SENSORS)
{
sSensorCount = MAX_DN18B20_SENSORS;
ESP_LOGW(TAG, "More 1-Wire devices found than expected!");
// ESP_LOGW(TAG, "More 1-Wire devices found than expected!");
}
for (size_t iReadLoop = 0; iReadLoop < ONE_WIRE_LOOPS; iReadLoop++)
{
if (ds18x20_measure_and_read_multi(uDS18B20Pin, uOneWireAddresses, sSensorCount, fDS18B20Temps) != ESP_OK)
{
ESP_LOGE(TAG, "1-Wire devices read error");
// ESP_LOGE(TAG, "1-Wire devices read error");
vTaskDelay(PERIODIC_INTERVAL * 100U / portTICK_PERIOD_MS); // Wait 100ms if bus error occurred
}
else

View File

@ -85,7 +85,7 @@ void checkSensorSanity(void)
if (sCurrentMeasurement.state == MEASUREMENT_FAULT)
{
ESP_LOGE(TAG, "%s Sensor not found!", sanityChecks[i].name);
//ESP_LOGE(TAG, "%s Sensor not found!", sanityChecks[i].name);
sanityChecks[i].state = SENSOR_NOT_FOUND;
sSafetyState = SAFETY_SENSOR_ERROR;
}