mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
DataFlash: make log directory macro mandatory
Everybody defines the macro (or should be defining). Let smaller users that don't have a filesystem to rather protect it with HAL_OS_POSIX_IO, which also allow them to save more flash space.
This commit is contained in:
parent
591b846e2d
commit
3272ae2c04
@ -74,17 +74,15 @@ void DataFlash_Class::Init(const struct LogStructure *structures, uint8_t num_ty
|
||||
_num_types = num_types;
|
||||
_structures = structures;
|
||||
|
||||
#if defined(HAL_BOARD_LOG_DIRECTORY)
|
||||
#if HAL_OS_POSIX_IO
|
||||
if (_params.backend_types == DATAFLASH_BACKEND_FILE ||
|
||||
_params.backend_types == DATAFLASH_BACKEND_BOTH) {
|
||||
DFMessageWriter_DFLogStart *message_writer =
|
||||
new DFMessageWriter_DFLogStart(_firmware_string);
|
||||
if (message_writer != nullptr) {
|
||||
#if HAL_OS_POSIX_IO
|
||||
backends[_next_backend] = new DataFlash_File(*this,
|
||||
message_writer,
|
||||
HAL_BOARD_LOG_DIRECTORY);
|
||||
#endif
|
||||
}
|
||||
if (backends[_next_backend] == nullptr) {
|
||||
hal.console->printf("Unable to open DataFlash_File");
|
||||
|
Loading…
Reference in New Issue
Block a user