From 4073db363bdf3c98f6fd2974a21e73bf1bebd8cd Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 18 Aug 2020 18:34:09 +0200 Subject: [PATCH 1/3] undef USE_MAG_* when no USE_MAG --- src/main/target/common_post.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index ffa0202582..c268184d05 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -58,6 +58,16 @@ #endif #endif +#if !defined(USE_MAG) +#undef USE_MAG_DATA_READY_SIGNAL +#undef USE_MAG_HMC5883 +#undef USE_MAG_SPI_HMC5883 +#undef USE_MAG_QMC5883 +#undef USE_MAG_LIS3MDL +#undef USE_MAG_AK8963 +#undef USE_MAG_SPI_AK8963 +#endif + #if !defined(USE_BARO) && !defined(USE_GPS) #undef USE_VARIO #endif From 3e81cdf96f7355d18c281bc544c2c44a9e60cc2f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 18 Aug 2020 18:30:59 +0200 Subject: [PATCH 2/3] undef USE_SDCARD_* when no USE_SDCARD --- src/main/target/common_post.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index c268184d05..1282e7664c 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -202,6 +202,11 @@ #undef USE_USB_MSC #endif +#if !defined(USE_SDCARD) +#undef USE_SDCARD_SDIO +#undef USE_SDCARD_SPI +#endif + #if !defined(USE_VCP) #undef USE_USB_CDC_HID #undef USE_USB_MSC From 88f2fdcf7db35d8c4036e6ea072f139c38dc3433 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 18 Aug 2020 18:46:59 +0200 Subject: [PATCH 3/3] prevent unused warning when using USE_QUAD_MIXER_ONLY --- src/main/cli/cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 375ce78acd..7405931c4b 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -1776,6 +1776,7 @@ static void printMotorMix(dumpFlags_t dumpMask, const motorMixer_t *customMotorM static void cliMotorMix(const char *cmdName, char *cmdline) { #ifdef USE_QUAD_MIXER_ONLY + UNUSED(cmdName); UNUSED(cmdline); #else int check = 0;