[Simulator] Add ability to update .otx files. (#4422)

* [SimulatorInterface] Add ability to read eeprom data back from simulator instance.

* [Simulator] If started with .otx file, Simulator will now update (or create) the file upon exit using current radio/model data; Consolidate internal startup and shutdown code for handling various data sources.
This commit is contained in:
Max Paperno
2017-02-07 22:15:18 +01:00
committed by Bertrand Songis
parent 2589e35ad5
commit 3a026a80f2
8 changed files with 103 additions and 63 deletions
@@ -116,6 +116,13 @@ void OpenTxSimulator::stop()
StopEepromThread();
}
void OpenTxSimulator::readEepromData(QByteArray & dest)
{
#if defined(EEPROM_SIZE)
memcpy(dest.data(), eeprom, std::min<int>(EEPROM_SIZE, dest.size()));
#endif
}
void OpenTxSimulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT