Merge pull request #6180 from opentx/mpaperno/cpn_noavr
Companion AVR removal - stage 1.
This commit is contained in:
@@ -31,15 +31,15 @@
|
|||||||
|
|
||||||
AppPreferencesDialog::AppPreferencesDialog(QWidget * parent) :
|
AppPreferencesDialog::AppPreferencesDialog(QWidget * parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
|
ui(new Ui::AppPreferencesDialog),
|
||||||
updateLock(false),
|
updateLock(false),
|
||||||
mainWinHasDirtyChild(false),
|
mainWinHasDirtyChild(false)
|
||||||
ui(new Ui::AppPreferencesDialog)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowIcon(CompanionIcon("apppreferences.png"));
|
setWindowIcon(CompanionIcon("apppreferences.png"));
|
||||||
|
|
||||||
initSettings();
|
initSettings();
|
||||||
connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(baseFirmwareChanged()));
|
connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(onBaseFirmwareChanged()));
|
||||||
connect(ui->opt_appDebugLog, &QCheckBox::toggled, this, &AppPreferencesDialog::toggleAppLogSettings);
|
connect(ui->opt_appDebugLog, &QCheckBox::toggled, this, &AppPreferencesDialog::toggleAppLogSettings);
|
||||||
connect(ui->opt_fwTraceLog, &QCheckBox::toggled, this, &AppPreferencesDialog::toggleAppLogSettings);
|
connect(ui->opt_fwTraceLog, &QCheckBox::toggled, this, &AppPreferencesDialog::toggleAppLogSettings);
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ void AppPreferencesDialog::accept()
|
|||||||
profile.name(ui->profileNameLE->text());
|
profile.name(ui->profileNameLE->text());
|
||||||
|
|
||||||
bool fwchange = false;
|
bool fwchange = false;
|
||||||
Firmware * newFw = getFirmwareVariant();
|
Firmware * newFw = getFirmwareVariant(); // always !null
|
||||||
// If a new fw type has been choosen, several things need to reset
|
// If a new fw type has been choosen, several things need to reset
|
||||||
if (Firmware::getCurrentVariant()->getId() != newFw->getId()) {
|
if (Firmware::getCurrentVariant()->getId() != newFw->getId()) {
|
||||||
// check if we're going to be converting to a new radio type and there are unsaved files in the main window
|
// check if we're going to be converting to a new radio type and there are unsaved files in the main window
|
||||||
@@ -288,7 +288,7 @@ void AppPreferencesDialog::initSettings()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
baseFirmwareChanged();
|
onBaseFirmwareChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppPreferencesDialog::on_libraryPathButton_clicked()
|
void AppPreferencesDialog::on_libraryPathButton_clicked()
|
||||||
@@ -435,81 +435,47 @@ void AppPreferencesDialog::on_clearImageButton_clicked()
|
|||||||
ui->SplashFileName->clear();
|
ui->SplashFileName->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppPreferencesDialog::onBaseFirmwareChanged()
|
||||||
void AppPreferencesDialog::showVoice(bool show)
|
|
||||||
{
|
{
|
||||||
ui->voiceLabel->setVisible(show);
|
populateFirmwareOptions(getBaseFirmware());
|
||||||
ui->voiceCombo->setVisible(show);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppPreferencesDialog::baseFirmwareChanged()
|
Firmware *AppPreferencesDialog::getBaseFirmware() const
|
||||||
{
|
{
|
||||||
QString selected_firmware = ui->downloadVerCB->currentData().toString();
|
return Firmware::getFirmwareForId(ui->downloadVerCB->currentData().toString());
|
||||||
|
|
||||||
foreach(Firmware * firmware, Firmware::getRegisteredFirmwares()) {
|
|
||||||
if (firmware->getId() == selected_firmware) {
|
|
||||||
populateFirmwareOptions(firmware);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Firmware * AppPreferencesDialog::getFirmwareVariant()
|
Firmware * AppPreferencesDialog::getFirmwareVariant() const
|
||||||
{
|
{
|
||||||
QString selected_firmware = ui->downloadVerCB->currentData().toString();
|
QString id = ui->downloadVerCB->currentData().toString();
|
||||||
|
|
||||||
foreach(Firmware * firmware, Firmware::getRegisteredFirmwares()) {
|
foreach(QCheckBox *cb, optionsCheckBoxes.values()) {
|
||||||
QString id = firmware->getId();
|
if (cb->isChecked())
|
||||||
if (id == selected_firmware) {
|
id += "-" + cb->text();
|
||||||
foreach(QCheckBox *cb, optionsCheckBoxes) {
|
|
||||||
if (cb->isChecked()) {
|
|
||||||
id += "-" + cb->text();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (voice && voice->isChecked()) {
|
|
||||||
id += "-tts" + ui->voiceCombo->currentText();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ui->langCombo->count()) {
|
|
||||||
id += "-" + ui->langCombo->currentText();
|
|
||||||
}
|
|
||||||
|
|
||||||
return Firmware::getFirmwareForId(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should never occur...
|
if (ui->langCombo->count())
|
||||||
return Firmware::getDefaultVariant();
|
id += "-" + ui->langCombo->currentText();
|
||||||
|
|
||||||
|
return Firmware::getFirmwareForId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppPreferencesDialog::firmwareOptionChanged(bool state)
|
void AppPreferencesDialog::onFirmwareOptionChanged(bool state)
|
||||||
{
|
{
|
||||||
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
|
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
|
||||||
if (cb == voice) {
|
if (!(cb && state))
|
||||||
showVoice(voice->isChecked());
|
return;
|
||||||
}
|
|
||||||
Firmware * firmware=NULL;
|
// This de-selects any mutually exlusive options (that is, members of the same QList<Option> list).
|
||||||
if (cb && state) {
|
const Firmware::OptionsList & fwOpts = getBaseFirmware()->optionGroups();
|
||||||
QVariant selected_firmware = ui->downloadVerCB->currentData();
|
for (const Firmware::OptionsGroup & optGrp : fwOpts) {
|
||||||
foreach(firmware, Firmware::getRegisteredFirmwares()) {
|
for (const Firmware::Option & opt : optGrp) {
|
||||||
if (firmware->getId() == selected_firmware) {
|
if (cb->text() == opt.name) {
|
||||||
foreach(QList<Option> opts, firmware->opts) {
|
QCheckBox *ocb = nullptr;
|
||||||
foreach(Option opt, opts) {
|
foreach(const Firmware::Option & other, optGrp)
|
||||||
if (cb->text() == opt.name) {
|
if (other.name != opt.name && (ocb = optionsCheckBoxes.value(other.name, nullptr)))
|
||||||
foreach(Option other, opts) {
|
ocb->setChecked(false);
|
||||||
if (other.name != opt.name) {
|
return;
|
||||||
foreach(QCheckBox *ocb, optionsCheckBoxes) {
|
|
||||||
if (ocb->text() == other.name) {
|
|
||||||
ocb->setChecked(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -525,68 +491,56 @@ void AppPreferencesDialog::toggleAppLogSettings()
|
|||||||
|
|
||||||
void AppPreferencesDialog::populateFirmwareOptions(const Firmware * firmware)
|
void AppPreferencesDialog::populateFirmwareOptions(const Firmware * firmware)
|
||||||
{
|
{
|
||||||
const Firmware * parent = firmware->getFirmwareBase();
|
const Firmware * baseFw = firmware->getFirmwareBase();
|
||||||
|
QStringList currVariant = Firmware::getCurrentVariant()->getId().split('-');
|
||||||
|
const QString currLang = ui->langCombo->count() ? ui->langCombo->currentText() : currVariant.last();
|
||||||
|
|
||||||
updateLock = true;
|
updateLock = true;
|
||||||
|
|
||||||
QString id = Firmware::getCurrentVariant()->getId();
|
|
||||||
ui->langCombo->clear();
|
ui->langCombo->clear();
|
||||||
foreach(const char *lang, parent->languages) {
|
for (const char *lang : baseFw->languageList()) {
|
||||||
ui->langCombo->addItem(lang);
|
ui->langCombo->addItem(lang);
|
||||||
if (id.endsWith(lang)) {
|
if (currLang == lang) {
|
||||||
ui->langCombo->setCurrentIndex(ui->langCombo->count() - 1);
|
ui->langCombo->setCurrentIndex(ui->langCombo->count() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
voice = NULL; // we will search for a voice checkbox
|
if (optionsCheckBoxes.size()) {
|
||||||
|
currVariant.clear();
|
||||||
|
QMutableMapIterator<QString, QCheckBox *> it(optionsCheckBoxes);
|
||||||
|
while (it.hasNext()) {
|
||||||
|
it.next();
|
||||||
|
QCheckBox * cb = it.value();
|
||||||
|
if (cb->isChecked())
|
||||||
|
currVariant.append(it.key()); // keep previous selections
|
||||||
|
ui->optionsLayout->removeWidget(cb);
|
||||||
|
cb->deleteLater();
|
||||||
|
it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
QWidget * prevFocus = ui->voiceCombo;
|
QWidget * prevFocus = ui->langCombo;
|
||||||
foreach(QList<Option> opts, parent->opts) {
|
for (const Firmware::OptionsGroup &optGrp : baseFw->optionGroups()) {
|
||||||
foreach(Option opt, opts) {
|
for (const Firmware::Option &opt : optGrp) {
|
||||||
if (index >= optionsCheckBoxes.size()) {
|
QCheckBox * cb = new QCheckBox(ui->profileTab);
|
||||||
QCheckBox * checkbox = new QCheckBox(ui->profileTab);
|
cb->setText(opt.name);
|
||||||
ui->optionsLayout->addWidget(checkbox, optionsCheckBoxes.count()/4, optionsCheckBoxes.count()%4, 1, 1);
|
cb->setToolTip(opt.tooltip);
|
||||||
optionsCheckBoxes.push_back(checkbox);
|
cb->setChecked(currVariant.contains(opt.name));
|
||||||
connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(firmwareOptionChanged(bool)));
|
ui->optionsLayout->addWidget(cb, index / 4, index % 4);
|
||||||
if (prevFocus) {
|
QWidget::setTabOrder(prevFocus, cb);
|
||||||
QWidget::setTabOrder(prevFocus, checkbox);
|
// connect to duplicates check handler if this option is part of a group
|
||||||
}
|
if (optGrp.size() > 1)
|
||||||
}
|
connect(cb, &QCheckBox::toggled, this, &AppPreferencesDialog::onFirmwareOptionChanged);
|
||||||
|
optionsCheckBoxes.insert(opt.name, cb);
|
||||||
QCheckBox *cb = optionsCheckBoxes.at(index++);
|
prevFocus = cb;
|
||||||
if (cb) {
|
++index;
|
||||||
cb->show();
|
|
||||||
cb->setText(opt.name);
|
|
||||||
cb->setToolTip(opt.tooltip);
|
|
||||||
cb->setCheckState(id.contains(opt.name) ? Qt::Checked : Qt::Unchecked);
|
|
||||||
if (opt.name == QString("voice")) {
|
|
||||||
voice = cb;
|
|
||||||
}
|
|
||||||
prevFocus = cb;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; index<optionsCheckBoxes.size(); index++) {
|
|
||||||
QCheckBox *cb = optionsCheckBoxes.at(index);
|
|
||||||
cb->hide();
|
|
||||||
cb->setCheckState(Qt::Unchecked);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->voiceCombo->clear();
|
|
||||||
foreach(const char *lang, parent->ttslanguages) {
|
|
||||||
ui->voiceCombo->addItem(lang);
|
|
||||||
if (id.contains(QString("-tts%1").arg(lang))) {
|
|
||||||
ui->voiceCombo->setCurrentIndex(ui->voiceCombo->count() - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showVoice(voice && voice->isChecked());
|
|
||||||
|
|
||||||
// TODO: Remove once splash replacement supported on Horus
|
// TODO: Remove once splash replacement supported on Horus
|
||||||
// NOTE: 480x272 image causes issues on screens <800px high, needs a solution like scrolling once reinstated
|
// NOTE: 480x272 image causes issues on screens <800px high, needs a solution like scrolling once reinstated
|
||||||
if (IS_HORUS(parent->getBoard())) {
|
if (IS_HORUS(baseFw->getBoard())) {
|
||||||
ui->widget_splashImage->hide();
|
ui->widget_splashImage->hide();
|
||||||
ui->SplashFileName->setText("");
|
ui->SplashFileName->setText("");
|
||||||
}
|
}
|
||||||
@@ -597,7 +551,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const Firmware * firmware)
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateLock = false;
|
updateLock = false;
|
||||||
QTimer::singleShot(50, this, SLOT(shrink()));
|
QTimer::singleShot(50, this, &AppPreferencesDialog::shrink);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppPreferencesDialog::shrink()
|
void AppPreferencesDialog::shrink()
|
||||||
|
|||||||
@@ -49,26 +49,10 @@ class AppPreferencesDialog : public QDialog
|
|||||||
void firmwareProfileChanged();
|
void firmwareProfileChanged();
|
||||||
void firmwareProfileAboutToChange(bool saveFiles = true);
|
void firmwareProfileAboutToChange(bool saveFiles = true);
|
||||||
|
|
||||||
private:
|
|
||||||
QList<QCheckBox *> optionsCheckBoxes;
|
|
||||||
bool updateLock;
|
|
||||||
bool mainWinHasDirtyChild;
|
|
||||||
void showVoice(bool);
|
|
||||||
void showVoice();
|
|
||||||
void hideVoice();
|
|
||||||
void populateLocale();
|
|
||||||
void populateFirmwareOptions(const Firmware *);
|
|
||||||
Firmware * getFirmwareVariant();
|
|
||||||
QCheckBox * voice;
|
|
||||||
|
|
||||||
Ui::AppPreferencesDialog *ui;
|
|
||||||
void initSettings();
|
|
||||||
bool displayImage(const QString & fileName);
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void shrink();
|
void shrink();
|
||||||
void baseFirmwareChanged();
|
void onBaseFirmwareChanged();
|
||||||
void firmwareOptionChanged(bool state);
|
void onFirmwareOptionChanged(bool state);
|
||||||
void toggleAppLogSettings();
|
void toggleAppLogSettings();
|
||||||
|
|
||||||
void on_libraryPathButton_clicked();
|
void on_libraryPathButton_clicked();
|
||||||
@@ -87,6 +71,18 @@ class AppPreferencesDialog : public QDialog
|
|||||||
void on_joystickChkB_clicked();
|
void on_joystickChkB_clicked();
|
||||||
void on_joystickcalButton_clicked();
|
void on_joystickcalButton_clicked();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
|
void initSettings();
|
||||||
|
void populateFirmwareOptions(const Firmware *);
|
||||||
|
Firmware * getBaseFirmware() const;
|
||||||
|
Firmware * getFirmwareVariant() const;
|
||||||
|
bool displayImage(const QString & fileName);
|
||||||
|
|
||||||
|
Ui::AppPreferencesDialog *ui;
|
||||||
|
QMap<QString, QCheckBox *> optionsCheckBoxes;
|
||||||
|
bool updateLock;
|
||||||
|
bool mainWinHasDirtyChild;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _APPPREFERENCESDIALOG_H_
|
#endif // _APPPREFERENCESDIALOG_H_
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>863</width>
|
<width>741</width>
|
||||||
<height>673</height>
|
<height>668</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -26,16 +26,6 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -52,24 +42,37 @@
|
|||||||
<string>Radio Profile</string>
|
<string>Radio Profile</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0">
|
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0">
|
||||||
<item row="8" column="2" colspan="2">
|
<item row="5" column="1">
|
||||||
<widget class="QPushButton" name="sdPathButton">
|
<widget class="QWidget" name="optionsWidget" native="true">
|
||||||
<property name="text">
|
<property name="sizePolicy">
|
||||||
<string>Select Folder</string>
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QGridLayout" name="optionsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="2" colspan="2">
|
<item row="7" column="0" colspan="4">
|
||||||
<widget class="QPushButton" name="ProfilebackupPathButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>The profile specific folder, if set, will override general Backup folder</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select Folder</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="4">
|
|
||||||
<widget class="QWidget" name="widget_splashImage" native="true">
|
<widget class="QWidget" name="widget_splashImage" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@@ -183,28 +186,19 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="16" column="1">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QCheckBox" name="burnFirmware">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Profile Name</string>
|
<string>Offer to write FW to Tx after download</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="profileNameLE"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="4">
|
<item row="1" column="0" colspan="4">
|
||||||
<widget class="Line" name="line_8">
|
<widget class="Line" name="line_8">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -218,319 +212,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="14" column="1">
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Sans Serif</family>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Radio Type</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="downloadVerCB">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="langLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Menu Language</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="langCombo">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="voiceLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Sans Serif</family>
|
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Voice Language</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="voiceCombo">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Set voice language.
|
|
||||||
May be different from firmware language</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Build Options</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" colspan="4">
|
|
||||||
<widget class="Line" name="splashSeparator">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0">
|
|
||||||
<widget class="QLabel" name="sdPathLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>SD Structure path</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="1">
|
|
||||||
<widget class="QLineEdit" name="sdPath">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QLabel" name="profilebackupPathLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>The profile specific folder, if set, will override general Backup folder</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Backup folder</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="1">
|
|
||||||
<widget class="QLineEdit" name="profilebackupPath">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>If set it will override the application general setting</string>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="1">
|
|
||||||
<widget class="QCheckBox" name="pbackupEnable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>if set, will override general backup enable</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable automatic backup before writing firmware</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>General Settings</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="1">
|
|
||||||
<widget class="QLabel" name="lblGeneralSettings">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">General Settings Label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0">
|
|
||||||
<widget class="QLabel" name="label_14">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Default Stick Mode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="1">
|
|
||||||
<widget class="QComboBox" name="stickmodeCB">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>Mode selection:
|
|
||||||
|
|
||||||
Mode 1:
|
|
||||||
Left stick: Elevator, Rudder
|
|
||||||
Right stick: Throttle, Aileron
|
|
||||||
|
|
||||||
Mode 2:
|
|
||||||
Left stick: Throttle, Rudder
|
|
||||||
Right stick: Elevator, Aileron
|
|
||||||
|
|
||||||
Mode 3:
|
|
||||||
Left stick: Elevator, Aileron
|
|
||||||
Right stick: Throttle, Rudder
|
|
||||||
|
|
||||||
Mode 4:
|
|
||||||
Left stick: Throttle, Aileron
|
|
||||||
Right stick: Elevator, Rudder
|
|
||||||
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Mode 1 (RUD ELE THR AIL)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Mode 2 (RUD THR ELE AIL)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Mode 3 (AIL ELE THR RUD)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Mode 4 (AIL THR ELE RUD)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="0">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Default Channel Order</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="1">
|
|
||||||
<widget class="QComboBox" name="channelorderCB">
|
<widget class="QComboBox" name="channelorderCB">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@@ -666,7 +348,30 @@ Mode 4:
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="downloadVerCB">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Build Options</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="1">
|
||||||
<widget class="QCheckBox" name="renameFirmware">
|
<widget class="QCheckBox" name="renameFirmware">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@@ -679,8 +384,56 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="1">
|
<item row="9" column="2" colspan="2">
|
||||||
<widget class="QCheckBox" name="burnFirmware">
|
<widget class="QPushButton" name="sdPathButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select Folder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Profile Name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="profileNameLE"/>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QLabel" name="profilebackupPathLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The profile specific folder, if set, will override general Backup folder</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Backup folder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="1">
|
||||||
|
<widget class="QLabel" name="lblGeneralSettings">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -688,24 +441,11 @@ Mode 4:
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Offer to write FW to Tx after download</string>
|
<string notr="true">General Settings Label</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="1">
|
<item row="8" column="0" colspan="4">
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>5</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="4">
|
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@@ -724,34 +464,240 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="13" column="0">
|
||||||
<widget class="QWidget" name="optionsWidget" native="true">
|
<widget class="QLabel" name="label_14">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="optionsLayout">
|
<property name="text">
|
||||||
<property name="leftMargin">
|
<string>Default Stick Mode</string>
|
||||||
<number>0</number>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="1">
|
||||||
|
<widget class="QComboBox" name="stickmodeCB">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Mode selection:
|
||||||
|
|
||||||
|
Mode 1:
|
||||||
|
Left stick: Elevator, Rudder
|
||||||
|
Right stick: Throttle, Aileron
|
||||||
|
|
||||||
|
Mode 2:
|
||||||
|
Left stick: Throttle, Rudder
|
||||||
|
Right stick: Elevator, Aileron
|
||||||
|
|
||||||
|
Mode 3:
|
||||||
|
Left stick: Elevator, Aileron
|
||||||
|
Right stick: Throttle, Rudder
|
||||||
|
|
||||||
|
Mode 4:
|
||||||
|
Left stick: Throttle, Aileron
|
||||||
|
Right stick: Elevator, Rudder
|
||||||
|
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mode 1 (RUD ELE THR AIL)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
</item>
|
||||||
<number>0</number>
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mode 2 (RUD THR ELE AIL)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
</item>
|
||||||
<number>0</number>
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mode 3 (AIL ELE THR RUD)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
</item>
|
||||||
<number>0</number>
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mode 4 (AIL THR ELE RUD)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="horizontalSpacing">
|
</item>
|
||||||
<number>5</number>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="verticalSpacing">
|
<item row="14" column="0">
|
||||||
<number>4</number>
|
<widget class="QLabel" name="label_13">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</layout>
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Default Channel Order</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1">
|
||||||
|
<widget class="QCheckBox" name="pbackupEnable">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>if set, will override general backup enable</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable automatic backup before writing firmware</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="4">
|
||||||
|
<widget class="Line" name="splashSeparator">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="1">
|
||||||
|
<widget class="QLineEdit" name="profilebackupPath">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>If set it will override the application general setting</string>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="sdPathLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>SD Structure path</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="2" colspan="2">
|
||||||
|
<widget class="QPushButton" name="ProfilebackupPathButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The profile specific folder, if set, will override general Backup folder</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select Folder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>General Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Sans Serif</family>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Radio Type</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="langLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Menu Language</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QLineEdit" name="sdPath">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="1">
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="langCombo">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -1464,14 +1410,22 @@ Mode 4:
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tabWidget</tabstop>
|
<tabstop>tabWidget</tabstop>
|
||||||
<tabstop>profileNameLE</tabstop>
|
<tabstop>profileNameLE</tabstop>
|
||||||
<tabstop>downloadVerCB</tabstop>
|
<tabstop>downloadVerCB</tabstop>
|
||||||
<tabstop>langCombo</tabstop>
|
|
||||||
<tabstop>voiceCombo</tabstop>
|
|
||||||
<tabstop>sdPath</tabstop>
|
<tabstop>sdPath</tabstop>
|
||||||
<tabstop>sdPathButton</tabstop>
|
<tabstop>sdPathButton</tabstop>
|
||||||
<tabstop>profilebackupPath</tabstop>
|
<tabstop>profilebackupPath</tabstop>
|
||||||
|
|||||||
@@ -140,8 +140,11 @@ const int Boards::getFlashSize(Type board)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const SwitchInfo Boards::getSwitchInfo(Board::Type board, unsigned index)
|
const SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
|
||||||
{
|
{
|
||||||
|
if (index < 0)
|
||||||
|
return {SWITCH_NOT_AVAILABLE, CPN_STR_UNKNOWN_ITEM};
|
||||||
|
|
||||||
if (IS_TARANIS_XLITE(board)) {
|
if (IS_TARANIS_XLITE(board)) {
|
||||||
const Board::SwitchInfo switches[] = {
|
const Board::SwitchInfo switches[] = {
|
||||||
{SWITCH_3POS, "SA"},
|
{SWITCH_3POS, "SA"},
|
||||||
@@ -202,7 +205,7 @@ const SwitchInfo Boards::getSwitchInfo(Board::Type board, unsigned index)
|
|||||||
return switches[index];
|
return switches[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
return {SWITCH_NOT_AVAILABLE, "???"};
|
return {SWITCH_NOT_AVAILABLE, CPN_STR_UNKNOWN_ITEM};
|
||||||
}
|
}
|
||||||
|
|
||||||
const int Boards::getCapability(Board::Type board, Board::Capability capability)
|
const int Boards::getCapability(Board::Type board, Board::Capability capability)
|
||||||
@@ -301,9 +304,12 @@ const QString Boards::getAxisName(int index)
|
|||||||
return tr("Unknown");
|
return tr("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString Boards::getAnalogInputName(Board::Type board, unsigned index)
|
const QString Boards::getAnalogInputName(Board::Type board, int index)
|
||||||
{
|
{
|
||||||
if ((int)index < getBoardCapability(board, Board::Sticks)) {
|
if (index < 0)
|
||||||
|
return CPN_STR_UNKNOWN_ITEM;
|
||||||
|
|
||||||
|
if (index < getBoardCapability(board, Board::Sticks)) {
|
||||||
const QString sticks[] = {
|
const QString sticks[] = {
|
||||||
tr("Rud"),
|
tr("Rud"),
|
||||||
tr("Ele"),
|
tr("Ele"),
|
||||||
@@ -376,7 +382,7 @@ const QString Boards::getAnalogInputName(Board::Type board, unsigned index)
|
|||||||
return pots[index];
|
return pots[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
return "???";
|
return CPN_STR_UNKNOWN_ITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool Boards::isBoardCompatible(Type board1, Type board2)
|
const bool Boards::isBoardCompatible(Type board1, Type board2)
|
||||||
|
|||||||
@@ -157,18 +157,18 @@ class Boards
|
|||||||
const uint32_t getFourCC() const { return getFourCC(m_boardType); }
|
const uint32_t getFourCC() const { return getFourCC(m_boardType); }
|
||||||
const int getEEpromSize() const { return getEEpromSize(m_boardType); }
|
const int getEEpromSize() const { return getEEpromSize(m_boardType); }
|
||||||
const int getFlashSize() const { return getFlashSize(m_boardType); }
|
const int getFlashSize() const { return getFlashSize(m_boardType); }
|
||||||
const Board::SwitchInfo getSwitchInfo(unsigned index) const { return getSwitchInfo(m_boardType, index); }
|
const Board::SwitchInfo getSwitchInfo(int index) const { return getSwitchInfo(m_boardType, index); }
|
||||||
const int getCapability(Board::Capability capability) const { return getCapability(m_boardType, capability); }
|
const int getCapability(Board::Capability capability) const { return getCapability(m_boardType, capability); }
|
||||||
const QString getAnalogInputName(unsigned index) const { return getAnalogInputName(m_boardType, index); }
|
const QString getAnalogInputName(int index) const { return getAnalogInputName(m_boardType, index); }
|
||||||
const bool isBoardCompatible(Board::Type board2) const { return isBoardCompatible(m_boardType, board2); }
|
const bool isBoardCompatible(Board::Type board2) const { return isBoardCompatible(m_boardType, board2); }
|
||||||
|
|
||||||
static uint32_t getFourCC(Board::Type board);
|
static uint32_t getFourCC(Board::Type board);
|
||||||
static const int getEEpromSize(Board::Type board);
|
static const int getEEpromSize(Board::Type board);
|
||||||
static const int getFlashSize(Board::Type board);
|
static const int getFlashSize(Board::Type board);
|
||||||
static const Board::SwitchInfo getSwitchInfo(Board::Type board, unsigned index);
|
static const Board::SwitchInfo getSwitchInfo(Board::Type board, int index);
|
||||||
static const int getCapability(Board::Type board, Board::Capability capability);
|
static const int getCapability(Board::Type board, Board::Capability capability);
|
||||||
static const QString getAxisName(int index);
|
static const QString getAxisName(int index);
|
||||||
static const QString getAnalogInputName(Board::Type board, unsigned index);
|
static const QString getAnalogInputName(Board::Type board, int index);
|
||||||
static const bool isBoardCompatible(Board::Type board1, Board::Type board2);
|
static const bool isBoardCompatible(Board::Type board1, Board::Type board2);
|
||||||
static const QString getBoardName(Board::Type board);
|
static const QString getBoardName(Board::Type board);
|
||||||
|
|
||||||
@@ -179,8 +179,6 @@ class Boards
|
|||||||
|
|
||||||
// temporary aliases for transition period, use Boards class instead.
|
// temporary aliases for transition period, use Boards class instead.
|
||||||
#define getBoardCapability(b__, c__) Boards::getCapability(b__, c__)
|
#define getBoardCapability(b__, c__) Boards::getCapability(b__, c__)
|
||||||
#define getEEpromSize(b__) Boards::getEEpromSize(b__)
|
|
||||||
#define getSwitchInfo(b__, i__) Boards::getSwitchInfo(b__, i__)
|
|
||||||
|
|
||||||
#define IS_9X(board) (board==Board::BOARD_STOCK || board==Board::BOARD_M128)
|
#define IS_9X(board) (board==Board::BOARD_STOCK || board==Board::BOARD_M128)
|
||||||
#define IS_STOCK(board) (board==Board::BOARD_STOCK)
|
#define IS_STOCK(board) (board==Board::BOARD_STOCK)
|
||||||
|
|||||||
@@ -142,19 +142,13 @@ Firmware * Firmware::getFirmwareForId(const QString & id)
|
|||||||
return defaultVariant;
|
return defaultVariant;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Firmware::addOption(const char *option, QString tooltip, uint32_t variant)
|
|
||||||
{
|
|
||||||
Option options[] = { { option, tooltip, variant }, { NULL } };
|
|
||||||
addOptions(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int Firmware::getVariantNumber()
|
unsigned int Firmware::getVariantNumber()
|
||||||
{
|
{
|
||||||
unsigned int result = 0;
|
unsigned int result = 0;
|
||||||
const Firmware * base = getFirmwareBase();
|
const Firmware * base = getFirmwareBase();
|
||||||
QStringList options = id.mid(base->getId().length()+1).split("-", QString::SkipEmptyParts);
|
QStringList options = id.mid(base->getId().length()+1).split("-", QString::SkipEmptyParts);
|
||||||
foreach(QString option, options) {
|
foreach(QString option, options) {
|
||||||
foreach(QList<Option> group, base->opts) {
|
foreach(OptionsGroup group, base->opts) {
|
||||||
foreach(Option opt, group) {
|
foreach(Option opt, group) {
|
||||||
if (opt.name == option) {
|
if (opt.name == option) {
|
||||||
result += opt.variant;
|
result += opt.variant;
|
||||||
@@ -165,21 +159,27 @@ unsigned int Firmware::getVariantNumber()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Firmware::addLanguage(const char *lang)
|
void Firmware::addLanguage(const char * lang)
|
||||||
{
|
{
|
||||||
languages.push_back(lang);
|
languages.push_back(lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Firmware::addTTSLanguage(const char *lang)
|
//void Firmware::addTTSLanguage(const char * lang)
|
||||||
|
//{
|
||||||
|
// ttslanguages.push_back(lang);
|
||||||
|
//}
|
||||||
|
|
||||||
|
void Firmware::addOption(const char * option, const QString & tooltip, unsigned variant)
|
||||||
{
|
{
|
||||||
ttslanguages.push_back(lang);
|
addOption(Option(option, tooltip, variant));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Firmware::addOptions(Option options[])
|
void Firmware::addOption(const Option & option)
|
||||||
{
|
{
|
||||||
QList<Option> opts;
|
addOptionsGroup({option});
|
||||||
for (int i=0; options[i].name; i++) {
|
}
|
||||||
opts.push_back(options[i]);
|
|
||||||
}
|
void Firmware::addOptionsGroup(const OptionsGroup & options)
|
||||||
this->opts.push_back(opts);
|
{
|
||||||
|
this->opts.append(options);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,40 +244,37 @@ enum EepromLoadErrors {
|
|||||||
NUM_ERRORS
|
NUM_ERRORS
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Option {
|
|
||||||
const char * name;
|
|
||||||
QString tooltip;
|
|
||||||
uint32_t variant;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Firmware
|
class Firmware
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(Firmware)
|
Q_DECLARE_TR_FUNCTIONS(Firmware)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Firmware(const QString & id, const QString & name, Board::Type board):
|
struct Option {
|
||||||
id(id),
|
const char * name = nullptr;
|
||||||
name(name),
|
QString tooltip;
|
||||||
board(board),
|
unsigned variant = 0;
|
||||||
variantBase(0),
|
|
||||||
base(NULL),
|
|
||||||
eepromInterface(NULL)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Firmware(Firmware * base, const QString & id, const QString & name, Board::Type board):
|
explicit Option(const char * name, const QString & description, unsigned variant = 0) :
|
||||||
|
name(name), tooltip(description), variant(variant) { }
|
||||||
|
};
|
||||||
|
typedef QList<Option> OptionsGroup;
|
||||||
|
typedef QList<OptionsGroup> OptionsList;
|
||||||
|
|
||||||
|
|
||||||
|
explicit Firmware(const QString & id, const QString & name, Board::Type board) :
|
||||||
|
Firmware(nullptr, id, name, board)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
explicit Firmware(Firmware * base, const QString & id, const QString & name, Board::Type board) :
|
||||||
id(id),
|
id(id),
|
||||||
name(name),
|
name(name),
|
||||||
board(board),
|
board(board),
|
||||||
variantBase(0),
|
variantBase(0),
|
||||||
base(base),
|
base(base),
|
||||||
eepromInterface(NULL)
|
eepromInterface(nullptr)
|
||||||
{
|
{ }
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~Firmware()
|
virtual ~Firmware() { }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const Firmware * getFirmwareBase() const
|
inline const Firmware * getFirmwareBase() const
|
||||||
{
|
{
|
||||||
@@ -288,13 +285,15 @@ class Firmware
|
|||||||
|
|
||||||
unsigned int getVariantNumber();
|
unsigned int getVariantNumber();
|
||||||
|
|
||||||
virtual void addLanguage(const char *lang);
|
virtual void addLanguage(const char * lang);
|
||||||
|
|
||||||
virtual void addTTSLanguage(const char *lang);
|
//virtual void addTTSLanguage(const char * lang);
|
||||||
|
|
||||||
virtual void addOption(const char *option, QString tooltip="", uint32_t variant=0);
|
virtual void addOption(const char * option, const QString & tooltip = QString(), unsigned variant = 0);
|
||||||
|
|
||||||
virtual void addOptions(Option options[]);
|
virtual void addOption(const Option & option);
|
||||||
|
|
||||||
|
virtual void addOptionsGroup(const OptionsGroup & options);
|
||||||
|
|
||||||
virtual QString getStampUrl() = 0;
|
virtual QString getStampUrl() = 0;
|
||||||
|
|
||||||
@@ -327,6 +326,16 @@ class Firmware
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<const char *> languageList() const
|
||||||
|
{
|
||||||
|
return languages;
|
||||||
|
}
|
||||||
|
|
||||||
|
OptionsList optionGroups() const
|
||||||
|
{
|
||||||
|
return opts;
|
||||||
|
}
|
||||||
|
|
||||||
virtual int getCapability(Capability) = 0;
|
virtual int getCapability(Capability) = 0;
|
||||||
|
|
||||||
virtual QString getAnalogInputName(unsigned int index) = 0;
|
virtual QString getAnalogInputName(unsigned int index) = 0;
|
||||||
@@ -368,12 +377,6 @@ class Firmware
|
|||||||
currentVariant = value;
|
currentVariant = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
|
||||||
QList<const char *> languages;
|
|
||||||
QList<const char *> ttslanguages;
|
|
||||||
QList< QList<Option> > opts;
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString id;
|
QString id;
|
||||||
QString name;
|
QString name;
|
||||||
@@ -381,14 +384,13 @@ class Firmware
|
|||||||
unsigned int variantBase;
|
unsigned int variantBase;
|
||||||
Firmware * base;
|
Firmware * base;
|
||||||
EEPROMInterface * eepromInterface;
|
EEPROMInterface * eepromInterface;
|
||||||
|
QList<const char *> languages;
|
||||||
|
//QList<const char *> ttslanguages;
|
||||||
|
OptionsList opts;
|
||||||
|
|
||||||
static QVector<Firmware *> registeredFirmwares;
|
static QVector<Firmware *> registeredFirmwares;
|
||||||
static Firmware * defaultVariant;
|
static Firmware * defaultVariant;
|
||||||
static Firmware * currentVariant;
|
static Firmware * currentVariant;
|
||||||
|
|
||||||
private:
|
|
||||||
Firmware();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline Firmware * getCurrentFirmware()
|
inline Firmware * getCurrentFirmware()
|
||||||
@@ -416,11 +418,7 @@ inline int calcRESXto100(int x)
|
|||||||
return divRoundClosest(x*100, 1024);
|
return divRoundClosest(x*100, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_IN_ARRAY(T, index) ((unsigned int)index < DIM(T) ? T[(unsigned int)index] : CPN_STR_UNKNOWN_ITEM)
|
|
||||||
|
|
||||||
extern QList<EEPROMInterface *> eepromInterfaces;
|
extern QList<EEPROMInterface *> eepromInterfaces;
|
||||||
|
|
||||||
bool loadFile(RadioData & radioData, const QString & filename);
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _EEPROMINTERFACE_H_
|
#endif // _EEPROMINTERFACE_H_
|
||||||
|
|||||||
@@ -28,29 +28,30 @@
|
|||||||
|
|
||||||
QString removeAccents(const QString & str)
|
QString removeAccents(const QString & str)
|
||||||
{
|
{
|
||||||
QString result = str;
|
|
||||||
|
|
||||||
// UTF-8 ASCII Table
|
// UTF-8 ASCII Table
|
||||||
const QString tA[] = { "á", "â", "ã", "à", "ä" };
|
static const QHash<QString, QVariant> map = {
|
||||||
const QString tE[] = { "é", "è", "ê", "ě" };
|
{"a", QRegularExpression("[áâãàä]")},
|
||||||
const QString tI[] = { "í" };
|
{"A", QRegularExpression("[ÁÂÃÀÄ]")},
|
||||||
const QString tO[] = { "ó", "ô", "õ", "ö" };
|
{"e", QRegularExpression("[éèêě]")},
|
||||||
const QString tU[] = { "ú", "ü" };
|
{"E", QRegularExpression("[ÉÈÊĚ]")},
|
||||||
const QString tC[] = { "ç" };
|
{"o", QRegularExpression("[óôõö]")},
|
||||||
const QString tY[] = { "ý" };
|
{"O", QRegularExpression("[ÓÔÕÖ]")},
|
||||||
const QString tS[] = { "š" };
|
{"u", QRegularExpression("[úü]")},
|
||||||
const QString tR[] = { "ř" };
|
{"U", QRegularExpression("[ÚÜ]")},
|
||||||
|
{"i", "í"}, {"I", "Í"},
|
||||||
for (unsigned int i = 0; i < DIM(tA); i++) result.replace(tA[i], "a");
|
{"c", "ç"}, {"C", "Ç"},
|
||||||
for (unsigned int i = 0; i < DIM(tE); i++) result.replace(tE[i], "e");
|
{"y", "ý"}, {"Y", "Ý"},
|
||||||
for (unsigned int i = 0; i < DIM(tI); i++) result.replace(tI[i], "i");
|
{"s", "š"}, {"S", "Š"},
|
||||||
for (unsigned int i = 0; i < DIM(tO); i++) result.replace(tO[i], "o");
|
{"r", "ř"}, {"R", "Ř"}
|
||||||
for (unsigned int i = 0; i < DIM(tU); i++) result.replace(tU[i], "u");
|
};
|
||||||
for (unsigned int i = 0; i < DIM(tC); i++) result.replace(tC[i], "c");
|
|
||||||
for (unsigned int i = 0; i < DIM(tY); i++) result.replace(tY[i], "y");
|
|
||||||
for (unsigned int i = 0; i < DIM(tS); i++) result.replace(tS[i], "s");
|
|
||||||
for (unsigned int i = 0; i < DIM(tR); i++) result.replace(tR[i], "r");
|
|
||||||
|
|
||||||
|
QString result(str);
|
||||||
|
for (QHash<QString, QVariant>::const_iterator it = map.cbegin(), en = map.cend(); it != en; ++it) {
|
||||||
|
if (it.value().canConvert<QRegularExpression>())
|
||||||
|
result.replace(it.value().toRegularExpression(), it.key());
|
||||||
|
else
|
||||||
|
result.replace(it.value().toString(), it.key());
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,12 +41,7 @@
|
|||||||
|
|
||||||
using namespace Board;
|
using namespace Board;
|
||||||
|
|
||||||
template<typename T, size_t N>
|
QList<OpenTxEepromInterface *> opentxEEpromInterfaces;
|
||||||
inline
|
|
||||||
size_t SizeOfArray(T(&)[N])
|
|
||||||
{
|
|
||||||
return N;
|
|
||||||
}
|
|
||||||
|
|
||||||
OpenTxEepromInterface::OpenTxEepromInterface(OpenTxFirmware * firmware):
|
OpenTxEepromInterface::OpenTxEepromInterface(OpenTxFirmware * firmware):
|
||||||
EEPROMInterface(firmware->getBoard()),
|
EEPROMInterface(firmware->getBoard()),
|
||||||
@@ -1065,385 +1060,152 @@ QString OpenTxFirmware::getStampUrl()
|
|||||||
return getFirmwareBaseUrl() % QStringLiteral("stamp-opentx.txt");
|
return getFirmwareBaseUrl() % QStringLiteral("stamp-opentx.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
void addOpenTxCommonOptions(OpenTxFirmware * firmware)
|
|
||||||
{
|
|
||||||
firmware->addOption("ppmus", QCoreApplication::translate("Firmware", "Channel values displayed in us"));
|
|
||||||
firmware->addOption("nooverridech", QCoreApplication::translate("Firmware", "No OverrideCH functions available"));
|
|
||||||
Option fai_options[] = {{"faichoice", QCoreApplication::translate("Firmware", "Possibility to enable FAI MODE (no telemetry) at field")},
|
|
||||||
{"faimode", QCoreApplication::translate("Firmware", "FAI MODE (no telemetry) always enabled")},
|
|
||||||
{NULL}};
|
|
||||||
firmware->addOptions(fai_options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void addFrskyRfOptions(OpenTxFirmware * firmware)
|
// Firmware registrations
|
||||||
{
|
// NOTE: "recognized" build options are defined in /radio/util/fwoptions.py
|
||||||
Option rf_options[] = {{"eu", QCoreApplication::translate("Firmware", "Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015")},
|
|
||||||
{"flexr9m", QCoreApplication::translate("Firmware", "Enable non certified firmwares")},
|
|
||||||
{NULL}};
|
|
||||||
firmware->addOptions(rf_options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void addOpenTxFrskyOptions(OpenTxFirmware * firmware)
|
void registerOpenTxFirmware(OpenTxFirmware * firmware, bool deprecated = false)
|
||||||
{
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
firmware->addOption("multimodule", QCoreApplication::translate("Firmware", "Support for the DIY-Multiprotocol-TX-Module"));
|
|
||||||
firmware->addOption("noheli", QCoreApplication::translate("Firmware", "Disable HELI menu and cyclic mix support"));
|
|
||||||
firmware->addOption("nogvars", QCoreApplication::translate("Firmware", "Disable Global variables"));
|
|
||||||
firmware->addOption("lua", QCoreApplication::translate("Firmware", "Enable Lua custom scripts screen"));
|
|
||||||
firmware->addOption("luac", QCoreApplication::translate("Firmware", "Enable Lua compiler"));
|
|
||||||
addFrskyRfOptions(firmware);
|
|
||||||
}
|
|
||||||
|
|
||||||
void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
|
|
||||||
{
|
|
||||||
addOpenTxFrskyOptions(firmware);
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void addOpenTxLcdOptions(OpenTxFirmware * firmware)
|
|
||||||
{
|
|
||||||
Option lcd_options[] = {
|
|
||||||
{"ST7565P", QCoreApplication::translate("Firmware", "ST7565P LCD or compatible")},
|
|
||||||
{"ST7565R", QCoreApplication::translate("Firmware", "ST7565R LCD or compatible")},
|
|
||||||
{"ERC12864FSF", QCoreApplication::translate("Firmware", "ERC12864FSF LCD")},
|
|
||||||
{"ST7920", QCoreApplication::translate("Firmware", "ST7920 LCD")},
|
|
||||||
{"KS108", QCoreApplication::translate("Firmware", "KS108 LCD")},
|
|
||||||
{NULL}
|
|
||||||
};
|
|
||||||
firmware->addOptions(lcd_options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void addOpenTxVoiceOptions(OpenTxFirmware * firmware)
|
|
||||||
{
|
|
||||||
Option voice_options[] = {
|
|
||||||
{"WTV20", QCoreApplication::translate("Firmware", "WTV20 voice module")},
|
|
||||||
{"JQ6500", QCoreApplication::translate("Firmware", "JQ6500 voice module")},
|
|
||||||
{NULL}
|
|
||||||
};
|
|
||||||
firmware->addOptions(voice_options);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<OpenTxEepromInterface *> opentxEEpromInterfaces;
|
|
||||||
|
|
||||||
void registerOpenTxFirmware(OpenTxFirmware * firmware)
|
|
||||||
{
|
{
|
||||||
OpenTxEepromInterface * eepromInterface = new OpenTxEepromInterface(firmware);
|
OpenTxEepromInterface * eepromInterface = new OpenTxEepromInterface(firmware);
|
||||||
firmware->setEEpromInterface(eepromInterface);
|
firmware->setEEpromInterface(eepromInterface);
|
||||||
opentxEEpromInterfaces.push_back(eepromInterface);
|
opentxEEpromInterfaces.push_back(eepromInterface);
|
||||||
eepromInterfaces.push_back(eepromInterface);
|
eepromInterfaces.push_back(eepromInterface);
|
||||||
Firmware::addRegisteredFirmware(firmware);
|
if (!deprecated)
|
||||||
|
Firmware::addRegisteredFirmware(firmware);
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOpenTxCommonOptions(OpenTxFirmware * firmware)
|
||||||
|
{
|
||||||
|
static const Firmware::OptionsGroup fai_options = {
|
||||||
|
Firmware::Option("faichoice", Firmware::tr("Possibility to enable FAI MODE (no telemetry) at field")),
|
||||||
|
Firmware::Option("faimode", Firmware::tr("FAI MODE (no telemetry) always enabled"))
|
||||||
|
};
|
||||||
|
firmware->addOption("ppmus", Firmware::tr("Channel values displayed in us"));
|
||||||
|
firmware->addOptionsGroup(fai_options);
|
||||||
|
firmware->addOption("nooverridech", Firmware::tr("No OverrideCH functions available"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOpenTxRfOptions(OpenTxFirmware * firmware, bool flex = true)
|
||||||
|
{
|
||||||
|
static const Firmware::Option opt_eu("eu", Firmware::tr("Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
|
||||||
|
static const Firmware::Option opt_fl("flexr9m", Firmware::tr("Enable non certified firmwares"));
|
||||||
|
firmware->addOption("multimodule", Firmware::tr("Support for the DIY-Multiprotocol-TX-Module"));
|
||||||
|
if (flex)
|
||||||
|
firmware->addOptionsGroup({opt_eu, opt_fl});
|
||||||
|
else
|
||||||
|
firmware->addOption(opt_eu);
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOpenTxFontOptions(OpenTxFirmware * firmware)
|
||||||
|
{
|
||||||
|
firmware->addOption("sqt5font", Firmware::tr("Use alternative SQT5 font"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOpenTxFrskyOptions(OpenTxFirmware * firmware)
|
||||||
|
{
|
||||||
|
addOpenTxCommonOptions(firmware);
|
||||||
|
firmware->addOption("noheli", Firmware::tr("Disable HELI menu and cyclic mix support"));
|
||||||
|
firmware->addOption("nogvars", Firmware::tr("Disable Global variables"));
|
||||||
|
firmware->addOption("lua", Firmware::tr("Enable Lua custom scripts screen"));
|
||||||
|
firmware->addOption("luac", Firmware::tr("Enable Lua compiler"));
|
||||||
|
addOpenTxRfOptions(firmware);
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOpenTxTaranisOptions(OpenTxFirmware * firmware, bool intppm = true)
|
||||||
|
{
|
||||||
|
addOpenTxFrskyOptions(firmware);
|
||||||
|
if (intppm)
|
||||||
|
firmware->addOption("internalppm", Firmware::tr("Support for PPM internal module hack"));
|
||||||
|
addOpenTxFontOptions(firmware);
|
||||||
|
}
|
||||||
|
|
||||||
|
void addOpenTxArm9xOptions(OpenTxFirmware * firmware, bool dblkeys = true)
|
||||||
|
{
|
||||||
|
addOpenTxCommonOptions(firmware);
|
||||||
|
firmware->addOption("heli", Firmware::tr("Enable HELI menu and cyclic mix support"));
|
||||||
|
firmware->addOption("gvars", Firmware::tr("Global variables"), GVARS_VARIANT);
|
||||||
|
firmware->addOption("potscroll", Firmware::tr("Pots use in menus navigation"));
|
||||||
|
firmware->addOption("autosource", Firmware::tr("In model setup menus automatically set source by moving the control"));
|
||||||
|
firmware->addOption("autoswitch", Firmware::tr("In model setup menus automatically set switch by moving the control"));
|
||||||
|
firmware->addOption("nographics", Firmware::tr("No graphical check boxes and sliders"));
|
||||||
|
firmware->addOption("battgraph", Firmware::tr("Battery graph"));
|
||||||
|
firmware->addOption("nobold", Firmware::tr("Don't use bold font for highlighting active items"));
|
||||||
|
//firmware->addOption("bluetooth", Firmware::tr("Bluetooth interface"));
|
||||||
|
if (dblkeys)
|
||||||
|
firmware->addOption("dblkeys", Firmware::tr("Enable resetting values by pressing up and down at the same time"));
|
||||||
|
addOpenTxFontOptions(firmware);
|
||||||
|
addOpenTxRfOptions(firmware, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void registerOpenTxFirmwares()
|
void registerOpenTxFirmwares()
|
||||||
{
|
{
|
||||||
OpenTxFirmware * firmware;
|
OpenTxFirmware * firmware;
|
||||||
|
|
||||||
Option ext_options[] = {{"frsky", QCoreApplication::translate("Firmware", "Support for frsky telemetry mod"), FRSKY_VARIANT},
|
|
||||||
{"telemetrez", QCoreApplication::translate("Firmware", "Support for telemetry easy board"), FRSKY_VARIANT},
|
|
||||||
{"jeti", QCoreApplication::translate("Firmware", "Support for jeti telemetry mod"), 0},
|
|
||||||
{"ardupilot", QCoreApplication::translate("Firmware", "Support for receiving ardupilot data"), 0},
|
|
||||||
{"nmea", QCoreApplication::translate("Firmware", "Support for receiving NMEA data"), 0},
|
|
||||||
{"mavlink", QCoreApplication::translate("Firmware", "Support for MAVLINK devices"), MAVLINK_VARIANT},
|
|
||||||
{NULL}};
|
|
||||||
Option extr_options[] = {{"frsky", QCoreApplication::translate("Firmware", "Support for frsky telemetry mod"), FRSKY_VARIANT},
|
|
||||||
{"jeti", QCoreApplication::translate("Firmware", "Support for jeti telemetry mod"), 0},
|
|
||||||
{"ardupilot", QCoreApplication::translate("Firmware", "Support for receiving ardupilot data"), 0},
|
|
||||||
{"nmea", QCoreApplication::translate("Firmware", "Support for receiving NMEA data"), 0},
|
|
||||||
{"mavlink", QCoreApplication::translate("Firmware", "Support for MAVLINK devices"), MAVLINK_VARIANT},
|
|
||||||
{NULL}};
|
|
||||||
Option nav_options[] = {{"rotenc", QCoreApplication::translate("Firmware", "Rotary Encoder use in menus navigation")},
|
|
||||||
{"potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation")},
|
|
||||||
{NULL}};
|
|
||||||
Option dsm2_options[] = {{"DSM2", QCoreApplication::translate("Firmware", "Support for DSM2 modules"), 0},
|
|
||||||
{"DSM2PPM", QCoreApplication::translate("Firmware", "Support for DSM2 modules using ppm instead of true serial"), 0},
|
|
||||||
{NULL}};
|
|
||||||
|
|
||||||
/* FrSky Taranis X9D+ board */
|
/* FrSky Taranis X9D+ board */
|
||||||
firmware = new OpenTxFirmware("opentx-x9d+", QCoreApplication::translate("Firmware", "FrSky Taranis X9D+"), BOARD_TARANIS_X9DP);
|
firmware = new OpenTxFirmware("opentx-x9d+", Firmware::tr("FrSky Taranis X9D+"), BOARD_TARANIS_X9DP);
|
||||||
firmware->addOption("internalppm", QCoreApplication::translate("Firmware", "Support for PPM internal module hack"));
|
firmware->addOption("noras", Firmware::tr("Disable RAS (SWR)"));
|
||||||
firmware->addOption("noras", QCoreApplication::translate("Firmware", "Disable RAS (SWR)"));
|
|
||||||
addOpenTxTaranisOptions(firmware);
|
addOpenTxTaranisOptions(firmware);
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* FrSky Taranis X9D board */
|
/* FrSky Taranis X9D board */
|
||||||
firmware = new OpenTxFirmware("opentx-x9d", QCoreApplication::translate("Firmware", "FrSky Taranis X9D"), BOARD_TARANIS_X9D);
|
firmware = new OpenTxFirmware("opentx-x9d", Firmware::tr("FrSky Taranis X9D"), BOARD_TARANIS_X9D);
|
||||||
firmware->addOption("haptic", QCoreApplication::translate("Firmware", "Haptic module installed"));
|
firmware->addOption("haptic", Firmware::tr("Haptic module installed"));
|
||||||
firmware->addOption("internalppm", QCoreApplication::translate("Firmware", "Support for PPM internal module hack"));
|
|
||||||
addOpenTxTaranisOptions(firmware);
|
addOpenTxTaranisOptions(firmware);
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* FrSky Taranis X9E board */
|
/* FrSky Taranis X9E board */
|
||||||
firmware = new OpenTxFirmware("opentx-x9e", QCoreApplication::translate("Firmware", "FrSky Taranis X9E"), BOARD_TARANIS_X9E);
|
firmware = new OpenTxFirmware("opentx-x9e", Firmware::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
|
||||||
firmware->addOption("shutdownconfirm", QCoreApplication::translate("Firmware", "Confirmation before radio shutdown"));
|
firmware->addOption("shutdownconfirm", Firmware::tr("Confirmation before radio shutdown"));
|
||||||
firmware->addOption("horussticks", QCoreApplication::translate("Firmware", "Horus gimbals installed (Hall sensors)"));
|
firmware->addOption("horussticks", Firmware::tr("Horus gimbals installed (Hall sensors)"));
|
||||||
firmware->addOption("internalppm", QCoreApplication::translate("Firmware", "Support for PPM internal module hack"));
|
|
||||||
addOpenTxTaranisOptions(firmware);
|
addOpenTxTaranisOptions(firmware);
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* FrSky X7 board */
|
/* FrSky X7 board */
|
||||||
firmware = new OpenTxFirmware("opentx-x7", QCoreApplication::translate("Firmware", "FrSky Taranis X7 / X7S"), BOARD_TARANIS_X7);
|
firmware = new OpenTxFirmware("opentx-x7", Firmware::tr("FrSky Taranis X7 / X7S"), BOARD_TARANIS_X7);
|
||||||
addOpenTxTaranisOptions(firmware);
|
addOpenTxTaranisOptions(firmware, false);
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* FrSky X-Lite board */
|
/* FrSky X-Lite board */
|
||||||
firmware = new OpenTxFirmware("opentx-xlite", QCoreApplication::translate("Firmware", "FrSky Taranis X-Lite"), BOARD_TARANIS_XLITE);
|
firmware = new OpenTxFirmware("opentx-xlite", Firmware::tr("FrSky Taranis X-Lite"), BOARD_TARANIS_XLITE);
|
||||||
// firmware->addOption("stdr9m", QCoreApplication::translate("Firmware", "Use JR-sized R9M module"));
|
// firmware->addOption("stdr9m", Firmware::tr("Use JR-sized R9M module"));
|
||||||
addOpenTxTaranisOptions(firmware);
|
addOpenTxTaranisOptions(firmware, false);
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* FrSky X10 board */
|
/* FrSky X10 board */
|
||||||
firmware = new OpenTxFirmware("opentx-x10", QCoreApplication::translate("Firmware", "FrSky Horus X10 / X10S"), BOARD_X10);
|
firmware = new OpenTxFirmware("opentx-x10", Firmware::tr("FrSky Horus X10 / X10S"), BOARD_X10);
|
||||||
addOpenTxFrskyOptions(firmware);
|
addOpenTxFrskyOptions(firmware);
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* FrSky Horus board */
|
/* FrSky X12 (Horus) board */
|
||||||
firmware = new OpenTxFirmware("opentx-x12s", QCoreApplication::translate("Firmware", "FrSky Horus X12S"), BOARD_X12S);
|
firmware = new OpenTxFirmware("opentx-x12s", Firmware::tr("FrSky Horus X12S"), BOARD_X12S);
|
||||||
addOpenTxFrskyOptions(firmware);
|
addOpenTxFrskyOptions(firmware);
|
||||||
firmware->addOption("pcbdev", QCoreApplication::translate("Firmware", "Use ONLY with first DEV pcb version"));
|
firmware->addOption("pcbdev", Firmware::tr("Use ONLY with first DEV pcb version"));
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* 9XR-Pro */
|
/* 9XR-Pro */
|
||||||
firmware = new OpenTxFirmware("opentx-9xrpro", QCoreApplication::translate("Firmware", "Turnigy 9XR-PRO"), BOARD_9XRPRO);
|
firmware = new OpenTxFirmware("opentx-9xrpro", Firmware::tr("Turnigy 9XR-PRO"), BOARD_9XRPRO);
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable HELI menu and cyclic mix support"));
|
addOpenTxArm9xOptions(firmware, false);
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
// firmware->addOption("bluetooth", QCoreApplication::translate("Firmware", "Bluetooth interface"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
firmware->addOption("multimodule", QCoreApplication::translate("Firmware", "Support for the DIY-Multiprotocol-TX-Module"));
|
|
||||||
firmware->addOption("eu", QCoreApplication::translate("Firmware", "Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
|
||||||
|
|
||||||
/* 9XR board with M128 chip */
|
|
||||||
firmware = new OpenTxFirmware("opentx-9xr128", QCoreApplication::translate("Firmware", "Turnigy 9XR with m128 chip"), BOARD_M128);
|
|
||||||
firmware->addOptions(extr_options);
|
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable heli menu and cyclic mix support"));
|
|
||||||
firmware->addOption("templates", QCoreApplication::translate("Firmware", "Enable TEMPLATES menu"));
|
|
||||||
firmware->addOption("nosplash", QCoreApplication::translate("Firmware", "No splash screen"));
|
|
||||||
firmware->addOption("nofp", QCoreApplication::translate("Firmware", "No flight modes"));
|
|
||||||
firmware->addOption("nocurves", QCoreApplication::translate("Firmware", "Disable curves menus"));
|
|
||||||
firmware->addOption("audio", QCoreApplication::translate("Firmware", "Support for radio modified with regular speaker"));
|
|
||||||
firmware->addOption("voice", QCoreApplication::translate("Firmware", "Used if you have modified your radio with voice mode"));
|
|
||||||
firmware->addOption("haptic", QCoreApplication::translate("Firmware", "Used if you have modified your radio with haptic mode"));
|
|
||||||
// NOT TESTED firmware->addOption("PXX", QCoreApplication::translate("Firmware", "Support of FrSky PXX protocol"));
|
|
||||||
firmware->addOption("DSM2", QCoreApplication::translate("Firmware", "Support for DSM2 modules"));
|
|
||||||
firmware->addOption("ppmca", QCoreApplication::translate("Firmware", "PPM center adjustment in limits"));
|
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("symlimits", QCoreApplication::translate("Firmware", "Symetrical Limits"));
|
|
||||||
firmware->addOption("potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
firmware->addOption("thrtrace", QCoreApplication::translate("Firmware", "Enable the throttle trace in Statistics"));
|
|
||||||
firmware->addOption("pgbar", QCoreApplication::translate("Firmware", "EEprom write Progress bar"));
|
|
||||||
firmware->addOption("imperial", QCoreApplication::translate("Firmware", "Imperial units"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
|
||||||
|
|
||||||
/* 9XR board */
|
|
||||||
firmware = new OpenTxFirmware("opentx-9xr", QCoreApplication::translate("Firmware", "Turnigy 9XR"), BOARD_STOCK);
|
|
||||||
firmware->addOptions(extr_options);
|
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable heli menu and cyclic mix support"));
|
|
||||||
firmware->addOption("templates", QCoreApplication::translate("Firmware", "Enable TEMPLATES menu"));
|
|
||||||
firmware->addOption("nosplash", QCoreApplication::translate("Firmware", "No splash screen"));
|
|
||||||
firmware->addOption("nofp", QCoreApplication::translate("Firmware", "No flight modes"));
|
|
||||||
firmware->addOption("nocurves", QCoreApplication::translate("Firmware", "Disable curves menus"));
|
|
||||||
firmware->addOption("audio", QCoreApplication::translate("Firmware", "Support for radio modified with regular speaker"));
|
|
||||||
firmware->addOption("voice", QCoreApplication::translate("Firmware", "Used if you have modified your radio with voice mode"));
|
|
||||||
firmware->addOption("haptic", QCoreApplication::translate("Firmware", "Used if you have modified your radio with haptic mode"));
|
|
||||||
// NOT TESTED firmware->addOption("PXX", QCoreApplication::translate("Firmware", "Support of FrSky PXX protocol"));
|
|
||||||
firmware->addOption("DSM2", QCoreApplication::translate("Firmware", "Support for DSM2 modules"));
|
|
||||||
firmware->addOption("ppmca", QCoreApplication::translate("Firmware", "PPM center adjustment in limits"));
|
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("symlimits", QCoreApplication::translate("Firmware", "Symetrical Limits"));
|
|
||||||
firmware->addOption("potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
firmware->addOption("thrtrace", QCoreApplication::translate("Firmware", "Enable the throttle trace in Statistics"));
|
|
||||||
firmware->addOption("pgbar", QCoreApplication::translate("Firmware", "EEprom write Progress bar"));
|
|
||||||
firmware->addOption("imperial", QCoreApplication::translate("Firmware", "Imperial units"));
|
|
||||||
firmware->addOption("nowshh", QCoreApplication::translate("Firmware", "No Winged Shadow How High support"));
|
|
||||||
firmware->addOption("novario", QCoreApplication::translate("Firmware", "No vario support"));
|
|
||||||
firmware->addOption("nogps", QCoreApplication::translate("Firmware", "No GPS support"));
|
|
||||||
firmware->addOption("nogauges", QCoreApplication::translate("Firmware", "No gauges in the custom telemetry screen"));
|
|
||||||
firmware->addOption("stickrev", QCoreApplication::translate("Firmware", "Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
|
||||||
|
|
||||||
/* 9x board */
|
|
||||||
firmware = new OpenTxFirmware("opentx-9x", QCoreApplication::translate("Firmware", "9X with stock board"), BOARD_STOCK);
|
|
||||||
firmware->addOptions(ext_options);
|
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable heli menu and cyclic mix support"));
|
|
||||||
firmware->addOption("templates", QCoreApplication::translate("Firmware", "Enable TEMPLATES menu"));
|
|
||||||
firmware->addOption("nosplash", QCoreApplication::translate("Firmware", "No splash screen"));
|
|
||||||
firmware->addOption("nofp", QCoreApplication::translate("Firmware", "No flight modes"));
|
|
||||||
firmware->addOption("nocurves", QCoreApplication::translate("Firmware", "Disable curves menus"));
|
|
||||||
firmware->addOption("audio", QCoreApplication::translate("Firmware", "Support for radio modified with regular speaker"));
|
|
||||||
firmware->addOption("voice", QCoreApplication::translate("Firmware", "Used if you have modified your radio with voice mode"));
|
|
||||||
firmware->addOption("haptic", QCoreApplication::translate("Firmware", "Used if you have modified your radio with haptic mode"));
|
|
||||||
// NOT TESTED firmware->addOption("PXX", QCoreApplication::translate("Firmware", "Support of FrSky PXX protocol"));
|
|
||||||
firmware->addOption("DSM2", QCoreApplication::translate("Firmware", "Support for DSM2 modules"));
|
|
||||||
firmware->addOption("ppmca", QCoreApplication::translate("Firmware", "PPM center adjustment in limits"));
|
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("symlimits", QCoreApplication::translate("Firmware", "Symetrical Limits"));
|
|
||||||
firmware->addOptions(nav_options);
|
|
||||||
firmware->addOption("sp22", QCoreApplication::translate("Firmware", "SmartieParts 2.2 Backlight support"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("dblkeys", QCoreApplication::translate("Firmware", "Enable resetting values by pressing up and down at the same time"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
firmware->addOption("thrtrace", QCoreApplication::translate("Firmware", "Enable the throttle trace in Statistics"));
|
|
||||||
firmware->addOption("pgbar", QCoreApplication::translate("Firmware", "EEprom write progress bar"));
|
|
||||||
firmware->addOption("imperial", QCoreApplication::translate("Firmware", "Imperial units"));
|
|
||||||
firmware->addOption("nowshh", QCoreApplication::translate("Firmware", "No Winged Shadow How High support"));
|
|
||||||
firmware->addOption("novario", QCoreApplication::translate("Firmware", "No vario support"));
|
|
||||||
firmware->addOption("nogps", QCoreApplication::translate("Firmware", "No GPS support"));
|
|
||||||
firmware->addOption("nogauges", QCoreApplication::translate("Firmware", "No gauges in the custom telemetry screen"));
|
|
||||||
firmware->addOption("fasoffset", QCoreApplication::translate("Firmware", "Allow compensating for offset errors in FrSky FAS current sensors"));
|
|
||||||
firmware->addOption("stickrev", QCoreApplication::translate("Firmware", "Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
|
||||||
|
|
||||||
/* 9x board with M128 chip */
|
|
||||||
firmware = new OpenTxFirmware("opentx-9x128", QCoreApplication::translate("Firmware", "9X with stock board and m128 chip"), BOARD_M128);
|
|
||||||
firmware->addOptions(ext_options);
|
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable heli menu and cyclic mix support"));
|
|
||||||
firmware->addOption("templates", QCoreApplication::translate("Firmware", "Enable TEMPLATES menu"));
|
|
||||||
firmware->addOption("nosplash", QCoreApplication::translate("Firmware", "No splash screen"));
|
|
||||||
firmware->addOption("nofp", QCoreApplication::translate("Firmware", "No flight modes"));
|
|
||||||
firmware->addOption("nocurves", QCoreApplication::translate("Firmware", "Disable curves menus"));
|
|
||||||
firmware->addOption("audio", QCoreApplication::translate("Firmware", "Support for radio modified with regular speaker"));
|
|
||||||
firmware->addOption("voice", QCoreApplication::translate("Firmware", "Used if you have modified your radio with voice mode"));
|
|
||||||
firmware->addOption("haptic", QCoreApplication::translate("Firmware", "Used if you have modified your radio with haptic mode"));
|
|
||||||
// NOT TESTED firmware->addOption("PXX", QCoreApplication::translate("Firmware", "Support of FrSky PXX protocol"));
|
|
||||||
firmware->addOption("DSM2", QCoreApplication::translate("Firmware", "Support for DSM2 modules"));
|
|
||||||
firmware->addOption("ppmca", QCoreApplication::translate("Firmware", "PPM center adjustment in limits"));
|
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("symlimits", QCoreApplication::translate("Firmware", "Symetrical Limits"));
|
|
||||||
firmware->addOptions(nav_options);
|
|
||||||
firmware->addOption("sp22", QCoreApplication::translate("Firmware", "SmartieParts 2.2 Backlight support"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("dblkeys", QCoreApplication::translate("Firmware", "Enable resetting values by pressing up and down at the same time"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
firmware->addOption("thrtrace", QCoreApplication::translate("Firmware", "Enable the throttle trace in Statistics"));
|
|
||||||
firmware->addOption("pgbar", QCoreApplication::translate("Firmware", "EEprom write Progress bar"));
|
|
||||||
firmware->addOption("imperial", QCoreApplication::translate("Firmware", "Imperial units"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* ar9x board */
|
/* ar9x board */
|
||||||
firmware = new OpenTxFirmware("opentx-ar9x", QCoreApplication::translate("Firmware", "9X with AR9X board"), BOARD_AR9X);
|
firmware = new OpenTxFirmware("opentx-ar9x", Firmware::tr("9X with AR9X board"), BOARD_AR9X);
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable HELI menu and cyclic mix support"));
|
addOpenTxArm9xOptions(firmware);
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
//firmware->addOption("rtc", Firmware::tr("Optional RTC added"));
|
||||||
firmware->addOption("potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation"));
|
//firmware->addOption("volume", Firmware::tr("i2c volume control added"));
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("dblkeys", QCoreApplication::translate("Firmware", "Enable resetting values by pressing up and down at the same time"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
// firmware->addOption("bluetooth", QCoreApplication::translate("Firmware", "Bluetooth interface"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
// firmware->addOption("rtc", QCoreApplication::translate("Firmware", "Optional RTC added"));
|
|
||||||
// firmware->addOption("volume", QCoreApplication::translate("Firmware", "i2c volume control added"));
|
|
||||||
firmware->addOption("multimodule", QCoreApplication::translate("Firmware", "Support for the DIY-Multiprotocol-TX-Module"));
|
|
||||||
firmware->addOption("eu", QCoreApplication::translate("Firmware", "Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* Sky9x board */
|
/* Sky9x board */
|
||||||
firmware = new OpenTxFirmware("opentx-sky9x", QCoreApplication::translate("Firmware", "9X with Sky9x board"), BOARD_SKY9X);
|
firmware = new OpenTxFirmware("opentx-sky9x", Firmware::tr("9X with Sky9x board"), BOARD_SKY9X);
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable HELI menu and cyclic mix support"));
|
addOpenTxArm9xOptions(firmware);
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("dblkeys", QCoreApplication::translate("Firmware", "Enable resetting values by pressing up and down at the same time"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
// firmware->addOption("bluetooth", QCoreApplication::translate("Firmware", "Bluetooth interface"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
firmware->addOption("multimodule", QCoreApplication::translate("Firmware", "Support for the DIY-Multiprotocol-TX-Module"));
|
|
||||||
firmware->addOption("eu", QCoreApplication::translate("Firmware", "Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
registerOpenTxFirmware(firmware);
|
||||||
|
|
||||||
/* Gruvin9x board */
|
// These are kept only for import purposes, marked as deprecated to hide from UI.
|
||||||
firmware = new OpenTxFirmware("opentx-gruvin9x", QCoreApplication::translate("Firmware", "9X with Gruvin9x board"), BOARD_GRUVIN9X);
|
registerOpenTxFirmware(new OpenTxFirmware("opentx-9xr", Firmware::tr("Turnigy 9XR"), BOARD_STOCK), true);
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable heli menu and cyclic mix support"));
|
registerOpenTxFirmware(new OpenTxFirmware("opentx-9xr128", Firmware::tr("Turnigy 9XR with m128 chip"), BOARD_M128), true);
|
||||||
firmware->addOption("templates", QCoreApplication::translate("Firmware", "Enable TEMPLATES menu"));
|
registerOpenTxFirmware(new OpenTxFirmware("opentx-9x", Firmware::tr("9X with stock board"), BOARD_STOCK), true);
|
||||||
firmware->addOption("nofp", QCoreApplication::translate("Firmware", "No flight modes"));
|
registerOpenTxFirmware(new OpenTxFirmware("opentx-9x128", Firmware::tr("9X with stock board and m128 chip"), BOARD_M128), true);
|
||||||
firmware->addOption("nocurves", QCoreApplication::translate("Firmware", "Disable curves menus"));
|
registerOpenTxFirmware(new OpenTxFirmware("opentx-gruvin9x", Firmware::tr("9X with Gruvin9x board"), BOARD_GRUVIN9X), true);
|
||||||
firmware->addOption("sdcard", QCoreApplication::translate("Firmware", "Support for SD memory card"));
|
registerOpenTxFirmware(new OpenTxFirmware("opentx-mega2560", Firmware::tr("DIY MEGA2560 radio"), BOARD_MEGA2560), true);
|
||||||
firmware->addOption("voice", QCoreApplication::translate("Firmware", "Used if you have modified your radio with voice mode"));
|
|
||||||
firmware->addOption("PXX", QCoreApplication::translate("Firmware", "Support of FrSky PXX protocol"));
|
|
||||||
firmware->addOptions(dsm2_options);
|
|
||||||
firmware->addOption("ppmca", QCoreApplication::translate("Firmware", "PPM center adjustment in limits"));
|
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("symlimits", QCoreApplication::translate("Firmware", "Symetrical Limits"));
|
|
||||||
firmware->addOption("potscroll", QCoreApplication::translate("Firmware", "Pots use in menus navigation"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("dblkeys", QCoreApplication::translate("Firmware", "Enable resetting values by pressing up and down at the same time"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
firmware->addOption("pgbar", QCoreApplication::translate("Firmware", "EEprom write Progress bar"));
|
|
||||||
firmware->addOption("imperial", QCoreApplication::translate("Firmware", "Imperial units"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
|
||||||
|
|
||||||
/* MEGA2560 board */
|
|
||||||
firmware = new OpenTxFirmware("opentx-mega2560", QCoreApplication::translate("Firmware", "DIY MEGA2560 radio"), BOARD_MEGA2560);
|
|
||||||
addOpenTxLcdOptions(firmware);
|
|
||||||
firmware->addOption("PWR", QCoreApplication::translate("Firmware", "Power management by soft-off circuitry"));
|
|
||||||
firmware->addOptions(ext_options);
|
|
||||||
firmware->addOption("PXX", QCoreApplication::translate("Firmware", "Support of FrSky PXX protocol"));
|
|
||||||
firmware->addOptions(dsm2_options);
|
|
||||||
firmware->addOption("heli", QCoreApplication::translate("Firmware", "Enable heli menu and cyclic mix support"));
|
|
||||||
firmware->addOption("templates", QCoreApplication::translate("Firmware", "Enable TEMPLATES menu"));
|
|
||||||
firmware->addOption("nofp", QCoreApplication::translate("Firmware", "No flight modes"));
|
|
||||||
firmware->addOption("nocurves", QCoreApplication::translate("Firmware", "Disable curves menus"));
|
|
||||||
firmware->addOption("sdcard", QCoreApplication::translate("Firmware", "Support for SD memory card"));
|
|
||||||
firmware->addOption("audio", QCoreApplication::translate("Firmware", "Support for radio modified with regular speaker"));
|
|
||||||
//firmware->addOption("voice", QCoreApplication::translate("Firmware", "Used if you have modified your radio with voice mode"));
|
|
||||||
addOpenTxVoiceOptions(firmware);
|
|
||||||
firmware->addOption("haptic", QCoreApplication::translate("Firmware", "Used if you have modified your radio with haptic mode"));
|
|
||||||
firmware->addOption("ppmca", QCoreApplication::translate("Firmware", "PPM center adjustment in limits"));
|
|
||||||
firmware->addOption("gvars", QCoreApplication::translate("Firmware", "Global variables"), GVARS_VARIANT);
|
|
||||||
firmware->addOption("symlimits", QCoreApplication::translate("Firmware", "Symetrical Limits"));
|
|
||||||
firmware->addOption("autosource", QCoreApplication::translate("Firmware", "In model setup menus automatically set source by moving the control"));
|
|
||||||
firmware->addOption("autoswitch", QCoreApplication::translate("Firmware", "In model setup menus automatically set switch by moving the control"));
|
|
||||||
firmware->addOption("dblkeys", QCoreApplication::translate("Firmware", "Enable resetting values by pressing up and down at the same time"));
|
|
||||||
firmware->addOption("nographics", QCoreApplication::translate("Firmware", "No graphical check boxes and sliders"));
|
|
||||||
firmware->addOption("battgraph", QCoreApplication::translate("Firmware", "Battery graph"));
|
|
||||||
firmware->addOption("nobold", QCoreApplication::translate("Firmware", "Don't use bold font for highlighting active items"));
|
|
||||||
firmware->addOption("pgbar", QCoreApplication::translate("Firmware", "EEprom write Progress bar"));
|
|
||||||
firmware->addOption("imperial", QCoreApplication::translate("Firmware", "Imperial units"));
|
|
||||||
firmware->addOption("sqt5font", QCoreApplication::translate("Firmware", "Use alternative SQT5 font"));
|
|
||||||
addOpenTxCommonOptions(firmware);
|
|
||||||
registerOpenTxFirmware(firmware);
|
|
||||||
|
|
||||||
Firmware::setDefaultVariant(Firmware::getFirmwareForId("opentx-x9d+"));
|
Firmware::setDefaultVariant(Firmware::getFirmwareForId("opentx-x9d+"));
|
||||||
Firmware::setCurrentVariant(Firmware::getDefaultVariant());
|
Firmware::setCurrentVariant(Firmware::getDefaultVariant());
|
||||||
|
|||||||
@@ -106,19 +106,6 @@ class OpenTxFirmware: public Firmware
|
|||||||
addLanguage("pl");
|
addLanguage("pl");
|
||||||
addLanguage("pt");
|
addLanguage("pt");
|
||||||
addLanguage("se");
|
addLanguage("se");
|
||||||
|
|
||||||
addTTSLanguage("en");
|
|
||||||
addTTSLanguage("cz");
|
|
||||||
addTTSLanguage("de");
|
|
||||||
addTTSLanguage("es");
|
|
||||||
addTTSLanguage("fr");
|
|
||||||
addTTSLanguage("hu");
|
|
||||||
addTTSLanguage("it");
|
|
||||||
addTTSLanguage("nl");
|
|
||||||
addTTSLanguage("pl");
|
|
||||||
addTTSLanguage("pt");
|
|
||||||
addTTSLanguage("se");
|
|
||||||
addTTSLanguage("sk");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Firmware * getFirmwareVariant(const QString & id);
|
virtual Firmware * getFirmwareVariant(const QString & id);
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ QString RawSwitch::toString(Board::Type board, const GeneralSettings * const gen
|
|||||||
if (generalSettings)
|
if (generalSettings)
|
||||||
swName = QString(generalSettings->switchName[qr.quot]);
|
swName = QString(generalSettings->switchName[qr.quot]);
|
||||||
if (swName.isEmpty())
|
if (swName.isEmpty())
|
||||||
swName = getSwitchInfo(board, qr.quot).name;
|
swName = Boards::getSwitchInfo(board, qr.quot).name;
|
||||||
return swName + directionIndicators.at(qr.rem > -1 && qr.rem < directionIndicators.size() ? qr.rem : 1);
|
return swName + directionIndicators.at(qr.rem > -1 && qr.rem < directionIndicators.size() ? qr.rem : 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -21,18 +21,19 @@
|
|||||||
#ifndef _MACROS_H_
|
#ifndef _MACROS_H_
|
||||||
#define _MACROS_H_
|
#define _MACROS_H_
|
||||||
|
|
||||||
|
#include "constants.h"
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
// #define DIM(arr) (sizeof((arr))/sizeof((arr)[0]))
|
#define DIM(arr__) (std::end(arr__) - std::begin(arr__))
|
||||||
// new way for c++11
|
|
||||||
#define DIM(arr__) ((size_t)(std::end((arr__)) - std::begin((arr__))))
|
|
||||||
|
|
||||||
#ifndef CONCATENATE
|
#ifndef CONCATENATE
|
||||||
#define CONCATENATE_IMPL(A, B) A ## B
|
#define CONCATENATE_IMPL(A, B) A ## B
|
||||||
#define CONCATENATE(A, B) CONCATENATE_IMPL(A, B)
|
#define CONCATENATE(A, B) CONCATENATE_IMPL(A, B)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define CHECK_IN_ARRAY(T, index) ((index) >= 0 && int(index) < DIM(T) ? T[(index)] : CPN_STR_UNKNOWN_ITEM)
|
||||||
|
|
||||||
#define CREATE_ENUM_STREAM_OPS3(functype, type, datatype) \
|
#define CREATE_ENUM_STREAM_OPS3(functype, type, datatype) \
|
||||||
functype QDataStream& operator << (QDataStream &out, type &e) { return out << (datatype&)e; } \
|
functype QDataStream& operator << (QDataStream &out, type &e) { return out << (datatype&)e; } \
|
||||||
functype QDataStream& operator >> (QDataStream &in, type &e) { in >> (datatype&)e; return in; }
|
functype QDataStream& operator >> (QDataStream &in, type &e) { in >> (datatype&)e; return in; }
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkProxyFactory>
|
#include <QNetworkProxyFactory>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
@@ -129,7 +130,10 @@ MainWindow::MainWindow():
|
|||||||
else {
|
else {
|
||||||
if (!g.previousVersion().isEmpty())
|
if (!g.previousVersion().isEmpty())
|
||||||
g.warningId(g.warningId() | AppMessages::MSG_UPGRADED);
|
g.warningId(g.warningId() | AppMessages::MSG_UPGRADED);
|
||||||
QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates()));
|
if (checkProfileRadioExists(g.sessionId()))
|
||||||
|
QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates()));
|
||||||
|
else
|
||||||
|
g.warningId(g.warningId() | AppMessages::MSG_NO_RADIO_TYPE);
|
||||||
}
|
}
|
||||||
QTimer::singleShot(updateDelay, this, SLOT(displayWarnings()));
|
QTimer::singleShot(updateDelay, this, SLOT(displayWarnings()));
|
||||||
|
|
||||||
@@ -195,39 +199,21 @@ void MainWindow::initWindowOptions()
|
|||||||
|
|
||||||
void MainWindow::displayWarnings()
|
void MainWindow::displayWarnings()
|
||||||
{
|
{
|
||||||
using namespace AppMessages;
|
static int shownMsgs = 0;
|
||||||
static uint shownMsgs = 0;
|
const int showMsgs = g.warningId();
|
||||||
int showMsgs = g.warningId();
|
int msgId = 0;
|
||||||
int msgId;
|
for (int i = 1; i < AppMessages::MSG_ENUM_END; i <<= 1) {
|
||||||
QString infoTxt;
|
if ((showMsgs & i) && !(shownMsgs & i)) {
|
||||||
|
msgId = i;
|
||||||
if ((showMsgs & MSG_WELCOME) && !(shownMsgs & MSG_WELCOME)) {
|
break;
|
||||||
infoTxt = CPN_STR_MSG_WELCOME.arg(VERSION);
|
}
|
||||||
msgId = MSG_WELCOME;
|
|
||||||
}
|
}
|
||||||
else if ((showMsgs & MSG_UPGRADED) && !(shownMsgs & MSG_UPGRADED)) {
|
if (!msgId)
|
||||||
infoTxt = CPN_STR_MSG_UPGRADED.arg(VERSION);
|
|
||||||
msgId = MSG_UPGRADED;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return;
|
return;
|
||||||
}
|
AppMessages::displayMessage(msgId, this);
|
||||||
|
|
||||||
QMessageBox msgBox(this);
|
|
||||||
msgBox.setWindowTitle(CPN_STR_APP_NAME);
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
|
||||||
msgBox.setInformativeText(infoTxt);
|
|
||||||
QCheckBox * cb = new QCheckBox(tr("Show this message again at next startup?"), &msgBox);
|
|
||||||
msgBox.setCheckBox(cb);
|
|
||||||
|
|
||||||
msgBox.exec();
|
|
||||||
|
|
||||||
shownMsgs |= msgId;
|
shownMsgs |= msgId;
|
||||||
if (!cb->isChecked())
|
if (shownMsgs != showMsgs)
|
||||||
g.warningId(showMsgs & ~msgId);
|
displayWarnings(); // in case more warnings need showing
|
||||||
|
|
||||||
displayWarnings(); // in case more warnings need showing
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::doAutoUpdates()
|
void MainWindow::doAutoUpdates()
|
||||||
@@ -773,12 +759,21 @@ void MainWindow::openRecentFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MainWindow::checkProfileRadioExists(int profId)
|
||||||
|
{
|
||||||
|
const QString profType = g.getProfile(profId).fwType();
|
||||||
|
return (Firmware::getFirmwareForId(profType)->getFirmwareBase()->getId() == profType.section('-', 0, 1));
|
||||||
|
}
|
||||||
|
|
||||||
bool MainWindow::loadProfileId(const unsigned pid) // TODO Load all variables - Also HW!
|
bool MainWindow::loadProfileId(const unsigned pid) // TODO Load all variables - Also HW!
|
||||||
{
|
{
|
||||||
if (pid >= MAX_PROFILES)
|
if (pid >= MAX_PROFILES)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Firmware * newFw = Firmware::getFirmwareForId(g.profile[pid].fwType());
|
Firmware * newFw = Firmware::getFirmwareForId(g.getProfile(pid).fwType());
|
||||||
|
// warn if the selected profile doesn't exist
|
||||||
|
if (!checkProfileRadioExists(pid))
|
||||||
|
AppMessages::displayMessage(AppMessages::MSG_NO_RADIO_TYPE, this);
|
||||||
// warn if we're switching between incompatible board types and any files have been modified
|
// warn if we're switching between incompatible board types and any files have been modified
|
||||||
if (!Boards::isBoardCompatible(Firmware::getCurrentVariant()->getBoard(), newFw->getBoard()) && anyChildrenDirty()) {
|
if (!Boards::isBoardCompatible(Firmware::getCurrentVariant()->getBoard(), newFw->getBoard()) && anyChildrenDirty()) {
|
||||||
if (QMessageBox::question(this, CPN_STR_APP_NAME,
|
if (QMessageBox::question(this, CPN_STR_APP_NAME,
|
||||||
@@ -1628,6 +1623,7 @@ int MainWindow::newProfile(bool loadProfile)
|
|||||||
|
|
||||||
g.profile[i].init();
|
g.profile[i].init();
|
||||||
g.profile[i].name(tr("New Radio"));
|
g.profile[i].name(tr("New Radio"));
|
||||||
|
g.profile[i].fwType(Firmware::getDefaultVariant()->getId());
|
||||||
|
|
||||||
if (loadProfile) {
|
if (loadProfile) {
|
||||||
if (loadProfileId(i))
|
if (loadProfileId(i))
|
||||||
|
|||||||
@@ -161,6 +161,8 @@ class MainWindow : public QMainWindow
|
|||||||
bool readEepromFromRadio(const QString & filename);
|
bool readEepromFromRadio(const QString & filename);
|
||||||
bool readFirmwareFromRadio(const QString & filename);
|
bool readFirmwareFromRadio(const QString & filename);
|
||||||
|
|
||||||
|
bool checkProfileRadioExists(int profId);
|
||||||
|
|
||||||
QMdiArea *mdiArea;
|
QMdiArea *mdiArea;
|
||||||
QSignalMapper *windowMapper;
|
QSignalMapper *windowMapper;
|
||||||
|
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ bool SimulatorWidget::setStartupData(const QByteArray & dataSource, bool fromFil
|
|||||||
}
|
}
|
||||||
// Assume a byte array of radio data was passed, load it.
|
// Assume a byte array of radio data was passed, load it.
|
||||||
else if (!dataSource.isEmpty()) {
|
else if (!dataSource.isEmpty()) {
|
||||||
ret = firmware->getEEpromInterface()->load(simuData, (uint8_t *)dataSource.constData(), getEEpromSize(m_board));
|
ret = firmware->getEEpromInterface()->load(simuData, (uint8_t *)dataSource.constData(), Boards::getEEpromSize(m_board));
|
||||||
startupData = dataSource; // save the data for start()
|
startupData = dataSource; // save the data for start()
|
||||||
}
|
}
|
||||||
// we're :-(
|
// we're :-(
|
||||||
@@ -374,7 +374,7 @@ bool SimulatorWidget::saveTempData()
|
|||||||
fh.close();
|
fh.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!firmware->getEEpromInterface()->load(radioData, (uint8_t *)startupData.constData(), getEEpromSize(m_board))) {
|
if (!firmware->getEEpromInterface()->load(radioData, (uint8_t *)startupData.constData(), Boards::getEEpromSize(m_board))) {
|
||||||
error = tr("Error saving data: could not get data from simulator interface.");
|
error = tr("Error saving data: could not get data from simulator interface.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -489,7 +489,7 @@ void SimulatorWidget::onSimulatorStopped()
|
|||||||
m_heartbeatTimer.invalidate();
|
m_heartbeatTimer.invalidate();
|
||||||
|
|
||||||
if (simulator && !simulator->isRunning() && saveTempRadioData) {
|
if (simulator && !simulator->isRunning() && saveTempRadioData) {
|
||||||
startupData.fill(0, getEEpromSize(m_board));
|
startupData.fill(0, Boards::getEEpromSize(m_board));
|
||||||
simulator->readRadioData(startupData);
|
simulator->readRadioData(startupData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,12 @@
|
|||||||
#ifndef _WARNINGS_H_
|
#ifndef _WARNINGS_H_
|
||||||
#define _WARNINGS_H_
|
#define _WARNINGS_H_
|
||||||
|
|
||||||
|
#include "appdata.h"
|
||||||
|
|
||||||
|
#include <QtCore>
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#define CPN_STR_MSG_WELCOME QCoreApplication::translate("Companion", \
|
#define CPN_STR_MSG_WELCOME QCoreApplication::translate("Companion", \
|
||||||
"<p><b>Welcome to OpenTX v%1.</b></p>" \
|
"<p><b>Welcome to OpenTX v%1.</b></p>" \
|
||||||
"<p>As the first step, please configure the initial Radio Profile by selecting your Radio Type, Menu Language, and Build Options.</p>" \
|
"<p>As the first step, please configure the initial Radio Profile by selecting your Radio Type, Menu Language, and Build Options.</p>" \
|
||||||
@@ -36,17 +42,64 @@
|
|||||||
"<p>Please visit <a href='http://www.open-tx.org'>open-tx.org</a> for release notes and other documentation.</p>" \
|
"<p>Please visit <a href='http://www.open-tx.org'>open-tx.org</a> for release notes and other documentation.</p>" \
|
||||||
"- The OpenTX Team.")
|
"- The OpenTX Team.")
|
||||||
|
|
||||||
namespace AppMessages {
|
#define CPN_STR_MSG_NO_RADIO_TYPE QCoreApplication::translate("Companion", \
|
||||||
|
"<p>The radio type in the selected profile does not exist. Using the default type instead.</p> <p><b>Please update your profile settings!</b></p>")
|
||||||
|
|
||||||
|
class AppMessages
|
||||||
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS("AppMessages")
|
||||||
|
public:
|
||||||
|
// These are used for saving "[don't] show this message again" user preferences.
|
||||||
|
enum MessageCodes {
|
||||||
|
MSG_NONE = 0,
|
||||||
|
MSG_WELCOME = 0x01,
|
||||||
|
MSG_UPGRADED = 0x02,
|
||||||
|
MSG_RESERVED = 0x04, // reserved due to legacy code
|
||||||
|
MSG_NO_RADIO_TYPE = 0x08,
|
||||||
|
MSG_ENUM_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static void displayMessage(int id, QWidget * parent = nullptr)
|
||||||
|
{
|
||||||
|
QString infoTxt;
|
||||||
|
QMessageBox::Icon icon = QMessageBox::Information;
|
||||||
|
bool transient = false;
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
case MSG_WELCOME:
|
||||||
|
infoTxt = CPN_STR_MSG_WELCOME.arg(VERSION);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MSG_UPGRADED:
|
||||||
|
infoTxt = CPN_STR_MSG_UPGRADED.arg(VERSION);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MSG_NO_RADIO_TYPE:
|
||||||
|
infoTxt = CPN_STR_MSG_NO_RADIO_TYPE;
|
||||||
|
icon = QMessageBox::Warning;
|
||||||
|
transient = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMessageBox msgBox(parent);
|
||||||
|
msgBox.setWindowTitle(CPN_STR_APP_NAME);
|
||||||
|
msgBox.setIcon(icon);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setText(infoTxt);
|
||||||
|
|
||||||
|
if (!transient)
|
||||||
|
msgBox.setCheckBox(new QCheckBox(tr("Show this message again at next startup?")));
|
||||||
|
|
||||||
|
msgBox.exec();
|
||||||
|
|
||||||
|
if (transient || (msgBox.checkBox() && !msgBox.checkBox()->isChecked()))
|
||||||
|
g.warningId(g.warningId() & ~id);
|
||||||
|
}
|
||||||
|
|
||||||
// These are used for saving "[don't] show this message again" user preferences.
|
|
||||||
enum MessageCodes {
|
|
||||||
MSG_NONE = 0,
|
|
||||||
MSG_WELCOME = 0x01,
|
|
||||||
MSG_UPGRADED = 0x02,
|
|
||||||
MSG_RESERVED = 0x04, // reserved due to legacy code
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace AppWarnings
|
|
||||||
|
|
||||||
#endif // _WARNINGS_H_
|
#endif // _WARNINGS_H_
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user