AP_Logger: check HAL_LOGGING_DATAFLASH only for definition

As the hwdefs only define the symbol, don't set it to a value...
This commit is contained in:
Peter Barker 2021-01-07 16:29:55 +11:00 committed by Peter Barker
parent 7d42f473fc
commit 416dd98140
1 changed files with 2 additions and 6 deletions

View File

@ -5,13 +5,9 @@
#include <AP_Filesystem/AP_Filesystem_Available.h>
#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