From dd0a7a551ba3e4d0834a2e60c4b1aa203fb783a6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 3 Jan 2024 11:41:04 +1100 Subject: [PATCH] AP_AHRS: do not compile AP_AHRS.cpp if AP_AHRS_ENABLED is 0 on Periph we end up not having a default backend, which is a compilation failure --- libraries/AP_AHRS/AP_AHRS.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_AHRS/AP_AHRS.cpp b/libraries/AP_AHRS/AP_AHRS.cpp index 61255e7b06..93591c2026 100644 --- a/libraries/AP_AHRS/AP_AHRS.cpp +++ b/libraries/AP_AHRS/AP_AHRS.cpp @@ -18,6 +18,11 @@ * ArduPilot * */ + +#include "AP_AHRS_config.h" + +#if AP_AHRS_ENABLED + #include #include "AP_AHRS.h" #include "AP_AHRS_View.h" @@ -3544,3 +3549,5 @@ AP_AHRS &ahrs() } } + +#endif // AP_AHRS_ENABLED