diff --git a/companion/src/eeprominterface.cpp b/companion/src/eeprominterface.cpp index 03f714abf5..3b1f5bfa0e 100644 --- a/companion/src/eeprominterface.cpp +++ b/companion/src/eeprominterface.cpp @@ -1060,13 +1060,13 @@ bool GeneralSettings::switchSourceAllowedTaranis(int index) const bool GeneralSettings::isPotAvailable(int index) const { - if (index<0 || index>4) return false; + if (index<0 || index>GetCurrentFirmware()->getCapability(Pots)) return false; return potConfig[index] != POT_NONE; } bool GeneralSettings::isSliderAvailable(int index) const { - if (index<0 || index>4) return false; + if (index<0 || index>GetCurrentFirmware()->getCapability(Sliders)) return false; return sliderConfig[index] != SLIDER_NONE; } @@ -1098,6 +1098,11 @@ GeneralSettings::GeneralSettings() switchConfig[6] = SWITCH_3POS; switchConfig[7] = SWITCH_TOGGLE; } + else { + for (int i=0; i<3; i++) { + potConfig[i] = POT_WITHOUT_DETENT; + } + } if (IS_ARM(board)) { speakerVolume = 12;