wpilibsuite / wpilib-ws-robot-romi

10 stars 15 forks source link

feature: Use IMU FIFO #108

Closed zhiquanyeo closed 3 years ago

zhiquanyeo commented 3 years ago

This PR switches over to using the LSM6 FIFO feature (instead of reading on an interval). This (should) allow for better angle measurements due to a known time period between values.

Theory of Operation:

This allows the (slower) I2C reading mechanism to be run as quickly as possible, while the (faster) processing mechanism can poll at it's own rate, but still have accurate measurements.

With this change, performing a calibration on the IMU will temporarily pause readings on the robot side.