From 14b5c8a6c4e43b100f34af9ed663dddfd09b1968 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Thu, 21 Dec 2017 18:02:20 +0100 Subject: [PATCH] AP_Baro: don't include vehicle specific baro by default --- libraries/AP_Baro/AP_Baro.cpp | 4 ++++ libraries/AP_Baro/AP_Baro_QURT.cpp | 6 +++--- libraries/AP_Baro/AP_Baro_QURT.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Baro/AP_Baro.cpp b/libraries/AP_Baro/AP_Baro.cpp index 70f0b58f9a..7a5c0c08a9 100644 --- a/libraries/AP_Baro/AP_Baro.cpp +++ b/libraries/AP_Baro/AP_Baro.cpp @@ -35,8 +35,12 @@ #include "AP_Baro_KellerLD.h" #include "AP_Baro_MS5611.h" #include "AP_Baro_LPS25H.h" +#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT #include "AP_Baro_qflight.h" +#endif +#if CONFIG_HAL_BOARD == HAL_BOARD_QURT #include "AP_Baro_QURT.h" +#endif #if HAL_WITH_UAVCAN #include "AP_Baro_UAVCAN.h" #endif diff --git a/libraries/AP_Baro/AP_Baro_QURT.cpp b/libraries/AP_Baro/AP_Baro_QURT.cpp index 1e957158d1..37ffd5800e 100644 --- a/libraries/AP_Baro/AP_Baro_QURT.cpp +++ b/libraries/AP_Baro/AP_Baro_QURT.cpp @@ -12,12 +12,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "AP_Baro_QURT.h" - -#include #include #if CONFIG_HAL_BOARD == HAL_BOARD_QURT +#include "AP_Baro_QURT.h" + +#include extern const AP_HAL::HAL &hal; diff --git a/libraries/AP_Baro/AP_Baro_QURT.h b/libraries/AP_Baro/AP_Baro_QURT.h index e016cf7afe..7c2fd7167a 100644 --- a/libraries/AP_Baro/AP_Baro_QURT.h +++ b/libraries/AP_Baro/AP_Baro_QURT.h @@ -1,9 +1,9 @@ #pragma once #include "AP_Baro_Backend.h" -#include #if CONFIG_HAL_BOARD == HAL_BOARD_QURT +#include extern "C" { #include "bmp280_api.h" }