Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indexing for multiple-call extraction of accelerometer data #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akandi
Copy link

@akandi akandi commented Nov 3, 2021

bmi2_extract_accel only produces correct results when all of the accelerometer samples contained in the FIFO buffer are read in one call. (I am running it in headerless mode)

Obviously, a workaround is to just call bmi2_extract_accel with a large enough buffer to fetch all the samples at once. But the existence of fields like acc_byte_start_idx in the bmi2_fifo_frame indicate to me that the library is intended to support multiple partial extraction of sensor data from the FIFO.

Equivalent changes may need to be applied to gyr, aux and for header mode.

bmi2_extract_accel only produces correct results when all of the accelerometer samples contained in the FIFO buffer are read in one call. (I am running it in headerless mode)

Obviously, a workaround is to just call bmi2_extract_accel with a large enough buffer to fetch all the samples at once. But the existence of fields like acc_byte_start_idx in the bmi2_fifo_frame indicate to me that the library is intended to support multiple partial extraction of sensor data from the FIFO.

Equivalent changes may need to be applied to gyr, aux and for header mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant