1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-24 00:35:14 +03:00
This commit is contained in:
bsongis 2015-07-23 07:19:33 +02:00
parent a100af81be
commit 2341f5be68

View file

@ -1060,13 +1060,13 @@ bool GeneralSettings::switchSourceAllowedTaranis(int index) const
bool GeneralSettings::isPotAvailable(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; return potConfig[index] != POT_NONE;
} }
bool GeneralSettings::isSliderAvailable(int index) const 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; return sliderConfig[index] != SLIDER_NONE;
} }
@ -1098,6 +1098,11 @@ GeneralSettings::GeneralSettings()
switchConfig[6] = SWITCH_3POS; switchConfig[6] = SWITCH_3POS;
switchConfig[7] = SWITCH_TOGGLE; switchConfig[7] = SWITCH_TOGGLE;
} }
else {
for (int i=0; i<3; i++) {
potConfig[i] = POT_WITHOUT_DETENT;
}
}
if (IS_ARM(board)) { if (IS_ARM(board)) {
speakerVolume = 12; speakerVolume = 12;