From f2b7d44772aaf2932db2936c49228775c7bf6593 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 6 Jun 2021 10:51:03 +1000 Subject: [PATCH] AP_Compass: fixed build with AP_Periph compass --- libraries/AP_Compass/AP_Compass.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Compass/AP_Compass.cpp b/libraries/AP_Compass/AP_Compass.cpp index 2f6737f7b0..77ac477eaa 100644 --- a/libraries/AP_Compass/AP_Compass.cpp +++ b/libraries/AP_Compass/AP_Compass.cpp @@ -1440,12 +1440,14 @@ bool Compass::is_replacement_mag(uint32_t devid) { return false; } +#if COMPASS_MAX_UNREG_DEV > 0 // Check that its not an unused additional mag for (uint8_t i = 0; i 0 for (uint8_t i = 0; i