AP_Filesystem: add @SYS/uarts.txt

This commit is contained in:
Andy Piper 2021-01-05 21:18:49 +00:00 committed by Andrew Tridgell
parent a07b238c7d
commit c388fd9214
1 changed files with 4 additions and 0 deletions

View File

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