mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 15:25:17 +03:00
[Taranis] Pots type added to the Companion UI
This commit is contained in:
parent
8ef1456fe9
commit
2d884d413a
4 changed files with 117 additions and 3 deletions
|
@ -64,7 +64,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
|||
}
|
||||
this->layout()->removeItem(ui->TaranisReadOnlyUnlock);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
for (int i=0; pmsl[i]; i++) {
|
||||
pmsl[i]->hide();
|
||||
}
|
||||
|
@ -373,6 +374,18 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
|||
for (int i=0; tpmsld[i]; i++) {
|
||||
connect(tpmsld[i], SIGNAL(valueChanged(int)),this,SLOT(unlockSwitchEdited()));
|
||||
}
|
||||
|
||||
if (GetEepromInterface()->getCapability(MultiposPots)) {
|
||||
ui->pot1Type->setCurrentIndex(g_eeGeneral.potsType[0]);
|
||||
ui->pot2Type->setCurrentIndex(g_eeGeneral.potsType[1]);
|
||||
}
|
||||
else {
|
||||
ui->potsTypeSeparator->hide();
|
||||
ui->pot1Type->hide();
|
||||
ui->pot1TypeLabel->hide();
|
||||
ui->pot2Type->hide();
|
||||
ui->pot2TypeLabel->hide();
|
||||
}
|
||||
}
|
||||
|
||||
GeneralEdit::~GeneralEdit()
|
||||
|
@ -380,6 +393,18 @@ GeneralEdit::~GeneralEdit()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void GeneralEdit::on_pot1Type_currentIndexChanged(int index)
|
||||
{
|
||||
g_eeGeneral.potsType[0] = index;
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
void GeneralEdit::on_pot2Type_currentIndexChanged(int index)
|
||||
{
|
||||
g_eeGeneral.potsType[1] = index;
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
void GeneralEdit::unlockSwitchEdited()
|
||||
{
|
||||
int i=0;
|
||||
|
|
|
@ -119,6 +119,9 @@ private slots:
|
|||
void on_varioVolume_SL_valueChanged();
|
||||
void on_wavVolume_SL_valueChanged();
|
||||
|
||||
void on_pot1Type_currentIndexChanged(int index);
|
||||
void on_pot2Type_currentIndexChanged(int index);
|
||||
|
||||
void on_stickmodeCB_currentIndexChanged(int index);
|
||||
void on_channelorderCB_currentIndexChanged(int index);
|
||||
void on_beeperCB_currentIndexChanged(int index);
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
These will be relevant for all models in the same EEPROM.</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabSetup">
|
||||
<attribute name="title">
|
||||
|
@ -3494,6 +3494,91 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4">
|
||||
<widget class="Line" name="potsTypeSeparator">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QComboBox" name="pot1Type">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Beeper volume
|
||||
|
||||
0 - Quiet. No beeps at all.
|
||||
1 - No Keys. Normal beeps but menu keys do not beep.
|
||||
2 - Normal.
|
||||
3 - Loud.
|
||||
4 - Extra loud.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Pot (normal)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Multipos Switch</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="pot1TypeLabel">
|
||||
<property name="text">
|
||||
<string>S1 Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QComboBox" name="pot2Type">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Beeper volume
|
||||
|
||||
0 - Quiet. No beeps at all.
|
||||
1 - No Keys. Normal beeps but menu keys do not beep.
|
||||
2 - Normal.
|
||||
3 - Loud.
|
||||
4 - Extra loud.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Pot (normal)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Multipos Switch</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="pot2TypeLabel">
|
||||
<property name="text">
|
||||
<string>S2 Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -1097,7 +1097,8 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
|
|||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
} else if (flags & POPULATE_TELEMETRY) {
|
||||
}
|
||||
else if (flags & POPULATE_TELEMETRY) {
|
||||
for (int i=0; i<TELEMETRY_SOURCES_COUNT; i++) {
|
||||
item = RawSource(SOURCE_TYPE_TELEMETRY, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue