mirror of https://github.com/ArduPilot/ardupilot
AP_Logger: disable HAL_LOGGING_BLOCK_ENABLED if not HAL_LOGGING_ENABLED
HAL_LOGGING_DATAFLASH_ENABLED is set unconditionally in some hwdefs, but we still need to honour HAL_LOGGING_ENABLED
This commit is contained in:
parent
0e6543f0e4
commit
580199dfba
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "AP_Logger_config.h"
|
#include "AP_Logger_config.h"
|
||||||
|
|
||||||
#if HAL_LOGGING_DATAFLASH_ENABLED
|
#if HAL_LOGGING_FLASH_JEDEC_ENABLED
|
||||||
|
|
||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
|
|
||||||
|
@ -323,4 +323,4 @@ void AP_Logger_Flash_JEDEC::WriteEnable(void)
|
||||||
dev->transfer(&b, 1, nullptr, 0);
|
dev->transfer(&b, 1, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAL_LOGGING_DATAFLASH_ENABLED
|
#endif // HAL_LOGGING_FLASH_JEDEC_ENABLED
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "AP_Logger_Block.h"
|
#include "AP_Logger_Block.h"
|
||||||
|
|
||||||
#if HAL_LOGGING_DATAFLASH_ENABLED
|
#if HAL_LOGGING_FLASH_JEDEC_ENABLED
|
||||||
|
|
||||||
class AP_Logger_Flash_JEDEC : public AP_Logger_Block {
|
class AP_Logger_Flash_JEDEC : public AP_Logger_Block {
|
||||||
public:
|
public:
|
||||||
|
@ -46,4 +46,4 @@ private:
|
||||||
bool read_cache_valid;
|
bool read_cache_valid;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HAL_LOGGING_DATAFLASH_ENABLED
|
#endif // HAL_LOGGING_FLASH_JEDEC_ENABLED
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "AP_Logger_W25NXX.h"
|
#include "AP_Logger_W25NXX.h"
|
||||||
|
|
||||||
#if HAL_LOGGING_DATAFLASH_ENABLED
|
#if HAL_LOGGING_FLASH_W25NXX_ENABLED
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -341,4 +341,4 @@ void AP_Logger_W25NXX::WriteEnable(void)
|
||||||
dev->transfer(&b, 1, nullptr, 0);
|
dev->transfer(&b, 1, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAL_LOGGING_DATAFLASH_ENABLED
|
#endif // HAL_LOGGING_FLASH_W25NXX_ENABLED
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "AP_Logger_config.h"
|
||||||
|
|
||||||
|
#if HAL_LOGGING_FLASH_W25NXX_ENABLED
|
||||||
|
|
||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
|
|
||||||
#include "AP_Logger_Block.h"
|
#include "AP_Logger_Block.h"
|
||||||
|
|
||||||
#if HAL_LOGGING_DATAFLASH_ENABLED
|
|
||||||
|
|
||||||
class AP_Logger_W25NXX : public AP_Logger_Block {
|
class AP_Logger_W25NXX : public AP_Logger_Block {
|
||||||
public:
|
public:
|
||||||
AP_Logger_W25NXX(AP_Logger &front, LoggerMessageWriter_DFLogStart *writer) :
|
AP_Logger_W25NXX(AP_Logger &front, LoggerMessageWriter_DFLogStart *writer) :
|
||||||
|
@ -47,4 +49,4 @@ private:
|
||||||
bool read_cache_valid;
|
bool read_cache_valid;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HAL_LOGGING_DATAFLASH_ENABLED
|
#endif // HAL_LOGGING_FLASH_W25NXX_ENABLED
|
||||||
|
|
|
@ -26,11 +26,19 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAL_LOGGING_DATAFLASH_ENABLED
|
#if HAL_LOGGING_DATAFLASH_ENABLED
|
||||||
#define HAL_LOGGING_BLOCK_ENABLED 1
|
#define HAL_LOGGING_BLOCK_ENABLED HAL_LOGGING_ENABLED
|
||||||
#else
|
#else
|
||||||
#define HAL_LOGGING_BLOCK_ENABLED 0
|
#define HAL_LOGGING_BLOCK_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAL_LOGGING_FLASH_W25NXX_ENABLED
|
||||||
|
#define HAL_LOGGING_FLASH_W25NXX_ENABLED HAL_LOGGING_BLOCK_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAL_LOGGING_FLASH_JEDEC_ENABLED
|
||||||
|
#define HAL_LOGGING_FLASH_JEDEC_ENABLED HAL_LOGGING_BLOCK_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAL_LOGGING_FILESYSTEM_ENABLED
|
#if HAL_LOGGING_FILESYSTEM_ENABLED
|
||||||
|
|
||||||
#if !defined (HAL_BOARD_LOG_DIRECTORY)
|
#if !defined (HAL_BOARD_LOG_DIRECTORY)
|
||||||
|
|
Loading…
Reference in New Issue