mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-23 14:24:18 -04:00
App Settings w/out radio settings, Settings UI cleanup (#1443)
* Make app settings more consistent * Allow app settings to always work for custom settings
This commit is contained in:
parent
b28283271b
commit
70e0f2913f
11 changed files with 305 additions and 232 deletions
|
@ -112,12 +112,14 @@ POCSAGAppView::POCSAGAppView(NavigationView& nav)
|
|||
&button_config,
|
||||
&console});
|
||||
|
||||
// No app settings, use fallbacks.
|
||||
// No app settings, use fallbacks from pmem.
|
||||
if (!app_settings_.loaded()) {
|
||||
field_frequency.set_value(initial_target_frequency);
|
||||
settings_.address_to_ignore = pmem::pocsag_ignore_address();
|
||||
settings_.enable_ignore = settings_.address_to_ignore > 0;
|
||||
}
|
||||
if (!app_settings_.radio_loaded()) {
|
||||
field_frequency.set_value(initial_target_frequency);
|
||||
}
|
||||
|
||||
logger.append(LOG_ROOT_DIR "/POCSAG.TXT");
|
||||
|
||||
|
@ -151,7 +153,7 @@ POCSAGAppView::~POCSAGAppView() {
|
|||
receiver_model.disable();
|
||||
baseband::shutdown();
|
||||
|
||||
// Save pmem settings. TODO: Even needed anymore?
|
||||
// Save pmem settings.
|
||||
pmem::set_pocsag_ignore_address(settings_.address_to_ignore);
|
||||
pmem::set_pocsag_last_address(pocsag_state.address); // For POCSAG TX.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue