- Correctly sort includes and add missing AP_Math.h
- Use anonymous struct for trim_registers in _load_trim_values,
renaming its members so they don't start with underscore
- Don't change _dig* values when we failed to read from sensor
- Add some blank lines
- Make _dig_* members be inside a _dig struct
- Use constrain_int32 instead of if/else chain
- s/time_us/time_usec/
- Construct raw_field with a single constructor in _update()
- Add missing copyright notice
- Group methods together in declaration
In addition:
- bbbmini, navio and navio2 can force HMC5843 backend to
be external.
- there was a typo in the backend name that's now fixed:
AK8953 vs AK8963
Minlure has an onboard compass (HMC5883L) as slave of MPU-6000, but also
allows the use of an external HMC5883L compass, which should be
connected to the lure's I2C port.
And to the detection probe() method. That way we don't need to use a board
`#ifdef` inside the class code. Additionally, we make raspilot board use it.
Initialization was also changed a little bit so we don't try to
initialize 25 times. We rather use the same methods as in the
AP_InertialSensor drivers.
Also move up the call to is_zero() in read_raw so we don't set
_mag_[x|y|z] in case of failure.