BMI323_SensorAPI icon indicating copy to clipboard operation
BMI323_SensorAPI copied to clipboard

check_data_index should check <= not <

Open AustinJ755 opened this issue 1 year ago • 0 comments

In check_data_index there is the following check

    if ((data_index + fifo_index) < fifo->length)
    {
        rslt = BMI3_OK;
    }

This should have the following condition instead (data_index + fifo_index) < fifo->length. If data_index+fifo_index==fifo->length that just means that we will read all the data in the fifo not that we are going to overrun it.

AustinJ755 avatar Oct 29 '24 18:10 AustinJ755