From 61a7246ed346daadaf02ed833ab6b1e267f27d19 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 bd3099147cf..c3175e27d08 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);