DriverFramework's mpu9250 is SPI-only?

Guys:

Unless I’m reading the code incorrectly, it looks like the DriverFramework version of the mpu9250 driver is written for SPI-only, while the code in src/drivers/mpu9250 appears to support both SPI and I2C.

I’m targeting the Beaglebone Blue, and using RPi as a reference. RPi uses the DriverFramework version.

The PX4 docs say that new drivers are supposed to use DriverFramework. So, should I figure out how to add I2C to src/lib/DriverFramework/drivers/mpu9250/MPU9250.cpp et. al? Or, should I just use the “old” driver even though I’m working on a “new” platform? (Right now, I don’t know how to do that either.)

Thanks!

I take that back: it tries to support both SPI and I2C, but just doesn’t quite get there.

Specifically: it contains some SPI-specific function calls, and the IMUSensor base class doesn’t have a good way of dealing with devices of both types concurrently.

That last one is going to take some head-scratching to fix…