diff --git a/Sensatio_FW_ESP8266.cpp b/Sensatio_FW_ESP8266.cpp index a73705b..8396945 100644 --- a/Sensatio_FW_ESP8266.cpp +++ b/Sensatio_FW_ESP8266.cpp @@ -11,6 +11,7 @@ SOURCE: https://github.com/sensate-io/firmware-esp8266.git @section HISTORY + v45 - Fixed Pressure Measurement for BME280 Sensors v44 - More Memory Improvements v43 - Fixed data transmit issues in configurations with many sensors v42 - Fixed low memory issues in configurations with many sensors and a ST7735 Bug @@ -34,7 +35,7 @@ VisualisationHelper* vHelper; Display* display = NULL; -int currentVersion = 44; +int currentVersion = 45; boolean printMemory = false; //String board = "Generic"; diff --git a/src/input/i2c/SensorBMx280.cpp b/src/input/i2c/SensorBMx280.cpp index bad0338..c2f6c38 100644 --- a/src/input/i2c/SensorBMx280.cpp +++ b/src/input/i2c/SensorBMx280.cpp @@ -11,6 +11,7 @@ SOURCE: https://github.com/sensate-io/firmware-esp8266.git @section HISTORY + v45 - Fixed Pressure Measurement for BME280 Sensors v33 - Changes for Digital Sensor Switch Support v32 - Added MQTT Support! v29 - First Public Release @@ -98,13 +99,13 @@ Data* SensorBMx280::read(bool shouldPostData) } else if(_calculation->getValueType()=="pressure") { - float pressure = bme->pres() / 100.0F; + float pressure = bme->pres(BME280::PresUnit_hPa); shouldPostData = smartSensorCheck(pressure, _smartValueThreshold, shouldPostData); return _calculation->calculate(this, pressure, shouldPostData); } else if(_calculation->getValueType()=="altitude") { - float pressure = bme->pres() / 100.0F; + float pressure = bme->pres(BME280::PresUnit_hPa); shouldPostData = smartSensorCheck(pressure, _smartValueThreshold, shouldPostData); return _calculation->calculate(this, pressure, shouldPostData); } diff --git a/src/input/i2c/SensorBMx280.h b/src/input/i2c/SensorBMx280.h index 310d3d4..232399a 100644 --- a/src/input/i2c/SensorBMx280.h +++ b/src/input/i2c/SensorBMx280.h @@ -11,6 +11,8 @@ SOURCE: https://github.com/sensate-io/firmware-esp8266.git @section HISTORY + v45 - Fixed Pressure Measurement for BME280 Sensors + v33 - Changes for Digital Sensor Switch Support v32 - Added MQTT Support! v29 - First Public Release */ @@ -38,4 +40,4 @@ class SensorBMx280 : public Sensor { SensorBMx280 (long, String, String, String, String, int, int, float, SensorCalculation*); }; -#endif \ No newline at end of file +#endif