Compare commits

..

No commits in common. "c89486bd31be5088889c20ff71bbb53a4b3640e3" and "5fcfd8965298c9e58c459b601bc42a30edd3ae93" have entirely different histories.

2 changed files with 11 additions and 12 deletions

View file

@ -110,7 +110,10 @@ void setup()
#ifdef BATTERY_POWERED
debug("battery powered");
_battery_mode_main();
do {
_battery_mode_main();
} while (fsm_state != FSM_STATE_1);
digitalWrite(STATUS_LED_PIN, LOW);
@ -125,9 +128,9 @@ void setup()
// sleep the system will run into the setup routine
ESP.deepSleep(POWERSAVING_SLEEP_S * 1000000, WAKE_RF_DEFAULT);
delay(100);
#endif
#else // not in battery mode
#ifndef BATTERY_POWERED
#ifdef ENABLE_WATCHDOG
// Enable the internal watchdog
ESP.wdtEnable(WATCHDOG_TIMEOUT_MS);
@ -450,7 +453,7 @@ void _fsm_loop()
#ifdef INFLUXDB_FEATURE
for (uint8_t i = 0; i < 5 and validData == false; i++)
{
if (currentSensorData[i] != 0 and currentSensorData[i] != nanf("no value") and (not isnan(currentSensorData[i])))
if (currentSensorData[i] != 0)
{
validData = true;
}
@ -482,7 +485,7 @@ void _fsm_loop()
//debug("wait for wind sensor finish");
fsm_state = FSM_STATE_9; // stay here until the wind measurement is done
} else {
//debug("wind sensor read finish");
debug("wind sensor read finish");
fsm_state = FSM_STATE_10;
}
#else
@ -511,7 +514,7 @@ void _fsm_loop()
//debug("wait for wind sensor finish");
fsm_state = FSM_STATE_11; // stay here until the wind measurement is done
} else {
//debug("wind sensor read finish");
debug("wind sensor read finish");
fsm_state = FSM_STATE_12;
}
#else

View file

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