Browse Source

Some more constants.

klaute 1 year ago
parent
commit
e869f03c2c
2 changed files with 4 additions and 2 deletions
  1. 2
    0
      firmware/config.h
  2. 2
    2
      firmware/firmware.ino

+ 2
- 0
firmware/config.h View File

@@ -14,6 +14,8 @@
14 14
 #define BAT_CHARGE_STATE_CHARGED     2.0
15 15
 #define BAT_CHARGE_STATE_CHARGING    1.0
16 16
 #define BAT_CHARGE_STATE_NOTCHARGING 0.0
17
+#define ENERGY_SAVE_MODE_ENABLED     1.0
18
+#define ENERGY_SAVE_MODE_DISABLED    0.0
17 19
 
18 20
 #define WIFI_AUTOCONNECT_TIMEOUT_S       120
19 21
 #define WIFI_CONFIG_PORTAL_TIMEOUT_S     120

+ 2
- 2
firmware/firmware.ino View File

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

Loading…
Cancel
Save