feat(cpn): Radio types can reference any libsim and/or firmware download id (#3432)
* Radio profiles reference any libsim and/or firmware download id * Revert files filter for now
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#define SIMULATOR_FLAGS_NOTX 0x01 // simulating a single model from Companion
|
||||
#define SIMULATOR_FLAGS_STANDALONE 0x02 // started from stanalone simulator
|
||||
|
||||
#define SIMULATOR_OPTIONS_VERSION 2
|
||||
#define SIMULATOR_OPTIONS_VERSION 3
|
||||
|
||||
namespace Simulator
|
||||
{
|
||||
@@ -129,13 +129,16 @@ struct SimulatorOptions
|
||||
QByteArray windowState; // SimulatorMainWindow dock/toolbar/options UI state
|
||||
QByteArray dbgConsoleState; // DebugOutput UI state
|
||||
QByteArray radioOutputsState; // RadioOutputsWidget UI state
|
||||
// added in v3
|
||||
QString simulatorId;
|
||||
|
||||
quint16 loadedVersion() const { return m_version; } //! loaded structure definition version (0 if none/error)
|
||||
|
||||
friend QDataStream & operator << (QDataStream &out, const SimulatorOptions & o)
|
||||
{
|
||||
out << quint16(SIMULATOR_OPTIONS_VERSION) << o.startupDataType << o.firmwareId << o.dataFile << o.dataFolder
|
||||
<< o.sdPath << o.windowGeometry << o.controlsState << o.lcdColor << o.windowState << o.dbgConsoleState << o.radioOutputsState;
|
||||
<< o.sdPath << o.windowGeometry << o.controlsState << o.lcdColor << o.windowState << o.dbgConsoleState << o.radioOutputsState
|
||||
<< o.simulatorId;
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -147,6 +150,8 @@ struct SimulatorOptions
|
||||
>> o.sdPath >> o.windowGeometry >> o.controlsState >> o.lcdColor;
|
||||
if (o.m_version >= 2)
|
||||
in >> o.windowState >> o.dbgConsoleState >> o.radioOutputsState;
|
||||
if (o.m_version >= 3)
|
||||
in >> o.simulatorId;
|
||||
}
|
||||
else {
|
||||
qWarning() << "Error loading SimulatorOptions, saved version not valid:" << o.m_version << "Expected <=" << SIMULATOR_OPTIONS_VERSION;
|
||||
@@ -176,7 +181,7 @@ struct SimulatorOptions
|
||||
friend QDebug operator << (QDebug d, const SimulatorOptions & o)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace() << "SimulatorOptions: firmwareId=" << o.firmwareId << "; dataFile=" << o.dataFile << "; dataFolder=" << o.dataFolder
|
||||
d.nospace() << "SimulatorOptions: firmwareId=" << o.firmwareId << "; simulatorId=" << o.simulatorId << "; dataFile=" << o.dataFile << "; dataFolder=" << o.dataFolder
|
||||
<< "; sdPath=" << o.sdPath << "; startupDataType=" << o.startupDataType;
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ void SimulatorLoader::unregisterSimulators()
|
||||
delete lib;
|
||||
}
|
||||
|
||||
QString SimulatorLoader::findSimulatorByFirmwareName(const QString & name)
|
||||
QString SimulatorLoader::findSimulatorByName(const QString & name)
|
||||
{
|
||||
int pos;
|
||||
QString ret;
|
||||
@@ -133,7 +133,7 @@ QString SimulatorLoader::findSimulatorByFirmwareName(const QString & name)
|
||||
SimulatorInterface * SimulatorLoader::loadSimulator(const QString & name)
|
||||
{
|
||||
SimulatorInterface * si = NULL;
|
||||
QString libname = findSimulatorByFirmwareName(name);
|
||||
QString libname = findSimulatorByName(name);
|
||||
|
||||
if (libname.isEmpty()) {
|
||||
qWarning() << "Simulator" << name << "not found.";
|
||||
@@ -166,7 +166,7 @@ bool SimulatorLoader::unloadSimulator(const QString & name)
|
||||
{
|
||||
bool ret = false;
|
||||
#if SIMULATOR_INTERFACE_LOADER_DYNAMIC
|
||||
QString simuName = findSimulatorByFirmwareName(name);
|
||||
QString simuName = findSimulatorByName(name);
|
||||
if (simuName.isEmpty())
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ class SimulatorLoader
|
||||
static void registerSimulators();
|
||||
static void unregisterSimulators();
|
||||
static QStringList getAvailableSimulators();
|
||||
static QString findSimulatorByFirmwareName(const QString & name);
|
||||
static QString findSimulatorByName(const QString & name);
|
||||
static SimulatorInterface * loadSimulator(const QString & name);
|
||||
static bool unloadSimulator(const QString & name);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ extern AppData g; // ensure what "g" means
|
||||
|
||||
const quint16 SimulatorMainWindow::m_savedUiStateVersion = 2;
|
||||
|
||||
SimulatorMainWindow::SimulatorMainWindow(QWidget *parent, const QString & firmwareId, quint8 flags, Qt::WindowFlags wflags) :
|
||||
SimulatorMainWindow::SimulatorMainWindow(QWidget *parent, const QString & simulatorId, quint8 flags, Qt::WindowFlags wflags) :
|
||||
QMainWindow(parent, wflags),
|
||||
ui(new Ui::SimulatorMainWindow),
|
||||
m_simulatorWidget(NULL),
|
||||
@@ -52,7 +52,7 @@ SimulatorMainWindow::SimulatorMainWindow(QWidget *parent, const QString & firmwa
|
||||
m_telemetryDockWidget(NULL),
|
||||
m_trainerDockWidget(NULL),
|
||||
m_outputsDockWidget(NULL),
|
||||
m_simulatorId(firmwareId),
|
||||
m_simulatorId(simulatorId),
|
||||
m_exitStatusCode(0),
|
||||
m_radioProfileId(g.sessionId()),
|
||||
m_radioSizeConstraint(Qt::Horizontal | Qt::Vertical),
|
||||
@@ -61,7 +61,7 @@ SimulatorMainWindow::SimulatorMainWindow(QWidget *parent, const QString & firmwa
|
||||
m_showMenubar(true)
|
||||
{
|
||||
if (m_simulatorId.isEmpty()) {
|
||||
m_simulatorId = SimulatorLoader::findSimulatorByFirmwareName(getCurrentFirmware()->getId());
|
||||
m_simulatorId = SimulatorLoader::findSimulatorByName(getCurrentFirmware()->getSimulatorId());
|
||||
}
|
||||
m_simulator = SimulatorLoader::loadSimulator(m_simulatorId);
|
||||
if (!m_simulator) {
|
||||
|
||||
@@ -49,7 +49,7 @@ class SimulatorMainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SimulatorMainWindow(QWidget * parent, const QString & firmwareId = "", quint8 flags=0, Qt::WindowFlags wflags = Qt::WindowFlags());
|
||||
explicit SimulatorMainWindow(QWidget * parent, const QString & simulatorId = "", quint8 flags=0, Qt::WindowFlags wflags = Qt::WindowFlags());
|
||||
~SimulatorMainWindow();
|
||||
|
||||
int getExitStatus(QString * msg = Q_NULLPTR);
|
||||
|
||||
@@ -24,8 +24,11 @@
|
||||
#include "appdata.h"
|
||||
#include "constants.h"
|
||||
#include "simulatorinterface.h"
|
||||
#include "eeprominterface.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QStandardItemModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
using namespace Simulator;
|
||||
|
||||
@@ -35,9 +38,12 @@ SimulatorStartupDialog::SimulatorStartupDialog(SimulatorOptions * options, int *
|
||||
QDialog(parent),
|
||||
ui(new Ui::SimulatorStartupDialog),
|
||||
m_options(options),
|
||||
m_profileId(profId)
|
||||
m_profileId(profId),
|
||||
m_simProxy(nullptr)
|
||||
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowIcon(QIcon(":/icon.png"));
|
||||
|
||||
QMapIterator<int, QString> pi(g.getActiveProfiles());
|
||||
while (pi.hasNext()) {
|
||||
@@ -45,7 +51,34 @@ SimulatorStartupDialog::SimulatorStartupDialog(SimulatorOptions * options, int *
|
||||
ui->radioProfile->addItem(pi.value(), pi.key());
|
||||
}
|
||||
|
||||
ui->radioType->addItems(SimulatorLoader::getAvailableSimulators());
|
||||
QStandardItemModel * fwModel = new QStandardItemModel(this);
|
||||
foreach(Firmware * firmware, Firmware::getRegisteredFirmwares()) {
|
||||
QStandardItem * item = new QStandardItem();
|
||||
//qDebug() << "name:" << firmware->getName() << "firmware:" << firmware->getId() << "simulator:" << firmware->getSimulatorId();
|
||||
item->setText(firmware->getName());
|
||||
item->setData(firmware->getId(), IMDR_Id);
|
||||
item->setData(firmware->getSimulatorId(), IMDR_SimulatorId);
|
||||
fwModel->appendRow(item);
|
||||
}
|
||||
|
||||
QSortFilterProxyModel * fwProxy = new QSortFilterProxyModel(this);
|
||||
fwProxy->setSourceModel(fwModel);
|
||||
fwProxy->sort(1);
|
||||
|
||||
ui->cbRadioType->setModel(fwProxy);
|
||||
|
||||
QStandardItemModel * simModel = new QStandardItemModel(this);
|
||||
foreach(QString sim, SimulatorLoader::getAvailableSimulators()) {
|
||||
QStandardItem * item = new QStandardItem();
|
||||
item->setText(sim);
|
||||
simModel->appendRow(item);
|
||||
}
|
||||
|
||||
m_simProxy = new QSortFilterProxyModel(this);
|
||||
m_simProxy->setSourceModel(simModel);
|
||||
m_simProxy->sort(1);
|
||||
|
||||
ui->cbSimulator->setModel(m_simProxy);
|
||||
|
||||
ui->optGrp_dataSource->setId(ui->optFile, SimulatorOptions::START_WITH_FILE);
|
||||
ui->optGrp_dataSource->setId(ui->optFolder, SimulatorOptions::START_WITH_FOLDER);
|
||||
@@ -58,8 +91,8 @@ SimulatorStartupDialog::SimulatorStartupDialog(SimulatorOptions * options, int *
|
||||
|
||||
loadRadioProfile(*m_profileId);
|
||||
|
||||
QObject::connect(ui->radioProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(onRadioProfileChanged(int)));
|
||||
QObject::connect(ui->radioType, SIGNAL(currentIndexChanged(int)), this, SLOT(onRadioTypeChanged(int)));
|
||||
QObject::connect(ui->radioProfile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SimulatorStartupDialog::onRadioProfileChanged);
|
||||
QObject::connect(ui->cbRadioType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SimulatorStartupDialog::onRadioTypeChanged);
|
||||
QObject::connect(ui->btnSelectDataFile, &QToolButton::clicked, this, &SimulatorStartupDialog::onDataFileSelect);
|
||||
QObject::connect(ui->btnSelectDataFolder, &QToolButton::clicked, this, &SimulatorStartupDialog::onDataFolderSelect);
|
||||
QObject::connect(ui->btnSelectSdPath, &QToolButton::clicked, this, &SimulatorStartupDialog::onSdPathSelect);
|
||||
@@ -69,6 +102,7 @@ SimulatorStartupDialog::SimulatorStartupDialog(SimulatorOptions * options, int *
|
||||
SimulatorStartupDialog::~SimulatorStartupDialog()
|
||||
{
|
||||
delete ui;
|
||||
delete m_simProxy;
|
||||
}
|
||||
|
||||
void SimulatorStartupDialog::changeEvent(QEvent *e)
|
||||
@@ -86,12 +120,12 @@ void SimulatorStartupDialog::changeEvent(QEvent *e)
|
||||
// FIXME : need a better way to check for this
|
||||
bool SimulatorStartupDialog::usesCategorizedStorage(const QString & name)
|
||||
{
|
||||
return name.contains(QRegExp("(x12|x10|horus|16|18|nv14)", Qt::CaseInsensitive));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SimulatorStartupDialog::usesCategorizedStorage()
|
||||
{
|
||||
return usesCategorizedStorage(ui->radioType->currentText());
|
||||
return usesCategorizedStorage(ui->cbRadioType->currentText());
|
||||
}
|
||||
|
||||
QString SimulatorStartupDialog::findRadioId(const QString & str)
|
||||
@@ -108,21 +142,21 @@ QString SimulatorStartupDialog::findRadioId(const QString & str)
|
||||
}
|
||||
|
||||
// TODO : this could be smarter and actually look for a matching file in the folder
|
||||
QString SimulatorStartupDialog::radioEepromFileName(const QString & firmwareId, QString folder)
|
||||
QString SimulatorStartupDialog::radioEepromFileName(const QString & simulatorId, QString folder)
|
||||
{
|
||||
QString eepromFileName = "", ext = "bin";
|
||||
|
||||
if (folder.isEmpty())
|
||||
folder = g.eepromDir();
|
||||
|
||||
QString radioId = findRadioId(firmwareId);
|
||||
QString radioId = findRadioId(simulatorId);
|
||||
int pos = radioId.indexOf("-");
|
||||
if (pos > 0)
|
||||
radioId = radioId.mid(pos+1);
|
||||
if (usesCategorizedStorage(radioId))
|
||||
ext = "etx";
|
||||
|
||||
eepromFileName = QString("eeprom-%1.%2").arg(radioId, ext);
|
||||
eepromFileName = QString("%1.%2").arg(radioId, ext);
|
||||
eepromFileName = QDir(folder).filePath(eepromFileName.toLatin1());
|
||||
// qDebug() << "radioId" << radioId << "eepromFileName" << eepromFileName;
|
||||
|
||||
@@ -163,18 +197,31 @@ void SimulatorStartupDialog::loadRadioProfile(int id)
|
||||
|
||||
*m_options = g.profile[id].simulatorOptions();
|
||||
|
||||
tmpstr = m_options->firmwareId;
|
||||
if (tmpstr.isEmpty() && !g.profile[id].fwType().isEmpty())
|
||||
tmpstr = g.profile[id].fwType();
|
||||
else if (!(tmpstr2 = SimulatorLoader::findSimulatorByFirmwareName(m_options->firmwareId)).isEmpty())
|
||||
tmpstr = tmpstr2;
|
||||
i = ui->radioType->findText(findRadioId(tmpstr), Qt::MatchContains);
|
||||
if (m_options->firmwareId.isEmpty() && !g.profile[id].fwType().isEmpty())
|
||||
m_options->firmwareId = g.profile[id].fwType();
|
||||
|
||||
m_options->firmwareId = findRadioId(m_options->firmwareId);
|
||||
|
||||
i = ui->cbRadioType->findData(m_options->firmwareId, IMDR_Id, Qt::MatchContains);
|
||||
if (i > -1)
|
||||
ui->radioType->setCurrentIndex(i);
|
||||
ui->cbRadioType->setCurrentIndex(i);
|
||||
|
||||
setGlobalFirmware(m_options->firmwareId);
|
||||
|
||||
// always refresh as linked simulatorId as could change over time
|
||||
m_options->simulatorId = getCurrentFirmware()->getSimulatorId();
|
||||
|
||||
m_simProxy->setFilterFixedString(m_options->simulatorId);
|
||||
|
||||
i = ui->cbSimulator->findText(findRadioId(m_options->simulatorId), Qt::MatchContains);
|
||||
if (i > -1)
|
||||
ui->cbSimulator->setCurrentIndex(i);
|
||||
|
||||
//qDebug() << "firmware:" << m_options->firmwareId << "simulator:" << m_options->simulatorId;
|
||||
|
||||
tmpstr = m_options->dataFile;
|
||||
if (tmpstr.isEmpty())
|
||||
tmpstr = radioEepromFileName(ui->radioType->currentText());
|
||||
tmpstr = radioEepromFileName(ui->cbRadioType->currentData().toString());
|
||||
ui->dataFile->setText(tmpstr);
|
||||
|
||||
tmpstr = m_options->dataFolder;
|
||||
@@ -199,8 +246,12 @@ void SimulatorStartupDialog::loadRadioProfile(int id)
|
||||
|
||||
void SimulatorStartupDialog::accept()
|
||||
{
|
||||
if (ui->cbSimulator->currentText() == "")
|
||||
return;
|
||||
|
||||
*m_profileId = ui->radioProfile->currentData().toInt();
|
||||
m_options->firmwareId = ui->radioType->currentText();
|
||||
m_options->firmwareId = ui->cbRadioType->currentData().toString();
|
||||
m_options->simulatorId = ui->cbSimulator->currentText();
|
||||
m_options->dataFile = ui->dataFile->text();
|
||||
m_options->dataFolder = ui->dataFolder->text();
|
||||
m_options->sdPath = ui->sdPath->text();
|
||||
@@ -221,8 +272,21 @@ void SimulatorStartupDialog::onRadioTypeChanged(int index)
|
||||
{
|
||||
if (index < 0)
|
||||
return;
|
||||
ui->dataFile->setText(radioEepromFileName(ui->radioType->currentText()));
|
||||
|
||||
QString id = ui->cbRadioType->currentData(IMDR_Id).toString();
|
||||
ui->dataFile->setText(radioEepromFileName(id));
|
||||
updateContainerTypes();
|
||||
|
||||
setGlobalFirmware(id);
|
||||
|
||||
// always refresh as linked simulatorId as could change over time
|
||||
id = getCurrentFirmware()->getSimulatorId();
|
||||
|
||||
m_simProxy->setFilterFixedString(id);
|
||||
|
||||
const int i = ui->cbSimulator->findText(findRadioId(id), Qt::MatchContains);
|
||||
if (i > -1)
|
||||
ui->cbSimulator->setCurrentIndex(i);
|
||||
}
|
||||
|
||||
void SimulatorStartupDialog::onDataFileSelect(bool)
|
||||
@@ -257,3 +321,9 @@ void SimulatorStartupDialog::onSdPathSelect(bool)
|
||||
ui->optSdPath->setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
void SimulatorStartupDialog::setGlobalFirmware(const QString & id)
|
||||
{
|
||||
Firmware::setCurrentVariant(Firmware::getFirmwareForId(id));
|
||||
//qDebug() << "current firmware:" << getCurrentFirmware()->getId();
|
||||
}
|
||||
|
||||
@@ -28,18 +28,26 @@ namespace Ui {
|
||||
class SimulatorStartupDialog;
|
||||
}
|
||||
|
||||
class QSortFilterProxyModel;
|
||||
|
||||
class SimulatorStartupDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
enum ItemModelDataRoles {
|
||||
IMDR_Id = Qt::UserRole,
|
||||
IMDR_SimulatorId
|
||||
};
|
||||
Q_ENUM(ItemModelDataRoles)
|
||||
|
||||
explicit SimulatorStartupDialog(SimulatorOptions * options, int * profId, QWidget *parent = 0);
|
||||
~SimulatorStartupDialog();
|
||||
|
||||
static bool usesCategorizedStorage(const QString & name);
|
||||
static QString findRadioId(const QString & str);
|
||||
static QString radioEepromFileName(const QString & firmwareId, QString folder = "");
|
||||
static QString radioEepromFileName(const QString & simulatorId, QString folder = "");
|
||||
|
||||
void updateContainerTypes();
|
||||
|
||||
@@ -62,6 +70,9 @@ class SimulatorStartupDialog : public QDialog
|
||||
Ui::SimulatorStartupDialog *ui;
|
||||
SimulatorOptions * m_options;
|
||||
int * m_profileId;
|
||||
QSortFilterProxyModel * m_simProxy;
|
||||
|
||||
void setGlobalFirmware(const QString & id);
|
||||
};
|
||||
|
||||
#endif // SIMULATORSTARTUPDIALOG_H
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>550</width>
|
||||
<height>217</height>
|
||||
<height>284</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@@ -97,7 +97,7 @@ Create or edit profiles using the Companion application.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="radioType">
|
||||
<widget class="QComboBox" name="cbRadioType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -110,35 +110,35 @@ The radio type specified in the selected profile is used by default.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Data Source:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Data File:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Data Folder:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>SD Image Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QWidget" name="wdgt_dataFile" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@@ -165,8 +165,8 @@ The radio type specified in the selected profile is used by default.</string>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="dataFile">
|
||||
<property name="toolTip">
|
||||
<string>Radio data (.bin/.eeprom/.otx) image file to use. A new file with a default image will be created if necessary.<br />
|
||||
<b>NOTE</b>: any existing EEPROM data incompatible with the selected radio type may be overwritten!</string>
|
||||
<string>Radio data (.etx) settings file to use. A new file with default settings will be created if necessary.<br />
|
||||
<b>NOTE</b>: any existing data incompatible with the selected radio type may be overwritten!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -190,7 +190,7 @@ The radio type specified in the selected profile is used by default.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QWidget" name="wdgt_dataFolder" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@@ -242,7 +242,7 @@ New folder(s) with default radio/model will be created here if necessary.</strin
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QWidget" name="wdgt_sdPath" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@@ -294,7 +294,7 @@ The default is configured in the chosen Radio Profile.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QWidget" name="wdgt_dataSource" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@@ -354,6 +354,16 @@ The default is configured in the chosen Radio Profile.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Simulator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cbSimulator"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -391,7 +391,7 @@ bool SimulatorWidget::useTempDataPath(bool deleteOnClose)
|
||||
}
|
||||
}
|
||||
|
||||
// This will save radio data from temporary folder structure back into an .etx file, eg. for Horus.
|
||||
// This will save radio data from temporary folder structure back into an .etx file
|
||||
bool SimulatorWidget::saveTempData()
|
||||
{
|
||||
bool ret = false;
|
||||
@@ -919,7 +919,7 @@ void SimulatorWidget::onjoystickButtonValueChanged(int button, bool state)
|
||||
int btn = g.jsButton[button].button_idx();
|
||||
|
||||
int swtch = btn & JS_BUTTON_SWITCH_MASK;
|
||||
|
||||
|
||||
if (swtch < ttlSwitches) {
|
||||
if (btn & JS_BUTTON_3POS_DN) {
|
||||
// 3POS Down
|
||||
|
||||
Reference in New Issue
Block a user