File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ BME280::BME280( void )
4747 settings.tempOverSample = 1 ;
4848 settings.pressOverSample = 1 ;
4949 settings.humidOverSample = 1 ;
50+ settings.tempCorrection = 0.0 ; // correction of temperature - added to the result
5051}
5152
5253
@@ -482,7 +483,7 @@ float BME280::readTempC( void )
482483 t_fine = var1 + var2;
483484 float output = (t_fine * 5 + 128 ) >> 8 ;
484485
485- output = output / 100 ;
486+ output = output / 100 + settings. tempCorrection ;
486487
487488 return output;
488489}
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ struct SensorSettings
128128 uint8_t tempOverSample;
129129 uint8_t pressOverSample;
130130 uint8_t humidOverSample;
131+ float tempCorrection; // correction of temperature - added to the result
131132};
132133
133134// Used to hold the calibration constants. These are used
You can’t perform that action at this time.
0 commit comments