From c687e20fffbd294147a4ab6b5cd110a074a38f27 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 29 Jun 2014 12:43:34 +0200 Subject: [PATCH] Fixes #1390 - hide switches !SHup, !SHdown, !SFup and !SFdown for Taranis --- companion/src/helpers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 753b759c7..0ee27fabf 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -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); }