File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 4545 * Pre-processor Definitions
4646 ****************************************************************************/
4747
48- /* Only float data type supported now */
49-
50- #ifdef CONFIG_SENSORS_USE_B16
51- # error fixed-point data type not supported yet
52- #endif
53-
5448#ifdef CONFIG_BMP280_I2C_ADDR_76
5549#define BMP280_ADDR 0x76
5650#else
@@ -665,8 +659,8 @@ static int bmp280_fetch(FAR struct sensor_lowerhalf_s *lower,
665659 clock_systime_timespec (& ts );
666660
667661 baro_data .timestamp = 1000000ull * ts .tv_sec + ts .tv_nsec / 1000 ;
668- baro_data .pressure = press / 100.0f ;
669- baro_data .temperature = temp / 100.0f ;
662+ baro_data .pressure = sensor_data_divi ( press , 100 ) ;
663+ baro_data .temperature = sensor_data_divi ( temp , 100 ) ;
670664
671665 memcpy (buffer , & baro_data , sizeof (baro_data ));
672666
You can’t perform that action at this time.
0 commit comments