mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 00:35:14 +03:00
Fixes #2543
This commit is contained in:
parent
a100af81be
commit
2341f5be68
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue