From f9ee9740ae865d92b311f66975d705e97f4f490e Mon Sep 17 00:00:00 2001 From: klaute Date: Tue, 18 Feb 2020 20:06:03 +0100 Subject: [PATCH] Fixed apds9960 read call. --- firmware/firmware.ino | 4 ++-- firmware/sensor_apds9930.ino | 2 +- firmware/sensor_battery.ino | 4 ++-- firmware/sensor_bme280.ino | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 firmware/firmware.ino mode change 100644 => 100755 firmware/sensor_apds9930.ino mode change 100644 => 100755 firmware/sensor_battery.ino mode change 100644 => 100755 firmware/sensor_bme280.ino diff --git a/firmware/firmware.ino b/firmware/firmware.ino old mode 100644 new mode 100755 index 0cb005e..ff52e6a --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -85,7 +85,7 @@ void setup() { #ifdef SENSOR_APDS9960 if (sensor_apds9960_begin()) { - sensors[SENSOR_LIGHT] = &apds9930_light; + sensors[SENSOR_LIGHT] = &apds9960_light; } #endif @@ -232,4 +232,4 @@ void logToSerial(float sensorValues[]) { Serial.println("Bat Voltage: " + String(sensorValues[SENSOR_BAT_VOLTAGE]) + " V"); Serial.println("Bat charge state: " + String(sensorValues[SENSOR_BATCHARGESTATE])); Serial.println("Energy saving: " + String(sensorValues[SENSOR_ESAVEMODE])); -} +} diff --git a/firmware/sensor_apds9930.ino b/firmware/sensor_apds9930.ino old mode 100644 new mode 100755 index 0917dd5..9a81c36 --- a/firmware/sensor_apds9930.ino +++ b/firmware/sensor_apds9930.ino @@ -20,4 +20,4 @@ float apds9930_light() { } else { return 0; } -} +} diff --git a/firmware/sensor_battery.ino b/firmware/sensor_battery.ino old mode 100644 new mode 100755 index 593be35..5d41d81 --- a/firmware/sensor_battery.ino +++ b/firmware/sensor_battery.ino @@ -1,4 +1,4 @@ -float _sensor_battery_saveMode = nan("no battery"); +float _sensor_battery_saveMode = ENERGY_SAVE_MODE_DISABLED; uint16_t energySavingIterations = 0; // 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() { float isEnergySavingMode() { return _sensor_battery_saveMode; -} +} diff --git a/firmware/sensor_bme280.ino b/firmware/sensor_bme280.ino old mode 100644 new mode 100755 index f288ead..5510f79 --- a/firmware/sensor_bme280.ino +++ b/firmware/sensor_bme280.ino @@ -6,7 +6,7 @@ Adafruit_BME280 _sensor_bme280; bool sensor_bme280_begin(uint8_t addr) { bool status = _sensor_bme280.begin(addr); if (status) { - debug("BME280 Connected!"); + debug("BME280 Connected"); } else { debug("Could not find a valid BME280 sensor, check wiring!"); } @@ -21,4 +21,4 @@ float bme280_pressure() { } float bme280_humidity() { return _sensor_bme280.readHumidity() * HUMIDITY_FACTOR; -} +}