mirror of https://github.com/ArduPilot/ardupilot
AP_FileSystem_Sys: allow sending stats via mavftp on AP_Periph
This commit is contained in:
parent
e8c4b99a99
commit
6b64cfd6c1
|
@ -38,6 +38,8 @@ static const SysFileList sysfs_file_list[] = {
|
||||||
{"uarts.txt"},
|
{"uarts.txt"},
|
||||||
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
||||||
{"can_log.txt"},
|
{"can_log.txt"},
|
||||||
|
#endif
|
||||||
|
#if HAL_NUM_CAN_IFACES > 0
|
||||||
{"can0_stats.txt"},
|
{"can0_stats.txt"},
|
||||||
{"can1_stats.txt"},
|
{"can1_stats.txt"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,10 +107,13 @@ int AP_Filesystem_Sys::open(const char *fname, int flags)
|
||||||
hal.util->uart_info(*r.str);
|
hal.util->uart_info(*r.str);
|
||||||
}
|
}
|
||||||
#if HAL_CANMANAGER_ENABLED
|
#if HAL_CANMANAGER_ENABLED
|
||||||
int8_t can_stats_num = -1;
|
|
||||||
if (strcmp(fname, "can_log.txt") == 0) {
|
if (strcmp(fname, "can_log.txt") == 0) {
|
||||||
AP::can().log_retrieve(*r.str);
|
AP::can().log_retrieve(*r.str);
|
||||||
} else if (strcmp(fname, "can0_stats.txt") == 0) {
|
}
|
||||||
|
#endif
|
||||||
|
#if HAL_NUM_CAN_IFACES > 0
|
||||||
|
int8_t can_stats_num = -1;
|
||||||
|
if (strcmp(fname, "can0_stats.txt") == 0) {
|
||||||
can_stats_num = 0;
|
can_stats_num = 0;
|
||||||
} else if (strcmp(fname, "can1_stats.txt") == 0) {
|
} else if (strcmp(fname, "can1_stats.txt") == 0) {
|
||||||
can_stats_num = 1;
|
can_stats_num = 1;
|
||||||
|
|
Loading…
Reference in New Issue