• Andreas Müller's avatar
    Correct integer types in BMP085 driver (#3070) · 95fc8b14
    Andreas Müller authored
    * BMP085 pressure sensor: fix temperature value data type
    
    the data type for t (U_T) should be long according to the BMP085
    datasheet (rev. 1.2, section 3.5). values over 32767 can indeed occur,
    and in my case lead to a wrong value for the temperature (and
    consequently also pressure).
    
    note: this problem only occurs above a certain temperature (exact
    value depends on the calibration, but I assume somewhere around 26°C).
    
    * BMP085 pressure sensor: adapt data types and calculation
    
    this adapts the data types and calculation to be consistent with the
    datasheet (rev. 1.2, section 3.5). while I did not notice any issues,
    using the wrong data types could trigger edge cases.
    95fc8b14
bmp085.c 4.92 KB