From 4da9b75c8fd8f04fa6c6488beaf79b103042e740 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Tue, 15 Jan 2019 10:08:15 -0500 Subject: [PATCH] Fix compilation errors if USE_BLACKBOX is not defined --- src/main/fc/init.c | 3 +-- src/main/target/common_post.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/fc/init.c b/src/main/fc/init.c index 5b27214fdd..36469c15d6 100644 --- a/src/main/fc/init.c +++ b/src/main/fc/init.c @@ -681,6 +681,7 @@ void init(void) flashfsInit(); #endif +#ifdef USE_BLACKBOX #ifdef USE_SDCARD if (blackboxConfig()->device == BLACKBOX_DEVICE_SDCARD) { if (sdcardConfig()->mode) { @@ -692,8 +693,6 @@ void init(void) } } #endif - -#ifdef USE_BLACKBOX blackboxInit(); #endif diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 349100e59d..3adaabaa03 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -226,6 +226,10 @@ #endif #endif +#ifndef USE_BLACKBOX +#undef USE_USB_MSC +#endif + #if (!defined(USE_FLASHFS) || !defined(USE_RTC_TIME) || !defined(USE_USB_MSC)) #undef USE_PERSISTENT_MSC_RTC #endif