sensors/bh1749nuc_uorb.c: don't wait for VALID flag in fetch interface

otherwise the sensor freezes when we read RBG and IR data one after another
This commit is contained in:
raiden00pl 2024-05-01 18:51:29 +02:00 committed by Xiang Xiao
parent 9d768498ce
commit 147b5762f0

View File

@ -221,10 +221,9 @@ static int bh1749nuc_fetch(FAR struct sensor_lowerhalf_s *lower,
goto errout;
}
/* Wait for data */
while (!(bh1749nuc_getreg8(dev, BH1749NUC_MODE_CONTROL2) &
BH1749NUC_MODE_CONTROL2_VALID));
/* Get data without wait for VALID flag - otherwise the sensor freezes
* when we read RBG and IR data one after another
*/
if (lower->type == SENSOR_TYPE_RGB)
{