mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 17:37:35 +08:00
8e3517fae0
Instead of always starting with instance 0 (potentially an internal mag), first take the current sensor as reference to compare the other ones against it. The issue is that otherwise we can end up in a situation where a switch occurs because the currently used sensor isn't much better than a sensor with a lower index: because the selected one isn't much better, we cannot "fail-over" to it and get stuck on another sensor, triggering a fail-over.