From 416dd981409df31cbee320b8262bfdc424013ebf Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 7 Jan 2021 16:29:55 +1100 Subject: [PATCH] AP_Logger: check HAL_LOGGING_DATAFLASH only for definition As the hwdefs only define the symbol, don't set it to a value... --- libraries/AP_Logger/AP_Logger.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libraries/AP_Logger/AP_Logger.h b/libraries/AP_Logger/AP_Logger.h index 7dbbb1342f..efd15d6f2a 100644 --- a/libraries/AP_Logger/AP_Logger.h +++ b/libraries/AP_Logger/AP_Logger.h @@ -5,13 +5,9 @@ #include -#ifndef HAL_LOGGING_DATAFLASH - #define HAL_LOGGING_DATAFLASH 0 -#endif - // set default for HAL_LOGGING_DATAFLASH_ENABLED #ifndef HAL_LOGGING_DATAFLASH_ENABLED - #if HAL_LOGGING_DATAFLASH + #ifdef HAL_LOGGING_DATAFLASH #define HAL_LOGGING_DATAFLASH_ENABLED 1 #else #define HAL_LOGGING_DATAFLASH_ENABLED 0 @@ -45,7 +41,7 @@ #endif // sanity checks: -#if HAL_LOGGING_DATAFLASH && !HAL_LOGGING_DATAFLASH_ENABLED +#if defined(HAL_LOGGING_DATAFLASH) && !HAL_LOGGING_DATAFLASH_ENABLED #error Can not default to dataflash if it is not enabled #endif