Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: filter out model specific sources in GFs #4333

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

pfeerick
Copy link
Member

@pfeerick pfeerick commented Nov 17, 2023

Following on from a discussion in #4104 about making it so that only sources that are not model specific are listed as valid sources, this PR aims to extend

isSourceAvailableInGlobalFunctions()

and lock down the available sources even more.

radio/src/gui/colorlcd/special_functions.cpp needs some work done do it also, so that functions such as

also filter their lists when in global context... i.e. similar to how B&W does for PLAY_VALUE (probably another function that needs it's setAvailableHandler massaged

INCDEC_ENABLE_CHECK(functionsContext == &globalFunctionsContext ? isSourceAvailableInGlobalFunctions : isSourceAvailable);

Talk is cheap, so here is a PR to get the ball rolling 😉

@pfeerick pfeerick changed the title fix: Filter out model specific sources fix: Filter out model specific sources in GFs Nov 17, 2023
@pfeerick pfeerick changed the title fix: Filter out model specific sources in GFs fix: filter out model specific sources in GFs Jun 12, 2024
@pfeerick pfeerick added the bug 🪲 Something isn't working label Jun 12, 2024
@philmoz
Copy link
Collaborator

philmoz commented Jul 25, 2024

For what it's worth, I don't agree that this is necessary.

If users want to use model sources in global functions they should be a able to.

If necessary the code should be made more robust and disable/ignore GF's where the source is not defined for the selected model.

@pfeerick
Copy link
Member Author

pfeerick commented Jul 26, 2024 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants