I've been working on a fork of this repo that adds support for the MPU6050 and MPU6000. This means I have had to add an Interface trait implemented by I2C and SPI so that the library can work with both. However, I am unsure of how clear this is, especially since modules are either one interface or the other. As an example, let mpu6050 = Mpu9250::imu_default(i2c, delay).unwrap(); just doesn't seem very nice to me, maybe let mpu6050 = MpuX::imu_default(i2c, delay).unwrap();? The problem is that internally, there is lots of shared behaviour which would be nice not to duplicate.
What are your thoughts on this? Is it something you would like to see merged, or should I develop it as its own crate?
I've been working on a fork of this repo that adds support for the MPU6050 and MPU6000. This means I have had to add an
Interfacetrait implemented by I2C and SPI so that the library can work with both. However, I am unsure of how clear this is, especially since modules are either one interface or the other. As an example,let mpu6050 = Mpu9250::imu_default(i2c, delay).unwrap();just doesn't seem very nice to me, maybelet mpu6050 = MpuX::imu_default(i2c, delay).unwrap();? The problem is that internally, there is lots of shared behaviour which would be nice not to duplicate.What are your thoughts on this? Is it something you would like to see merged, or should I develop it as its own crate?