diff --git a/companion/src/generaledit.cpp b/companion/src/generaledit.cpp index fdff37ae9..f197eb7b1 100644 --- a/companion/src/generaledit.cpp +++ b/companion/src/generaledit.cpp @@ -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; diff --git a/companion/src/generaledit.h b/companion/src/generaledit.h index eb6895d13..ce160dc0b 100644 --- a/companion/src/generaledit.h +++ b/companion/src/generaledit.h @@ -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); diff --git a/companion/src/generaledit.ui b/companion/src/generaledit.ui index 48a7445b5..29b17eb7d 100644 --- a/companion/src/generaledit.ui +++ b/companion/src/generaledit.ui @@ -110,7 +110,7 @@ These will be relevant for all models in the same EEPROM. - 0 + 3 @@ -3494,6 +3494,91 @@ p, li { white-space: pre-wrap; } + + + + + 0 + 10 + + + + Qt::Horizontal + + + + + + + + + + + + + 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. + + + + Pot (normal) + + + + + Multipos Switch + + + + + + + + S1 Type + + + + + + + + + + + + + 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. + + + + Pot (normal) + + + + + Multipos Switch + + + + + + + + S2 Type + + + diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 97ef84275..2a5e4f2fc 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -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; iaddItem(item.toString(), item.toValue());