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:
parent
a3d7c694ef
commit
c687e20fff
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue