09-23-2022 10:31 PM
In
BME280_driver/examples/linux_userspace.h (on Github)
there is
/*Calculate the minimum delay required between consecutive measurement based upon the sensor enabled |
* and the oversampling configuration. */ |
req_delay = bme280_cal_meas_delay(&dev->settings); |
which is used as
/* Wait for the measurement to complete and print data */ | |
|
but in bme280.c the definition of bme280_cal_meas_delay() has the comment (my bold):
/*! |
* @brief This API is used to calculate the maximum delay in milliseconds required for the |
* temperature/pressure/humidity(which ever at enabled) measurement to complete. |
*/ |
uint32_t bme280_cal_meas_delay(const struct bme280_settings *settings) |
The comment says this returns milliseconds and you are using the result directly in delay_us() which expects microseconds.
So it seems the call to delay_us() should be
|
If the comment above is correct.
Thanks,
Tom
10-03-2022 05:17 PM
Hi Tom_in_MN,
Thank for your kindly feedback. We will check it。