mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-23 22:34:29 -04:00
App settings revamp (#1139)
* WIP AppSetting overhaul * WIP migrating apps to new settings. * remove settings, rename tuned => target * formatting * Minor fixes * Fix hang on app load * run formatter * PR comment fixes * Load modulation into receiver model in app_settings * Run formatter --------- Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
parent
f65e743c4c
commit
8bd3d6249d
105 changed files with 914 additions and 1136 deletions
|
@ -110,15 +110,7 @@ ERTAppView::ERTAppView(NavigationView&) {
|
|||
&recent_entries_view,
|
||||
});
|
||||
|
||||
// load app settings
|
||||
auto rc = settings.load("rx_ert", &app_settings);
|
||||
if (rc == SETTINGS_OK) {
|
||||
field_lna.set_value(app_settings.lna);
|
||||
field_vga.set_value(app_settings.vga);
|
||||
field_rf_amp.set_value(app_settings.rx_amp);
|
||||
}
|
||||
|
||||
receiver_model.set_tuning_frequency(initial_target_frequency);
|
||||
receiver_model.set_target_frequency(initial_target_frequency);
|
||||
receiver_model.set_sampling_rate(sampling_rate);
|
||||
receiver_model.set_baseband_bandwidth(baseband_bandwidth);
|
||||
receiver_model.enable();
|
||||
|
@ -130,11 +122,7 @@ ERTAppView::ERTAppView(NavigationView&) {
|
|||
}
|
||||
|
||||
ERTAppView::~ERTAppView() {
|
||||
// save app settings
|
||||
settings.save("rx_ert", &app_settings);
|
||||
|
||||
receiver_model.disable();
|
||||
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue