Use Freq from App Settings unless override is passed from another app #2073
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR: The Capture, Audio, and Microphone apps always started up using whatever RX frequency was used last by any app. For example, if you had been using Microphone app for HAM radio, then ran the ADSB RX app, and subsequently came back and ran the Microphone app again, the frequency in the Mic app would now be 1090MHz (ADSB freq) instead of the last frequency used in the Microphone app.
In this PR, the Capture, Audio, and Microphone app will remember and default to the frequency from the corresponding App Settings .ini file (so it'll go back to the HAM radio frequencies in the example above) UNLESS the app is launched from another app that passes an override frequency.
NOTE that if Capture, Audio, or Microphone is launched from the Scanner, Recon, or Looking Glass app, the override frequency from the starting app (Scanner, Recon, or Looking Glass) will be used instead of the saved frequencies in the App Settings .ini file. This preserves the original behavior in the case where the app is "jumped to" from another app.
Resolves #1954
Test firmware on Discord:
https://discord.com/channels/719669764804444213/722101917135798312/1223660759985422426
NOTE: There might be some people who prefer that the Capture, Audio, or Microphone app [and perhaps others] use the frequency from whatever app was last exited (not only in the case where the app was jumped to from another app). I could make this a configuration setting if that is the case (basically the old "Load App Settings" checkbox)...