mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Filesystem: add support for AP_Logger into AP_Periph
This commit is contained in:
parent
80a17cb97f
commit
c11a6bbb47
@ -43,8 +43,11 @@ static AP_Filesystem_Param fs_param;
|
||||
#include "AP_Filesystem_Sys.h"
|
||||
static AP_Filesystem_Sys fs_sys;
|
||||
|
||||
#include <AP_Mission/AP_Mission.h>
|
||||
#if HAL_MISSION_ENABLED
|
||||
#include "AP_Filesystem_Mission.h"
|
||||
static AP_Filesystem_Mission fs_mission;
|
||||
#endif
|
||||
|
||||
/*
|
||||
mapping from filesystem prefix to backend
|
||||
@ -57,7 +60,9 @@ const AP_Filesystem::Backend AP_Filesystem::backends[] = {
|
||||
{ "@PARAM/", fs_param },
|
||||
{ "@SYS/", fs_sys },
|
||||
{ "@SYS", fs_sys },
|
||||
#if HAL_MISSION_ENABLED
|
||||
{ "@MISSION/", fs_mission },
|
||||
#endif
|
||||
};
|
||||
|
||||
#define MAX_FD_PER_BACKEND 256U
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <GCS_MAVLink/MissionItemProtocol_Rally.h>
|
||||
#include <GCS_MAVLink/MissionItemProtocol_Fence.h>
|
||||
|
||||
#if HAL_MISSION_ENABLED
|
||||
|
||||
extern const AP_HAL::HAL& hal;
|
||||
extern int errno;
|
||||
|
||||
@ -397,3 +399,5 @@ bool AP_Filesystem_Mission::finish_upload(const rfile &r)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -90,9 +90,11 @@ int AP_Filesystem_Sys::open(const char *fname, int flags)
|
||||
if (strcmp(fname, "threads.txt") == 0) {
|
||||
hal.util->thread_info(*r.str);
|
||||
}
|
||||
#if HAL_SCHEDULER_ENABLED
|
||||
if (strcmp(fname, "tasks.txt") == 0) {
|
||||
AP::scheduler().task_info(*r.str);
|
||||
}
|
||||
#endif
|
||||
if (strcmp(fname, "dma.txt") == 0) {
|
||||
hal.util->dma_info(*r.str);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user