Browse Source

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>
gps-1.3.1
Shiv Tyagi 3 years ago committed by Peter Barker
parent
commit
af950e266b
  1. 4
      libraries/AP_HAL_SITL/SITL_cmdline.cpp
  2. 1
      libraries/AP_HAL_SITL/SPIDevice.cpp

4
libraries/AP_HAL_SITL/SITL_cmdline.cpp

@ -8,7 +8,6 @@ @@ -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[]) @@ -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);
}

1
libraries/AP_HAL_SITL/SPIDevice.cpp

@ -120,6 +120,7 @@ static const struct SPIDriverInfo { @@ -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>

Loading…
Cancel
Save