Issue #515 fixed. Standalone Qt based simu added. xsimulatordialog and

simulatordialog merged
This commit is contained in:
Bertrand Songis
2014-02-14 18:34:01 +01:00
parent 0b9602a8da
commit 0d76f2461a
48 changed files with 4112 additions and 9488 deletions
@@ -132,7 +132,7 @@ uint8_t getStickMode()
using namespace Open9xSky9x;
Open9xSky9xSimulator::Open9xSky9xSimulator(Open9xInterface * open9xInterface):
Open9xSky9xSimulator::Open9xSky9xSimulator(OpenTxInterface * open9xInterface):
open9xInterface(open9xInterface)
{
QSettings settings;
@@ -162,14 +162,21 @@ bool Open9xSky9xSimulator::lcdChanged(bool & lightEnable)
#include "simulatorimport.h"
}
void Open9xSky9xSimulator::start(RadioData &radioData, bool tests)
void Open9xSky9xSimulator::start(QByteArray & eeprom, bool tests)
{
g_rotenc[0] = 0;
open9xInterface->save(&eeprom[0], radioData);
memcpy(Open9xSky9x::eeprom, eeprom.data(), std::min<int>(sizeof(Open9xSky9x::eeprom), eeprom.size()));
StartEepromThread(NULL);
StartMainThread(tests);
}
void Open9xSky9xSimulator::start(const char * filename, bool tests)
{
g_rotenc[0] = 0;
StartEepromThread(filename);
StartMainThread(tests);
}
void Open9xSky9xSimulator::stop()
{
StopMainThread();