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 )
4747	settings.tempOverSample  = 1 ;
4848	settings.pressOverSample  = 1 ;
4949	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
5151}
5252
5353
@@ -453,6 +453,11 @@ float BME280::readFloatHumidity( void )
453453// 
454454// ****************************************************************************//
455455
456+ void  BME280::setTemperatureCorrection (float  corr)
457+ {
458+ 	settings.tempCorrection  = corr;
459+ }
460+ 
456461float  BME280::readTempC ( void  )
457462{
458463	//  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
223223
224224	float  readFloatHumidity ( void  );
225225
226- 	// Temperature related methods
226+     // Temperature related methods
227+     void  setTemperatureCorrection (float  corr);
227228    float  readTempC ( void  );
228229    float  readTempF ( void  );
229230
@@ -258,4 +259,4 @@ class BME280
258259	float  _referencePressure = 101325.0 ; // Default but is changeable
259260};
260261
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