Home Forum Software floating point temperature in bme280.cpp

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3815
    Ateyo
    Participant

    I had to replace the following line in bme280.cpp in order to evaluate the temperatur as floating point. Or did I forget a compiler/linker option?

    void BME280::readSensors(float *temperature, uint32_t *pressure, uint8_t *humidity) {
    	
    	//*temperature =  (((t_fine * 5 + 128) >> 8) / 100) ;
    	*temperature =  ((float)((t_fine * 5 + 128) >> 8) / 100) ;
    #3820
    uRADMonitor
    Keymaster

    Thanks for the fix, no compiler option but a bug originally reported by Akos. Thanks for reporting this.

    #3864

    Could this also be the case for BMP180 sensor?

    https://www.uradmonitor.com/topic/sensors-resolution/

    L.E. I’ve noticed that there is a issue opened with this on GitHub.

    #3865
    uRADMonitor
    Keymaster

    Most likely yes. Will get fixed, it’s just a very busy period atm.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.