Re #2260: class Profile dependency removed from simulatorinterface
This commit is contained in:
@@ -447,6 +447,8 @@ void SimulatorDialog::initUi(T * ui)
|
||||
windowName = tr("Simulating Radio (%1)").arg(GetCurrentFirmware()->getName());
|
||||
setWindowTitle(windowName);
|
||||
|
||||
simulator->setSdPath(g.profile[g.id()].sdPath());
|
||||
simulator->setVolumeGain(g.profile[g.id()].volumeGain());
|
||||
lcd->setData(simulator->getLcd(), lcdWidth, 64, lcdDepth);
|
||||
|
||||
if (flags & SIMULATOR_FLAGS_STICK_MODE_LEFT) {
|
||||
@@ -694,7 +696,7 @@ void SimulatorDialog::start(QByteArray & eeprom)
|
||||
lastPhase = -1;
|
||||
numGvars = GetCurrentFirmware()->getCapability(Gvars);
|
||||
numFlightModes = GetCurrentFirmware()->getCapability(FlightModes);
|
||||
simulator->start(eeprom, g.profile[g.id()], (flags & SIMULATOR_FLAGS_NOTX) ? false : true);
|
||||
simulator->start(eeprom, (flags & SIMULATOR_FLAGS_NOTX) ? false : true);
|
||||
getValues();
|
||||
setupTimer();
|
||||
}
|
||||
@@ -704,7 +706,7 @@ void SimulatorDialog::start(const char * filename)
|
||||
lastPhase = -1;
|
||||
numGvars = GetCurrentFirmware()->getCapability(Gvars);
|
||||
numFlightModes = GetCurrentFirmware()->getCapability(FlightModes);
|
||||
simulator->start(filename, g.profile[g.id()]);
|
||||
simulator->start(filename);
|
||||
getValues();
|
||||
setupTimer();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <QByteArray>
|
||||
#include <QMap>
|
||||
#include <algorithm>
|
||||
#include "appdata.h"
|
||||
|
||||
#if __GNUC__
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
@@ -66,9 +65,13 @@ class SimulatorInterface
|
||||
|
||||
virtual ~SimulatorInterface() {};
|
||||
|
||||
virtual void start(QByteArray &eeprom, const Profile & profile, bool tests=true) = 0;
|
||||
virtual void setSdPath(const QString &sdPath) { };
|
||||
|
||||
virtual void start(const char *filename, const Profile & profile, bool tests=true) = 0;
|
||||
virtual void setVolumeGain(int value) { };
|
||||
|
||||
virtual void start(QByteArray &eeprom, bool tests=true) = 0;
|
||||
|
||||
virtual void start(const char *filename, bool tests=true) = 0;
|
||||
|
||||
virtual void stop() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user