Browse Source

Fixed apds9960 read call.

klaute 8 months ago
parent
commit
f9ee9740ae

+ 2
- 2
firmware/firmware.ino View File

@@ -85,7 +85,7 @@ void setup() {
85 85
 
86 86
 #ifdef SENSOR_APDS9960
87 87
   if (sensor_apds9960_begin()) {
88
-    sensors[SENSOR_LIGHT] = &apds9930_light;
88
+    sensors[SENSOR_LIGHT] = &apds9960_light;
89 89
   }
90 90
 #endif
91 91
 
@@ -232,4 +232,4 @@ void logToSerial(float sensorValues[]) {
232 232
   Serial.println("Bat Voltage: " + String(sensorValues[SENSOR_BAT_VOLTAGE]) + " V");
233 233
   Serial.println("Bat charge state: " + String(sensorValues[SENSOR_BATCHARGESTATE]));
234 234
   Serial.println("Energy saving: " + String(sensorValues[SENSOR_ESAVEMODE]));
235
-}
235
+}

+ 1
- 1
firmware/sensor_apds9930.ino View File

@@ -20,4 +20,4 @@ float apds9930_light() {
20 20
   } else {
21 21
     return 0;
22 22
   }
23
-}
23
+}

+ 2
- 2
firmware/sensor_battery.ino View File

@@ -1,4 +1,4 @@
1
-float _sensor_battery_saveMode = nan("no battery");
1
+float _sensor_battery_saveMode = ENERGY_SAVE_MODE_DISABLED;
2 2
 uint16_t energySavingIterations = 0;
3 3
 
4 4
 // Copied from https://arduinodiy.wordpress.com/2016/12/25/monitoring-lipo-battery-voltage-with-wemos-d1-minibattery-shield-and-thingspeak/
@@ -45,4 +45,4 @@ int energySavingMode() {
45 45
 
46 46
 float isEnergySavingMode() {
47 47
   return _sensor_battery_saveMode;
48
-}
48
+}

+ 2
- 2
firmware/sensor_bme280.ino View File

@@ -6,7 +6,7 @@ Adafruit_BME280 _sensor_bme280;
6 6
 bool sensor_bme280_begin(uint8_t addr) {
7 7
   bool status = _sensor_bme280.begin(addr);
8 8
   if (status) {
9
-    debug("BME280 Connected!");
9
+    debug("BME280 Connected");
10 10
   } else {
11 11
     debug("Could not find a valid BME280 sensor, check wiring!");
12 12
   }
@@ -21,4 +21,4 @@ float bme280_pressure() {
21 21
 }
22 22
 float bme280_humidity() {
23 23
   return _sensor_bme280.readHumidity() * HUMIDITY_FACTOR;
24
-}
24
+}

Loading…
Cancel
Save