Skip to content

Quad i2c rework

bbartels requested to merge quad-i2c-rework into master

Problem

Currently, the I2C device specific functions are residing in the application layer. This doesn't make much sense; it would be more appropriate for these hardware level details (registers numbers and offsets) to reside in the hardware layer.

Solution

Add a few more hardware interfaces, specifically one for each of the I2C sensors we use (IMU, Lidar, Optical flow). This will make dependency injection of the I2C bus on a particular bus much easier (which will be important if we want to make a new I2C bus specifically for the optical flow sensor). As a bonus, this change also makes it much easier to implement the I2C devices in the virtual quad, and allows us to make some cool tests (like verifying that certain motors get stronger when you "tilt" the quad...).

Reviewers

@dawehr
@ericm @jpbush @phjones

Merge request reports