File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +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
51
}
51
52
52
53
@@ -482,7 +483,7 @@ float BME280::readTempC( void )
482
483
t_fine = var1 + var2;
483
484
float output = (t_fine * 5 + 128 ) >> 8 ;
484
485
485
- output = output / 100 ;
486
+ output = output / 100 + settings. tempCorrection ;
486
487
487
488
return output;
488
489
}
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ struct SensorSettings
128
128
uint8_t tempOverSample;
129
129
uint8_t pressOverSample;
130
130
uint8_t humidOverSample;
131
+ float tempCorrection; // correction of temperature - added to the result
131
132
};
132
133
133
134
// Used to hold the calibration constants. These are used
You can’t perform that action at this time.
0 commit comments