Just realized a new way to use the fifo to avoid duplicated data.
Instead of routing all the data to the fifo, I will route just gyro.x – so 2 bytes.
Then, when polling the mpu:
1. request the fifo size
2. if == to the old fifo size, return. No new data available
3. read all data from the fifo and discard it.
4. read data from the registers instead of the fifo
This has the advantage of not relying on a certain packet structure in the fifo and is immune to fifo overflow issues.
I will test it on sunday and see how it works.