AP_Filesystem: add @SYS/memory.txt

Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
This commit is contained in:
Andy Piper 2021-01-28 17:38:42 +00:00 committed by Peter Barker
parent 0eff201016
commit cfac268f13
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@ static const SysFileList sysfs_file_list[] = {
{"threads.txt"}, {"threads.txt"},
{"tasks.txt"}, {"tasks.txt"},
{"dma.txt"}, {"dma.txt"},
{"memory.txt"},
#if HAL_MAX_CAN_PROTOCOL_DRIVERS #if HAL_MAX_CAN_PROTOCOL_DRIVERS
{"can_log.txt"}, {"can_log.txt"},
{"can0_stats.txt"}, {"can0_stats.txt"},
@ -94,6 +95,9 @@ int AP_Filesystem_Sys::open(const char *fname, int flags)
if (strcmp(fname, "dma.txt") == 0) { if (strcmp(fname, "dma.txt") == 0) {
hal.util->dma_info(*r.str); hal.util->dma_info(*r.str);
} }
if (strcmp(fname, "memory.txt") == 0) {
hal.util->mem_info(*r.str);
}
#if HAL_MAX_CAN_PROTOCOL_DRIVERS #if HAL_MAX_CAN_PROTOCOL_DRIVERS
int8_t can_stats_num = -1; int8_t can_stats_num = -1;
if (strcmp(fname, "can_log.txt") == 0) { if (strcmp(fname, "can_log.txt") == 0) {