mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-23 06:14:13 -04:00
Move where on_change for the frequency field is setup, so that the frequency is correctly initialised when the app is launched and settings are being used
This commit is contained in:
parent
3d248647c9
commit
f6a4cc26ee
3 changed files with 14 additions and 9 deletions
|
@ -129,6 +129,11 @@ AnalogAudioView::AnalogAudioView(
|
|||
&waterfall
|
||||
});
|
||||
|
||||
// Set on_change before initialising the field
|
||||
field_frequency.on_change = [this](rf::Frequency f) {
|
||||
this->on_tuning_frequency_changed(f);
|
||||
};
|
||||
|
||||
// load app settings
|
||||
auto rc = settings.load("rx_audio", &app_settings);
|
||||
if(rc == SETTINGS_OK) {
|
||||
|
@ -144,9 +149,6 @@ AnalogAudioView::AnalogAudioView(
|
|||
record_view.set_filename_date_frequency(true);
|
||||
|
||||
field_frequency.set_step(receiver_model.frequency_step());
|
||||
field_frequency.on_change = [this](rf::Frequency f) {
|
||||
this->on_tuning_frequency_changed(f);
|
||||
};
|
||||
field_frequency.on_edit = [this, &nav]() {
|
||||
// TODO: Provide separate modal method/scheme?
|
||||
auto new_view = nav.push<FrequencyKeypadView>(receiver_model.tuning_frequency());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue