From 262b11f0c1c452ea9dca2d399f82351fe2a5f2fe Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Sun, 18 Jun 2023 19:19:39 +0100 Subject: [PATCH] AP_Compass: stop auto replacing missing CAN by default, add option to re-enable --- libraries/AP_Compass/AP_Compass.cpp | 95 ++++++++++--------- libraries/AP_Compass/AP_Compass.h | 2 + .../AP_Compass/AP_Compass_Calibration.cpp | 2 +- 3 files changed, 52 insertions(+), 47 deletions(-) diff --git a/libraries/AP_Compass/AP_Compass.cpp b/libraries/AP_Compass/AP_Compass.cpp index 3501ebd17c..010b62428b 100644 --- a/libraries/AP_Compass/AP_Compass.cpp +++ b/libraries/AP_Compass/AP_Compass.cpp @@ -588,6 +588,7 @@ const AP_Param::GroupInfo Compass::var_info[] = { // @DisplayName: Compass options // @Description: This sets options to change the behaviour of the compass // @Bitmask: 0:CalRequireGPS + // @Bitmask: 1: Allow missing DroneCAN compasses to be automaticaly replaced (calibration still required) // @User: Advanced AP_GROUPINFO("OPTIONS", 43, Compass, _options, 0), @@ -1464,56 +1465,58 @@ void Compass::_detect_backends(void) } #if COMPASS_MAX_UNREG_DEV > 0 - // check if there's any uavcan compass in prio slot that's not found - // and replace it if there's a replacement compass - for (Priority i(0); i