1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 21:05:26 +03:00

Fixes #1390 - hide switches !SHup, !SHdown, !SFup and !SFdown for Taranis

This commit is contained in:
Damjan Adamic 2014-06-29 12:43:34 +02:00
parent a3d7c694ef
commit c687e20fff

View file

@ -404,6 +404,10 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
for (int i=-GetCurrentFirmware()->getCapability(SwitchesPositions); i<0; i++) {
item = RawSwitch(SWITCH_TYPE_SWITCH, i);
if (IS_TARANIS(GetCurrentFirmware()->getBoard())) {
//hide up and down for !SH and !SF, because they are redundant (!SFup == SFdown)
if (item.toString().contains("H") || item.toString().contains("F")) continue;
}
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}