diff --git a/companion/src/firmwares/generalsettings.cpp b/companion/src/firmwares/generalsettings.cpp index e0213d156..1e9b7958a 100644 --- a/companion/src/firmwares/generalsettings.cpp +++ b/companion/src/firmwares/generalsettings.cpp @@ -70,6 +70,15 @@ bool GeneralSettings::isSliderAvailable(int index) const return sliderConfig[index] != Board::SLIDER_NONE; } +bool GeneralSettings::isMultiPosPot(int index) const +{ + if (isPotAvailable(index)) { + if (potConfig[index] == Board::POT_MULTIPOS_SWITCH) + return true; + } + return false; +} + void GeneralSettings::clear() { memset(reinterpret_cast(this), 0, sizeof(GeneralSettings)); diff --git a/companion/src/firmwares/generalsettings.h b/companion/src/firmwares/generalsettings.h index 1bedd3df9..0709a67ca 100644 --- a/companion/src/firmwares/generalsettings.h +++ b/companion/src/firmwares/generalsettings.h @@ -305,6 +305,7 @@ class GeneralSettings { bool switchSourceAllowedTaranis(int index) const; bool isPotAvailable(int index) const; bool isSliderAvailable(int index) const; + bool isMultiPosPot(int index) const; QString antennaModeToString() const; QString bluetoothModeToString() const; QString serialPortModeToString(int port_nr) const; diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index 3cad60f88..3b1fa09bb 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -1541,7 +1541,7 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(onBeepCenterToggled(bool))); centerBeepCheckboxes << checkbox; if (IS_HORUS_OR_TARANIS(board)) { - if (src.isPot(&genAryIdx) && !generalSettings.isPotAvailable(genAryIdx)) { + if (src.isPot(&genAryIdx) && (!generalSettings.isPotAvailable(genAryIdx) || generalSettings.isMultiPosPot(genAryIdx))) { checkbox->hide(); } else if (src.isSlider(&genAryIdx) && !generalSettings.isSliderAvailable(genAryIdx)) {