Added user specific humidity/light calculation factor constants.

This commit is contained in:
klaute 2019-02-03 14:53:08 +01:00
parent b850263675
commit b4284ccb3c
2 changed files with 7 additions and 3 deletions

View file

@ -11,6 +11,9 @@
//#define WEBUPDATER_FEATURE //#define WEBUPDATER_FEATURE
#define BATTERY_POWERED #define BATTERY_POWERED
const float HUMIDITY_FACTOR = 1.0
const float LIGHT_FACTOR = 1.0
// InfluxDB credentials // InfluxDB credentials
const char *INFLUXDB_HOST = "hostname"; const char *INFLUXDB_HOST = "hostname";
const uint16_t INFLUXDB_PORT = 80; const uint16_t INFLUXDB_PORT = 80;

View file

@ -14,7 +14,7 @@ float fetchPressure() {
} }
float fetchHumidity() { float fetchHumidity() {
return bme.readHumidity(); return bme.readHumidity() * HUMIDITY_FACTOR;
} }
float fetchLight() { float fetchLight() {
@ -28,7 +28,7 @@ float fetchLight() {
apds.getColorData(&red, &green, &blue, &white); apds.getColorData(&red, &green, &blue, &white);
//calculate lux //calculate lux
lux = apds.calculateLux(red, green, blue); lux = apds.calculateLux(red, green, blue);
return lux; return lux * LIGHT_FACTOR;
} }
void _anemometerInterrupt() { void _anemometerInterrupt() {
@ -74,4 +74,5 @@ float isBatCharging() {
return BAT_CHARGE_STATE_NOTCHARGING; return BAT_CHARGE_STATE_NOTCHARGING;
} }
#endif #endif