Companion support for EXT3 EXT4 and FlySky gimbals
This commit is contained in:
committed by
Raphael Coeffic
parent
f6329895a8
commit
23c84633da
@@ -54,14 +54,18 @@ bool GeneralSettings::switchSourceAllowedTaranis(int index) const
|
||||
|
||||
bool GeneralSettings::isPotAvailable(int index) const
|
||||
{
|
||||
if (index < 0 || index > Boards::getCapability(getCurrentBoard(), Board::Pots))
|
||||
int numPots = Boards::getCapability(getCurrentBoard(), Board::Pots);
|
||||
if (getCurrentFirmware()->getCapability(HasFlySkyGimbals))
|
||||
numPots -= 2;
|
||||
|
||||
if (index < 0 || index >= numPots)
|
||||
return false;
|
||||
return potConfig[index] != Board::POT_NONE;
|
||||
}
|
||||
|
||||
bool GeneralSettings::isSliderAvailable(int index) const
|
||||
{
|
||||
if (index < 0 || index > Boards::getCapability(getCurrentBoard(), Board::Sliders))
|
||||
if (index < 0 || index >= Boards::getCapability(getCurrentBoard(), Board::Sliders))
|
||||
return false;
|
||||
return sliderConfig[index] != Board::SLIDER_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user