mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-03 22:48:28 -04:00
AP_Arming: fix memory leak logging files at startup
This commit is contained in:
parent
2af5c51ac7
commit
ee7e652367
@ -1362,27 +1362,6 @@ bool AP_Arming::arm(AP_Arming::Method method, const bool do_arming_checks)
|
|||||||
armed = false;
|
armed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAL_LOGGER_FILE_CONTENTS_ENABLED
|
|
||||||
/*
|
|
||||||
log files useful for diagnostics on arming. We log on arming as
|
|
||||||
with LOG_DISARMED we don't want to log the statistics at boot or
|
|
||||||
we wouldn't get a realistic idea of key system values
|
|
||||||
Note that some of these files may not exist, in that case they
|
|
||||||
are ignored
|
|
||||||
*/
|
|
||||||
static const char *log_content_filenames[] = {
|
|
||||||
"@SYS/uarts.txt",
|
|
||||||
"@SYS/dma.txt",
|
|
||||||
"@SYS/memory.txt",
|
|
||||||
"@SYS/threads.txt",
|
|
||||||
"@ROMFS/hwdef.dat",
|
|
||||||
"@SYS/storage.bin",
|
|
||||||
"@SYS/crash_dump.bin",
|
|
||||||
};
|
|
||||||
for (const auto *name : log_content_filenames) {
|
|
||||||
AP::logger().log_file_content(name);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return armed;
|
return armed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user