From a4f781ad1f0c5504b6e9f6efd73590fa4668552d Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Fri, 27 Aug 2021 22:19:32 +1000 Subject: [PATCH] Don't remove 2POS from avail switches for invert Also prevent 'unused variable' compiler warning that results from change Resolves #178 --- radio/src/gui/gui_common.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/radio/src/gui/gui_common.cpp b/radio/src/gui/gui_common.cpp index 2afe2e6b9..4c15aecfa 100644 --- a/radio/src/gui/gui_common.cpp +++ b/radio/src/gui/gui_common.cpp @@ -298,6 +298,7 @@ bool isLogicalSwitchAvailable(int index) bool isSwitchAvailable(int swtch, SwitchContext context) { bool negative = false; + (void)negative; if (swtch < 0) { if (swtch == -SWSRC_ON || swtch == -SWSRC_ONE) { @@ -319,9 +320,6 @@ bool isSwitchAvailable(int swtch, SwitchContext context) return false; } if (!IS_CONFIG_3POS(swinfo.quot)) { - if (negative) { - return false; - } if (swinfo.rem == 1) { // mid position not available for 2POS switches return false;