AP_HAL_SITL: add dataflash to spi device table

We simulate jedec flash for logging. Hence, we need to add dataflash to device table. Also, we need to remove HAL_LOGGING_SITL_ENABLED since we no longer need it

Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
This commit is contained in:
Shiv Tyagi 2021-12-21 10:30:13 +05:30 committed by Peter Barker
parent 18e427d27d
commit af950e266b
2 changed files with 1 additions and 4 deletions

View File

@ -8,7 +8,6 @@
#include "UARTDriver.h"
#include <AP_HAL/utility/getopt_cpp.h>
#include <AP_HAL_SITL/Storage.h>
#include <AP_Logger/AP_Logger_SITL.h>
#include <AP_Param/AP_Param.h>
#include <SITL/SIM_Multicopter.h>
@ -581,9 +580,6 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
if (erase_all_storage) {
AP_Param::erase_all();
#if HAL_LOGGING_SITL_ENABLED
unlink(AP_Logger_SITL::filename);
#endif
unlink("flash.dat");
hal.set_wipe_storage(wiping_storage);
}

View File

@ -120,6 +120,7 @@ static const struct SPIDriverInfo {
// name, bus, cs_pin
SPIDesc SPIDeviceManager::device_table[] = {
{ "ramtron", 0, 0 },
{ "dataflash", 1, 0}
};
AP_HAL::OwnPtr<AP_HAL::SPIDevice>