From 44bfbda40d82cfd1d0b081b6473ee778f65b53df Mon Sep 17 00:00:00 2001 From: J Blackman Date: Fri, 10 Mar 2023 06:37:43 +1100 Subject: [PATCH] FIX: If local config applied, do not include all drivers. (#12483) --- src/main/target/common_pre.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/target/common_pre.h b/src/main/target/common_pre.h index 3990a853b5..ca62d8a08b 100644 --- a/src/main/target/common_pre.h +++ b/src/main/target/common_pre.h @@ -71,6 +71,9 @@ // all the settings for classic build #if !defined(CLOUD_BUILD) && !defined(SITL) +// if no board config is provided, include all drivers +#if !defined(USE_CONFIG) + #define USE_MAG #if !defined(USE_BARO) && !defined(USE_FAKE_BARO) @@ -117,7 +120,7 @@ #define USE_GYRO_MPU6050 #define USE_ACCGYRO_BMI160 #endif -#endif +#endif // ACC GYRO inclusion #if !defined(USE_FLASH_CHIP) @@ -141,7 +144,7 @@ #endif // USE_FLASH #endif // USE_FLASH_CHIP -#ifndef USE_MAX7456 +#if !defined(USE_MAX7456) #define USE_MAX7456 #endif @@ -158,6 +161,8 @@ #define USE_SDCARD #endif +#endif // !defined(USE_CONFIG) + #if defined(STM32F405) || defined(STM32F745) || defined(STM32H7) #define USE_VTX_RTC6705 #define USE_VTX_RTC6705_SOFTSPI