Fixes #2260: added volumeGain in simulator (ported from master)

This commit is contained in:
Damjan Adamic
2015-05-31 15:59:31 +02:00
parent bef5165f68
commit 70ff6b06ed
15 changed files with 183 additions and 145 deletions
+2 -3
View File
@@ -447,7 +447,6 @@ void SimulatorDialog::initUi(T * ui)
windowName = tr("Simulating Radio (%1)").arg(GetCurrentFirmware()->getName());
setWindowTitle(windowName);
simulator->setSdPath(g.profile[g.id()].sdPath());
lcd->setData(simulator->getLcd(), lcdWidth, 64, lcdDepth);
if (flags & SIMULATOR_FLAGS_STICK_MODE_LEFT) {
@@ -695,7 +694,7 @@ void SimulatorDialog::start(QByteArray & eeprom)
lastPhase = -1;
numGvars = GetCurrentFirmware()->getCapability(Gvars);
numFlightModes = GetCurrentFirmware()->getCapability(FlightModes);
simulator->start(eeprom, (flags & SIMULATOR_FLAGS_NOTX) ? false : true);
simulator->start(eeprom, g.profile[g.id()], (flags & SIMULATOR_FLAGS_NOTX) ? false : true);
getValues();
setupTimer();
}
@@ -705,7 +704,7 @@ void SimulatorDialog::start(const char * filename)
lastPhase = -1;
numGvars = GetCurrentFirmware()->getCapability(Gvars);
numFlightModes = GetCurrentFirmware()->getCapability(FlightModes);
simulator->start(filename);
simulator->start(filename, g.profile[g.id()]);
getValues();
setupTimer();
}
@@ -23,6 +23,7 @@
#include <QByteArray>
#include <QMap>
#include <algorithm>
#include "appdata.h"
#if __GNUC__
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
@@ -65,11 +66,9 @@ class SimulatorInterface
virtual ~SimulatorInterface() {};
virtual void setSdPath(const QString &sdPath) { };
virtual void start(QByteArray &eeprom, const Profile & profile, bool tests=true) = 0;
virtual void start(QByteArray &eeprom, bool tests=true) = 0;
virtual void start(const char *filename, bool tests=true) = 0;
virtual void start(const char *filename, const Profile & profile, bool tests=true) = 0;
virtual void stop() = 0;