File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ BME280::BME280( void )
47
47
settings.tempOverSample = 1 ;
48
48
settings.pressOverSample = 1 ;
49
49
settings.humidOverSample = 1 ;
50
- settings.tempCorrection = 0.0 ; // correction of temperature - added to the result
50
+ settings.tempCorrection = 0 .f ; // correction of temperature - added to the result
51
51
}
52
52
53
53
@@ -453,6 +453,11 @@ float BME280::readFloatHumidity( void )
453
453
//
454
454
// ****************************************************************************//
455
455
456
+ void BME280::setTemperatureCorrection (float corr)
457
+ {
458
+ settings.tempCorrection = corr;
459
+ }
460
+
456
461
float BME280::readTempC ( void )
457
462
{
458
463
// Returns temperature in DegC, resolution is 0.01 DegC. Output value of “5123” equals 51.23 DegC.
Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ class BME280
223
223
224
224
float readFloatHumidity ( void );
225
225
226
- // Temperature related methods
226
+ // Temperature related methods
227
+ void setTemperatureCorrection (float corr);
227
228
float readTempC ( void );
228
229
float readTempF ( void );
229
230
@@ -258,4 +259,4 @@ class BME280
258
259
float _referencePressure = 101325.0 ; // Default but is changeable
259
260
};
260
261
261
- #endif // End of __BME280_H__ definition check
262
+ #endif // End of __BME280_H__ definition check
You can’t perform that action at this time.
0 commit comments