Skip to content

Commit

Permalink
fix: Filter out model specific sources
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick committed Aug 2, 2024
1 parent 5e83225 commit 91a9ae1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion radio/src/gui/gui_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 91a9ae1

Please sign in to comment.