Some more constants.

This commit is contained in:
klaute 2019-02-02 14:01:13 +01:00
parent 29c52d0a34
commit e869f03c2c
2 changed files with 4 additions and 2 deletions

View file

@ -14,6 +14,8 @@
#define BAT_CHARGE_STATE_CHARGED 2.0
#define BAT_CHARGE_STATE_CHARGING 1.0
#define BAT_CHARGE_STATE_NOTCHARGING 0.0
#define ENERGY_SAVE_MODE_ENABLED 1.0
#define ENERGY_SAVE_MODE_DISABLED 0.0
#define WIFI_AUTOCONNECT_TIMEOUT_S 120
#define WIFI_CONFIG_PORTAL_TIMEOUT_S 120

View file

@ -214,10 +214,10 @@ void _loop() {
// Disable expensive tasks
if (energySavingMode() == 0) {
currentSensorData[SENSOR_WINDSPEED] = fetchWindspeed();
currentSensorData[SENSOR_ESAVEMODE] = 0.0;
currentSensorData[SENSOR_ESAVEMODE] = ENERGY_SAVE_MODE_DISABLED;
} else {
currentSensorData[SENSOR_WINDSPEED] = 0xFFFFFFFF;
currentSensorData[SENSOR_ESAVEMODE] = 1.0;
currentSensorData[SENSOR_ESAVEMODE] = ENERGY_SAVE_MODE_ENABLED;
}
#ifdef DEBUG