ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.87k stars 17.33k forks source link

Two external compass are detected when using external ICM-20948 #7029

Closed caomuqing closed 7 years ago

caomuqing commented 7 years ago

Issue details

When using ICM20948 as external compass on i2c bus, both compass 1 and compass 2 will be detected as external, where the COMPASS1 is detected as ICM20948, while COMPASS2 detected as AK09916.

Possible reason: the 20948 has a built-in AK09916, and its enabling bus-pass-thru.

Version

Arduplane 3.8.2 beta, but it should be applicable to all types of firmware

Platform

[ ] All [ ] AntennaTracker [x] Copter [x] Plane [x] Rover [ ] Submarine

Hardware type HERE GNSS (with ICM20948 as external compass) on a PIXHAWK2

tridge commented 7 years ago

we need to add code to detect that we already have an AK09916 on the same bus and skip the 2nd probe

caomuqing commented 7 years ago

The commit has been tested to work.

amilcarlucas commented 7 years ago

Looks like it has been fixed. I'll close it now