AP_HAL_SITL: use a separate eeprom.bin for SITL build

This resolves a problem in autotest where the eeprom.bin gets wiped out
when we run Replay against a log as part of test.Copter.Replay
This commit is contained in:
Peter Barker 2020-11-30 13:48:20 +11:00 committed by Peter Barker
parent d780e66cc4
commit 035e798b23
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,6 @@
#include "Storage.h"
#include <AP_Vehicle/AP_Vehicle_Type.h>
#include <AP_HAL/AP_HAL.h>
#include <assert.h>
@ -5,10 +8,16 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "Storage.h"
#include <stdio.h>
#ifndef HAL_STORAGE_FILE
#if APM_BUILD_TYPE(APM_BUILD_Replay)
#define HAL_STORAGE_FILE "eeprom-replay.bin"
#else
#define HAL_STORAGE_FILE "eeprom.bin"
#endif
#endif
using namespace HALSITL;
extern const AP_HAL::HAL& hal;

View File

@ -5,10 +5,6 @@
#include "AP_HAL_SITL_Namespace.h"
#include <AP_FlashStorage/AP_FlashStorage.h>
#ifndef HAL_STORAGE_FILE
#define HAL_STORAGE_FILE "eeprom.bin"
#endif
// define which storage system to use. This allows us to test flash storage with --sitl-flash-storage
// configure option
#ifndef STORAGE_USE_FLASH