Companion support - DON'T FORGET COMPILE SCRIPT!

This commit is contained in:
Andre Bernet
2014-05-02 14:40:18 +02:00
parent b805b147f3
commit 3b4053d850
8 changed files with 397 additions and 322 deletions
@@ -47,6 +47,7 @@
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define EEPROM_VARIANT 3
@@ -45,6 +45,7 @@
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define EEPROM_VARIANT SIMU_M128_VARIANTS
#define GAUGES
@@ -53,6 +53,7 @@
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define NUM_POTS 3
#define EEPROM_VARIANT 3
@@ -1055,6 +1055,7 @@ void RegisterOpen9xFirmwares()
open9x->addOption("nogps", QObject::tr("No GPS support"));
open9x->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
open9x->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
open9x->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
open9x->addOptions(fai_options);
firmwares.push_back(open9x);
@@ -1121,6 +1122,7 @@ void RegisterOpen9xFirmwares()
open9x->addOption("novario", QObject::tr("No vario support"));
open9x->addOption("nogps", QObject::tr("No GPS support"));
open9x->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
open9x->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
open9x->addOptions(fai_options);
firmwares.push_back(open9x);
@@ -49,6 +49,7 @@
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS
#define GAUGES
+24
View File
@@ -284,6 +284,24 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->serialPortMode->hide();
ui->serialPortLabel->hide();
}
if (!IS_TARANIS(eepromInterface->getBoard())) {
ui->stickReverse1->setChecked(g_eeGeneral.stickReverse & (1 << 0));
ui->stickReverse2->setChecked(g_eeGeneral.stickReverse & (1 << 1));
ui->stickReverse3->setChecked(g_eeGeneral.stickReverse & (1 << 2));
ui->stickReverse4->setChecked(g_eeGeneral.stickReverse & (1 << 3));
connect(ui->stickReverse1, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
connect(ui->stickReverse2, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
connect(ui->stickReverse3, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
connect(ui->stickReverse4, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
}
else {
ui->stickReverseLB->hide();
ui->stickReverse1->hide();
ui->stickReverse2->hide();
ui->stickReverse3->hide();
ui->stickReverse4->hide();
}
}
GeneralEdit::~GeneralEdit()
@@ -291,6 +309,12 @@ GeneralEdit::~GeneralEdit()
delete ui;
}
void GeneralEdit::stickReverseEdited()
{
g_eeGeneral.stickReverse = ((int)ui->stickReverse1->isChecked()) | ((int)ui->stickReverse2->isChecked()<<1) | ((int)ui->stickReverse3->isChecked()<<2) | ((int)ui->stickReverse4->isChecked()<<3);
updateSettings();
}
void GeneralEdit::on_pot1Type_currentIndexChanged(int index)
{
g_eeGeneral.potsType[0] = index;
+1
View File
@@ -130,6 +130,7 @@ private slots:
void unlockSwitchEdited();
void setValues();
void shrink();
void stickReverseEdited();
};
#endif // GENERALEDIT_H
+366 -322
View File
@@ -113,134 +113,6 @@ These will be relevant for all models in the same EEPROM.</string>
<string>Setup</string>
</attribute>
<layout class="QGridLayout" name="gridLayout" columnstretch="1,0,0,0,0">
<item row="26" column="3" colspan="2">
<layout class="QHBoxLayout" name="pxxCountry">
<item>
<widget class="QLabel" name="countrycode_label">
<property name="text">
<string>Country Code</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="countrycode_CB">
<item>
<property name="text">
<string>America</string>
</property>
</item>
<item>
<property name="text">
<string>Japan</string>
</property>
</item>
<item>
<property name="text">
<string>Europe</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="29" column="1">
<widget class="QComboBox" name="stickmodeCB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</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="23" column="1">
<widget class="QComboBox" name="mavbaud_CB">
<item>
<property name="text">
<string>4800 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>9600 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>14400 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>19200 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>38400 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>57600 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>76800 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>115200 Baud</string>
</property>
</item>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_HL">
<property name="text">
@@ -248,6 +120,52 @@ Mode 4:
</property>
</widget>
</item>
<item row="26" column="1">
<widget class="QCheckBox" name="faimode_CB">
<property name="toolTip">
<string>If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_speakerPitch">
<property name="text">
<string>Speaker Pitch (spkr only)</string>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QComboBox" name="hapticLengthCB">
<item>
<property name="text">
<string>X-Short</string>
</property>
</item>
<item>
<property name="text">
<string>Short</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Long</string>
</property>
</item>
<item>
<property name="text">
<string>X-Long</string>
</property>
</item>
</widget>
</item>
<item row="3" column="3" rowspan="2" colspan="2">
<layout class="QGridLayout" name="gridLayout_9" columnstretch="1,0,1,0">
<item row="0" column="0">
@@ -344,6 +262,80 @@ Mode 4:
</item>
</layout>
</item>
<item row="26" column="3" colspan="2">
<layout class="QHBoxLayout" name="pxxCountry">
<item>
<widget class="QLabel" name="countrycode_label">
<property name="text">
<string>Country Code</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="countrycode_CB">
<item>
<property name="text">
<string>America</string>
</property>
</item>
<item>
<property name="text">
<string>Japan</string>
</property>
</item>
<item>
<property name="text">
<string>Europe</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="23" column="1">
<widget class="QComboBox" name="mavbaud_CB">
<item>
<property name="text">
<string>4800 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>9600 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>14400 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>19200 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>38400 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>57600 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>76800 Baud</string>
</property>
</item>
<item>
<property name="text">
<string>115200 Baud</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_beeperlen">
<property name="text">
@@ -396,7 +388,7 @@ Mode 4:
</property>
</widget>
</item>
<item row="30" column="0" colspan="2">
<item row="32" column="0" colspan="2">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -524,15 +516,8 @@ Mode 4:
</property>
</widget>
</item>
<item row="29" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Stick Mode</string>
</property>
</widget>
</item>
<item row="29" column="3">
<widget class="QLabel" name="label_13">
<item row="31" column="3">
<widget class="QLabel" name="stickReverseLB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
@@ -540,7 +525,7 @@ Mode 4:
</sizepolicy>
</property>
<property name="text">
<string>Default Channel Order</string>
<string>Stick reverse</string>
</property>
</widget>
</item>
@@ -638,188 +623,6 @@ Mode 4:
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QComboBox" name="hapticLengthCB">
<item>
<property name="text">
<string>X-Short</string>
</property>
</item>
<item>
<property name="text">
<string>Short</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Long</string>
</property>
</item>
<item>
<property name="text">
<string>X-Long</string>
</property>
</item>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_speakerPitch">
<property name="text">
<string>Speaker Pitch (spkr only)</string>
</property>
</widget>
</item>
<item row="29" column="4">
<widget class="QComboBox" name="channelorderCB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Channel order&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Defines the order of the default mixes created on a new model.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>R E T A</string>
</property>
</item>
<item>
<property name="text">
<string>R E A T</string>
</property>
</item>
<item>
<property name="text">
<string>R T E A</string>
</property>
</item>
<item>
<property name="text">
<string>R T A E</string>
</property>
</item>
<item>
<property name="text">
<string>R A E T</string>
</property>
</item>
<item>
<property name="text">
<string>R A T E</string>
</property>
</item>
<item>
<property name="text">
<string>E R T A</string>
</property>
</item>
<item>
<property name="text">
<string>E R A T</string>
</property>
</item>
<item>
<property name="text">
<string>E T R A</string>
</property>
</item>
<item>
<property name="text">
<string>E T A R</string>
</property>
</item>
<item>
<property name="text">
<string>E A R T</string>
</property>
</item>
<item>
<property name="text">
<string>E A T R</string>
</property>
</item>
<item>
<property name="text">
<string>T R E A</string>
</property>
</item>
<item>
<property name="text">
<string>T R A E</string>
</property>
</item>
<item>
<property name="text">
<string>T E R A</string>
</property>
</item>
<item>
<property name="text">
<string>T E A R</string>
</property>
</item>
<item>
<property name="text">
<string>T A R E</string>
</property>
</item>
<item>
<property name="text">
<string>T A E R</string>
</property>
</item>
<item>
<property name="text">
<string>A R E T</string>
</property>
</item>
<item>
<property name="text">
<string>A R T E</string>
</property>
</item>
<item>
<property name="text">
<string>A E R T</string>
</property>
</item>
<item>
<property name="text">
<string>A E T R</string>
</property>
</item>
<item>
<property name="text">
<string>A T R E</string>
</property>
</item>
<item>
<property name="text">
<string>A T E R</string>
</property>
</item>
</widget>
</item>
<item row="26" column="1">
<widget class="QCheckBox" name="faimode_CB">
<property name="toolTip">
<string>If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="28" column="3" colspan="2">
<layout class="QHBoxLayout" name="gpsFormatLayout">
<item>
@@ -1897,6 +1700,248 @@ Acceptable values are 5v..10v</string>
</property>
</widget>
</item>
<item row="29" column="3">
<widget class="QLabel" name="label_19">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Default Channel Order</string>
</property>
</widget>
</item>
<item row="29" column="4">
<widget class="QComboBox" name="channelorderCB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Channel order&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Defines the order of the default mixes created on a new model.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>R E T A</string>
</property>
</item>
<item>
<property name="text">
<string>R E A T</string>
</property>
</item>
<item>
<property name="text">
<string>R T E A</string>
</property>
</item>
<item>
<property name="text">
<string>R T A E</string>
</property>
</item>
<item>
<property name="text">
<string>R A E T</string>
</property>
</item>
<item>
<property name="text">
<string>R A T E</string>
</property>
</item>
<item>
<property name="text">
<string>E R T A</string>
</property>
</item>
<item>
<property name="text">
<string>E R A T</string>
</property>
</item>
<item>
<property name="text">
<string>E T R A</string>
</property>
</item>
<item>
<property name="text">
<string>E T A R</string>
</property>
</item>
<item>
<property name="text">
<string>E A R T</string>
</property>
</item>
<item>
<property name="text">
<string>E A T R</string>
</property>
</item>
<item>
<property name="text">
<string>T R E A</string>
</property>
</item>
<item>
<property name="text">
<string>T R A E</string>
</property>
</item>
<item>
<property name="text">
<string>T E R A</string>
</property>
</item>
<item>
<property name="text">
<string>T E A R</string>
</property>
</item>
<item>
<property name="text">
<string>T A R E</string>
</property>
</item>
<item>
<property name="text">
<string>T A E R</string>
</property>
</item>
<item>
<property name="text">
<string>A R E T</string>
</property>
</item>
<item>
<property name="text">
<string>A R T E</string>
</property>
</item>
<item>
<property name="text">
<string>A E R T</string>
</property>
</item>
<item>
<property name="text">
<string>A E T R</string>
</property>
</item>
<item>
<property name="text">
<string>A T R E</string>
</property>
</item>
<item>
<property name="text">
<string>A T E R</string>
</property>
</item>
</widget>
</item>
<item row="31" column="4">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="stickReverse1">
<property name="text">
<string notr="true">1</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse2">
<property name="text">
<string notr="true">2</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse3">
<property name="text">
<string notr="true">3</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse4">
<property name="text">
<string notr="true">4</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="29" column="1">
<widget class="QComboBox" name="stickmodeCB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</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="29" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Stick Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabTrainer">
@@ -3199,7 +3244,6 @@ Acceptable values are 5v..10v</string>
</layout>
</widget>
<tabstops>
<tabstop>channelorderCB</tabstop>
<tabstop>trnMode_1</tabstop>
<tabstop>trnChn_1</tabstop>
<tabstop>trnWeight_1</tabstop>