feature/http_call_send_json #3

Merged
f merged 56 commits from feature/http_call_send_json into master 2022-11-27 11:02:22 +01:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit c89486bd31 - Show all commits

View file

@ -450,7 +450,7 @@ void _fsm_loop()
#ifdef INFLUXDB_FEATURE #ifdef INFLUXDB_FEATURE
for (uint8_t i = 0; i < 5 and validData == false; i++) for (uint8_t i = 0; i < 5 and validData == false; i++)
{ {
if (currentSensorData[i] != 0) if (currentSensorData[i] != 0 and currentSensorData[i] != nanf("no value") and (not isnan(currentSensorData[i])))
{ {
validData = true; validData = true;
} }

View file

@ -80,7 +80,7 @@ void setSensorData(float sensorValues[])
for (uint8_t i = 0; i < 5 and wuValidData == false; i++) for (uint8_t i = 0; i < 5 and wuValidData == false; i++)
{ {
if (sensorValues[i] != 0) if (sensorValues[i] != 0 and sensorValues[i] != nanf("no value") and (not isnan(sensorValues[i])))
{ {
wuValidData = true; // at least one value is not zero, the data wuValidData = true; // at least one value is not zero, the data
} }
@ -88,7 +88,11 @@ void setSensorData(float sensorValues[])
for (uint8_t i = 0; i < VALUES; i++) for (uint8_t i = 0; i < VALUES; i++)
{ {
_webUpdater_sensValues[i] = sensorValues[i]; if (sensorValues[i] != nanf("no value") and (not isnan(sensorValues[i])))
{
// only copy real float values
_webUpdater_sensValues[i] = sensorValues[i];
}
} }
} }