Skip to content

fifo data alignment #39

@muiseac

Description

@muiseac

Version

No response

Describe the bug

When reading from fifo the library doesn't ensure the read data is properly aligned. this causes an issue when the data gets shifted and the read values don't properly reflect that, so it ends up setting each axis to a wrong value. I think this can be fixed by ensuring the number of samples we read is multiples of the packet size we have
if(count%packet_size !=0) count = count - count%packet_size;
where packet_size depends on the configuration (6 bytes in case of accelerometer only + 2 bytes for each gyro axis if configured).
Also the library assumes fixed fifo configuration (both accel and gyro), which is not always the case.

this might not be a bug but just the way it was intended to work.

Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions