Skip to content

Commit

Permalink
Merge pull request #91 from danbaker-projects/danbaker-projects-patch-1
Browse files Browse the repository at this point in the history
Fix incorrect float return value from getTemperatureCompensation()
  • Loading branch information
ladyada authored May 17, 2021
2 parents 987e4a5 + 6d76cd2 commit b234cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Adafruit_BME280.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ uint32_t Adafruit_BME280::sensorID(void) { return _sensorID; }
* @returns the current temperature compensation value in degrees Celcius
*/
float Adafruit_BME280::getTemperatureCompensation(void) {
return float(((t_fine_adjust * 5) >> 8) / 100);
return float((t_fine_adjust * 5) >> 8) / 100.0;
};

/*!
Expand Down

0 comments on commit b234cc9

Please sign in to comment.