From b84820963b7ff0acdff6fc43fa23ce8beb7605d9 Mon Sep 17 00:00:00 2001 From: Brumi-2021 <86470699+Brumi-2021@users.noreply.github.com> Date: Sun, 30 Jan 2022 11:37:46 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"=E2=80=9CAntenna=5FDC=5FBia?= =?UTF-8?q?s=5Fmissing=5Fin=5FAIS=5Fand=5FRADIOSONDE=E2=80=9D""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4de25a20391906e94cf8d24763b77c846da682f5. --- firmware/application/apps/ais_app.cpp | 14 ++++++++++---- firmware/application/apps/ui_sonde.cpp | 12 +++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/firmware/application/apps/ais_app.cpp b/firmware/application/apps/ais_app.cpp index 7d42be86..a919ce11 100644 --- a/firmware/application/apps/ais_app.cpp +++ b/firmware/application/apps/ais_app.cpp @@ -307,8 +307,13 @@ AISAppView::AISAppView(NavigationView& nav) : nav_ { nav } { recent_entry_detail_view.hidden(true); target_frequency_ = initial_target_frequency; + + receiver_model.set_tuning_frequency(tuning_frequency()); + receiver_model.set_sampling_rate(sampling_rate); + receiver_model.set_baseband_bandwidth(baseband_bandwidth); + receiver_model.enable(); // Before using radio::enable(), but not updating Ant.DC-Bias. - radio::enable({ +/* radio::enable({ // this can be removed, previous version,no DC-bias control. tuning_frequency(), sampling_rate, baseband_bandwidth, @@ -316,8 +321,8 @@ AISAppView::AISAppView(NavigationView& nav) : nav_ { nav } { receiver_model.rf_amp(), static_cast(receiver_model.lna()), static_cast(receiver_model.vga()), - }); - + }); */ + options_channel.on_change = [this](size_t, OptionsField::value_t v) { this->on_frequency_changed(v); }; @@ -337,7 +342,8 @@ AISAppView::AISAppView(NavigationView& nav) : nav_ { nav } { } AISAppView::~AISAppView() { - radio::disable(); +/* radio::disable(); */ + receiver_model.disable(); // to switch off all, including DC bias. baseband::shutdown(); } diff --git a/firmware/application/apps/ui_sonde.cpp b/firmware/application/apps/ui_sonde.cpp index 12da24b2..f38fc3dd 100644 --- a/firmware/application/apps/ui_sonde.cpp +++ b/firmware/application/apps/ui_sonde.cpp @@ -100,7 +100,12 @@ SondeView::SondeView(NavigationView& nav) { use_crc = v; }; - radio::enable({ + receiver_model.set_tuning_frequency(tuning_frequency()); + receiver_model.set_sampling_rate(sampling_rate); + receiver_model.set_baseband_bandwidth(baseband_bandwidth); + receiver_model.enable(); // Before using radio::enable(), but not updating Ant.DC-Bias. + + /* radio::enable({ // this can be removed, previous version, no DC-bias ant. control. tuning_frequency(), sampling_rate, baseband_bandwidth, @@ -108,7 +113,7 @@ SondeView::SondeView(NavigationView& nav) { receiver_model.rf_amp(), static_cast(receiver_model.lna()), static_cast(receiver_model.vga()), - }); + }); */ // QR code with geo URI @@ -153,7 +158,8 @@ SondeView::SondeView(NavigationView& nav) { SondeView::~SondeView() { baseband::set_pitch_rssi(0, false); - radio::disable(); +/* radio::disable(); */ + receiver_model.disable(); // to switch off all, including DC bias. baseband::shutdown(); audio::output::stop(); }