mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
DataFlash_File: Support custom_log_directory
This commit is contained in:
parent
2e7a4aa1e6
commit
c06abeb02e
@ -98,6 +98,11 @@ void DataFlash_File::Init(const struct LogStructure *structure, uint8_t num_type
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* custom_dir = hal.util->get_custom_log_directory();
|
||||
if (custom_dir != NULL){
|
||||
_log_directory = custom_dir;
|
||||
}
|
||||
|
||||
ret = stat(_log_directory, &st);
|
||||
if (ret == -1) {
|
||||
ret = mkdir(_log_directory, 0777);
|
||||
|
Loading…
Reference in New Issue
Block a user