From 9593021ee160233379720b61791ef29d987fe846 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Fri, 27 Mar 2015 11:34:02 +0400 Subject: [PATCH] Switch availability fixes --- radio/src/gui/Taranis/helpers.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/radio/src/gui/Taranis/helpers.cpp b/radio/src/gui/Taranis/helpers.cpp index 7174326b3..06b9b8f15 100755 --- a/radio/src/gui/Taranis/helpers.cpp +++ b/radio/src/gui/Taranis/helpers.cpp @@ -195,18 +195,12 @@ bool isSwitchAvailable(int swtch, SwitchContext context) swtch = -swtch; } -#if defined(REV9E) - if (swtch >= SWSRC_SA0 && swtch <= SWSRC_SR2) { + if (swtch >= SWSRC_SA0 && swtch <= SWSRC_LAST_SWITCH) { if (!SWITCH_EXISTS(index)) return false; if ((swtch-SWSRC_SA1)%3 == 0) return IS_3POS(index); } -#else - if (swtch == SWSRC_SA1 || swtch == SWSRC_SB1 || swtch == SWSRC_SC1 || swtch == SWSRC_SD1 || swtch == SWSRC_SE1 || swtch == SWSRC_SG1) { - return IS_3POS(index); - } -#endif if (swtch >= SWSRC_FIRST_MULTIPOS_SWITCH && swtch <= SWSRC_LAST_MULTIPOS_SWITCH) { int index = (swtch - SWSRC_FIRST_MULTIPOS_SWITCH) / XPOTS_MULTIPOS_COUNT;