Fixing ifdef logic
This commit is contained in:
parent
dfc2d277d1
commit
b0ec86890d
1 changed files with 7 additions and 4 deletions
11
firmware/firmware.ino
Executable file → Normal file
11
firmware/firmware.ino
Executable file → Normal file
|
@ -238,15 +238,18 @@ void _loop() {
|
|||
currentSensorData[SENSOR_BAT_VOLTAGE] = 0xFFFFFFFF;
|
||||
currentSensorData[SENSOR_BATCHARGESTATE] = 0xFFFFFFFF;
|
||||
#endif
|
||||
#ifdef BATTERY_POWERED
|
||||
// Disable expensive tasks
|
||||
if (energySavingMode() == 0) {
|
||||
#endif
|
||||
currentSensorData[SENSOR_WINDSPEED] = fetchWindspeed();
|
||||
currentSensorData[SENSOR_ESAVEMODE] = ENERGY_SAVE_MODE_DISABLED;
|
||||
#ifdef BATTERY_POWERED
|
||||
} else {
|
||||
currentSensorData[SENSOR_WINDSPEED] = 0xFFFFFFFF;
|
||||
currentSensorData[SENSOR_ESAVEMODE] = ENERGY_SAVE_MODE_ENABLED;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
Serial.println("");
|
||||
//Serial.println("Current readings:");
|
||||
|
@ -265,12 +268,12 @@ void _loop() {
|
|||
pushToInfluxDB(DEVICE_NAME, currentSensorData);
|
||||
|
||||
#ifdef WEBUPDATER_FEATURE
|
||||
#ifndef BATTERY_POWERED
|
||||
setSensorData(DEVICE_NAME, localIP, currentSensorData);
|
||||
}
|
||||
#endif
|
||||
#ifndef BATTERY_POWERED
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
//*************************************************************************//
|
||||
//*************************************************************************//
|
||||
|
|
Loading…
Reference in a new issue