feature/http_call_send_json #3
2 changed files with 7 additions and 3 deletions
|
@ -450,7 +450,7 @@ void _fsm_loop()
|
|||
#ifdef INFLUXDB_FEATURE
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ void setSensorData(float sensorValues[])
|
|||
|
||||
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
|
||||
}
|
||||
|
@ -88,9 +88,13 @@ void setSensorData(float sensorValues[])
|
|||
|
||||
for (uint8_t i = 0; i < VALUES; i++)
|
||||
{
|
||||
if (sensorValues[i] != nanf("no value") and (not isnan(sensorValues[i])))
|
||||
{
|
||||
// only copy real float values
|
||||
_webUpdater_sensValues[i] = sensorValues[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************//
|
||||
|
||||
|
|
Loading…
Reference in a new issue