Skip to content

Commit

Permalink
Fixed Pressure Measurement for BME280 Sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel-Sensate committed Aug 6, 2021
1 parent 18c8778 commit 9749aa2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Sensatio_FW_ESP8266.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,7 +35,7 @@
VisualisationHelper* vHelper;
Display* display = NULL;

int currentVersion = 44;
int currentVersion = 45;
boolean printMemory = false;

//String board = "Generic";
Expand Down
5 changes: 3 additions & 2 deletions src/input/i2c/SensorBMx280.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion src/input/i2c/SensorBMx280.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -38,4 +40,4 @@ class SensorBMx280 : public Sensor {
SensorBMx280 (long, String, String, String, String, int, int, float, SensorCalculation*);
};

#endif
#endif

0 comments on commit 9749aa2

Please sign in to comment.