Fixes #2260: added volumeGain in simulator (ported from master)
This commit is contained in:
@@ -182,7 +182,7 @@ bool Er9xSimulator::lcdChanged(bool & lightEnable)
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Er9xSimulator::start(RadioData &radioData, bool tests)
|
||||
void Er9xSimulator::start(RadioData &radioData, const Profile & profile, bool tests)
|
||||
{
|
||||
er9xInterface->save(&eeprom[0], radioData);
|
||||
StartMainThread(tests);
|
||||
|
||||
@@ -28,7 +28,7 @@ class Er9xSimulator : public SimulatorInterface {
|
||||
|
||||
Er9xSimulator(Er9xInterface *);
|
||||
|
||||
virtual void start(RadioData & radioData, bool tests);
|
||||
virtual void start(RadioData & radioData, const Profile & profile, bool tests);
|
||||
|
||||
virtual void stop();
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ bool Ersky9xSimulator::lcdChanged(bool & lightEnable)
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Ersky9xSimulator::start(RadioData &radioData, bool tests)
|
||||
void Ersky9xSimulator::start(RadioData &radioData, const Profile & profile, bool tests)
|
||||
{
|
||||
ersky9xInterface->save(Ersky9x::eeprom, radioData);
|
||||
StartEepromThread(NULL);
|
||||
|
||||
@@ -28,7 +28,7 @@ class Ersky9xSimulator : public SimulatorInterface {
|
||||
|
||||
Ersky9xSimulator(Ersky9xInterface *);
|
||||
|
||||
virtual void start(RadioData & radioData, bool tests);
|
||||
virtual void start(RadioData & radioData, const Profile & profile, bool tests);
|
||||
|
||||
virtual void stop();
|
||||
|
||||
|
||||
@@ -339,14 +339,6 @@ OpenTxSimulator::OpenTxSimulator()
|
||||
{
|
||||
}
|
||||
|
||||
void OpenTxSimulator::setSdPath(const QString &sdPath)
|
||||
{
|
||||
#if defined(SDCARD)
|
||||
strncpy(simuSdDirectory, sdPath.toAscii().constData(), sizeof(simuSdDirectory)-1);
|
||||
simuSdDirectory[sizeof(simuSdDirectory)-1] = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
bool OpenTxSimulator::timer10ms()
|
||||
{
|
||||
#define TIMER10MS_IMPORT
|
||||
@@ -365,32 +357,28 @@ bool OpenTxSimulator::lcdChanged(bool & lightEnable)
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void OpenTxSimulator::start(QByteArray & eeprom, bool tests)
|
||||
void OpenTxSimulator::start(QByteArray & eeprom, const Profile & profile, bool tests)
|
||||
{
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
g_rotenc[0] = 0;
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
g_rotenc[0] = 0;
|
||||
g_rotenc[1] = 0;
|
||||
#endif
|
||||
memcpy(NAMESPACE::eeprom, eeprom.data(), std::min<int>(sizeof(NAMESPACE::eeprom), eeprom.size()));
|
||||
StartEepromThread(NULL);
|
||||
StartAudioThread();
|
||||
StartMainThread(tests);
|
||||
start((const char *)0, profile, tests);
|
||||
}
|
||||
|
||||
void OpenTxSimulator::start(const char * filename, bool tests)
|
||||
void OpenTxSimulator::start(const char * filename, const Profile & profile, bool tests)
|
||||
{
|
||||
#if defined(SDCARD)
|
||||
strncpy(simuSdDirectory, profile.sdPath().toAscii().constData(), sizeof(simuSdDirectory)-1);
|
||||
simuSdDirectory[sizeof(simuSdDirectory)-1] = '\0';
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
g_rotenc[0] = 0;
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
g_rotenc[0] = 0;
|
||||
g_rotenc[1] = 0;
|
||||
#endif
|
||||
|
||||
StartEepromThread(filename);
|
||||
#if defined(CPUARM)
|
||||
StartAudioThread();
|
||||
#endif
|
||||
StartAudioThread(profile.volumeGain());
|
||||
StartMainThread(tests);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,11 +81,9 @@ class DLLEXPORT OpenTxSimulator : public SimulatorInterface {
|
||||
|
||||
OpenTxSimulator();
|
||||
|
||||
virtual void setSdPath(const QString &sdPath);
|
||||
virtual void start(QByteArray & eeprom, const Profile & profile, bool tests=true);
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
virtual void start(const char * filename, bool tests=true);
|
||||
virtual void start(const char * filename, const Profile & profile, bool tests=true);
|
||||
|
||||
virtual void stop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user