Some accelerometers (e.g. ADXL343) support reading raw acceleration in e.g. both integer and floating point format, and for this reason it may make sense to impl the raw acceleration trait repeatedly for different vector types (which the adxl343 crate presently does).
However, for normalized acceleration, this doesn't make sense and the impls could potentially conflict as the type system has no generic parameters to resolve which trait impl to use.
This commit splits the Accelerometer trait into a separate RawAccelerometer trait providing something closer to the previous API which can be impl'd many times for different types of raw readings.
Some accelerometers (e.g. ADXL343) support reading raw acceleration in e.g. both integer and floating point format, and for this reason it may make sense to impl the raw acceleration trait repeatedly for different vector types (which the
adxl343
crate presently does).However, for normalized acceleration, this doesn't make sense and the impls could potentially conflict as the type system has no generic parameters to resolve which trait impl to use.
This commit splits the
Accelerometer
trait into a separateRawAccelerometer
trait providing something closer to the previous API which can be impl'd many times for different types of raw readings.