02-10-2021 12:34 AM
In the file bme680.c on lines 1212 to 1215, we can read:
rslt = null_ptr_check(dev);
do {
if (rslt == BME680_OK) {
rslt = bme680_get_regs(((uint8_t) (BME680_FIELD0_ADDR)), buff, (uint16_t) BME680_FIELD_LENGTH,
The issue is that the variable "rslt" is not altered further down the loop, so when there is an error the first time, "rslt" will be different than BME680_OK, so the "if" on line 1214 will always be false, and the bme680_get_regs function will never be called again.
So at the end, this code will always try a maximum of 1 time.
Thank you.
JL, Clarity IoT
Solved! Go to Solution.
02-12-2021 01:25 AM
Hello jrlmexieux,
Our intention is when there is error and get return value not "OK", then we don't recusively read data.
Instead, we exist and return the error value. Then, customers can check what error value they have.
I think it's not bug.
Thanks,