Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use Freq from App Settings unless override is passed from another app #2073

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

NotherNgineer
Copy link
Contributor

@NotherNgineer NotherNgineer commented Mar 30, 2024

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)...

Copy link
Contributor

@Brumi-2021 Brumi-2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @NotherNgineer , you are the expert about this save / restore settings, so basically we rely on you . So far I have reviewed the code quickly and to me it seems ok.

I also tested your binary file from test drive discord, and I have done a quick "smoke test",
I could confirm as you said, that Mic App , Audio App, Capture App , has now his independent freq. savings. (by the way Mic App stores well both freq. savings : TX, and RX ) .
I could also confirm , that now , we do not transfer the previous freq settings of the previous app (BLE , AIS , ADSB, ....) . So in that sense , I think that the functionality is better . (The only expected small side effect, is that now we will need to remember or check the wiki the real ADSB , AIS , tuning freq ( 1090 Mhz , 161,975 or 162,'25 Mhz) before it was easy to check it , just opening Audio App or Capture or Mic App after those other apps. But now , those freq. would be not visible . it is a very minor issue , and now many HAM operators will be more happy with the Mic App . - (I could confirm that ADSB, AIS, BLTE . Audio App, Capture , Mic App are running well, ) . Thanks @NotherNgineer

@NotherNgineer
Copy link
Contributor Author

Thanks for testing!

Users can also verify the frequency of those other apps the better way: using the DFU button.

@NotherNgineer NotherNgineer merged commit 56303eb into portapack-mayhem:next Mar 30, 2024
3 checks passed
@NotherNgineer NotherNgineer deleted the save_freq branch April 20, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use frequency from .ini file in Audio, Microphone, and Capture apps
2 participants