From 5d44d1ddad8f88ffe3af153bd664a9f6b1823d59 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Fri, 17 Nov 2023 18:34:21 +1000 Subject: [PATCH] fix: Filter out model specific sources --- radio/src/gui/gui_common.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/gui_common.cpp b/radio/src/gui/gui_common.cpp index ba3a81e9194..d2569cd28f3 100644 --- a/radio/src/gui/gui_common.cpp +++ b/radio/src/gui/gui_common.cpp @@ -280,7 +280,13 @@ bool isSourceAvailable(int source) bool isSourceAvailableInGlobalFunctions(int source) { - if (source >= MIXSRC_FIRST_TELEM && source <= MIXSRC_LAST_TELEM) { + if ((source >= MIXSRC_FIRST_INPUT && source <= MIXSRC_LAST_INPUT) || + (source >= MIXSRC_FIRST_HELI && source <= MIXSRC_LAST_HELI) || + (source >= MIXSRC_FIRST_TRAINER && source <= MIXSRC_LAST_TRAINER) || + (source >= MIXSRC_FIRST_LOGICAL_SWITCH && source <= MIXSRC_LAST_LOGICAL_SWITCH) || + (source >= MIXSRC_FIRST_GVAR && source <= MIXSRC_LAST_GVAR) || + (source >= MIXSRC_FIRST_TIMER && source <= MIXSRC_LAST_TIMER) || + (source >= MIXSRC_FIRST_TELEM && source <= MIXSRC_LAST_TELEM)) { return false; } return isSourceAvailable(source);