HAL_Linux: cope with non-root for Replay

This commit is contained in:
Andrew Tridgell 2016-05-03 13:22:03 +10:00
parent 640a04a1ee
commit 2965e67d5d

View File

@ -9,6 +9,7 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <AP_Vehicle/AP_Vehicle_Type.h>
#include "Storage.h" #include "Storage.h"
using namespace Linux; using namespace Linux;
@ -22,6 +23,8 @@ using namespace Linux;
// card for ArduCopter and ArduPlane // card for ArduCopter and ArduPlane
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
#define STORAGE_DIR "/data/ftp/internal_000/APM" #define STORAGE_DIR "/data/ftp/internal_000/APM"
#elif APM_BUILD_TYPE(APM_BUILD_Replay)
#define STORAGE_DIR "."
#else #else
#define STORAGE_DIR "/var/APM" #define STORAGE_DIR "/var/APM"
#endif #endif