Added a comment to descript a for loop behaviour.

This commit is contained in:
Kai Lauterbach 2022-11-04 08:41:28 +01:00
parent e699c8b37b
commit ff71dad13f

View file

@ -526,7 +526,7 @@ void _fsm_loop()
//debug("send data to influxdb if required"); //debug("send data to influxdb if required");
#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++)
{ { // only check sensor data 0 to 4 -> SENSOR_TEMPERATURE, SENSOR_HUMIDITY, SENSOR_LIGHT, SENSOR_WINDSPEED, SENSOR_PRESSURE
if (currentSensorData[i] != 0 and currentSensorData[i] != nanf("no value") and (not isnan(currentSensorData[i]))) if (currentSensorData[i] != 0 and currentSensorData[i] != nanf("no value") and (not isnan(currentSensorData[i])))
{ {
validData = true; validData = true;