AP_Arming: log key @SYS files on arming

This commit is contained in:
Andrew Tridgell 2021-10-28 17:32:10 +11:00
parent 0be1017843
commit 50f9d2601f
1 changed files with 19 additions and 0 deletions

View File

@ -1348,6 +1348,25 @@ bool AP_Arming::arm(AP_Arming::Method method, const bool do_arming_checks)
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",
};
for (const auto *name : log_content_filenames) {
AP::logger().log_file_content(name);
}
#endif
return armed;
}