From c3264f0d153dd27cdf28f2974af6c01612068445 Mon Sep 17 00:00:00 2001 From: gullradriel <3157857+gullradriel@users.noreply.github.com> Date: Fri, 2 Jun 2023 07:53:15 +0200 Subject: [PATCH] set tx and rx before launching mic app from recon (#1094) Co-authored-by: GullCode --- firmware/application/apps/ui_recon.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/firmware/application/apps/ui_recon.cpp b/firmware/application/apps/ui_recon.cpp index 8646c6be..7decb8bf 100644 --- a/firmware/application/apps/ui_recon.cpp +++ b/firmware/application/apps/ui_recon.cpp @@ -568,6 +568,19 @@ ReconView::ReconView(NavigationView& nav) }; button_mic_app.on_select = [this](Button&) { + if (frequency_list.size() > 0 && current_index >= 0 && (unsigned)current_index < frequency_list.size()) { + if (frequency_list[current_index].type == HAMRADIO) { + // if it's a HAMRADIO entry, then frequency_a is the freq at which the repeater reveive, so we have to set it in transmit in mic app + transmitter_model.set_tuning_frequency(frequency_list[current_index].frequency_a); + // if it's a HAMRADIO entry, then frequency_b is the freq at which the repeater transmit, so we have to set it in receive in mic app + receiver_model.set_tuning_frequency(frequency_list[current_index].frequency_b); + } else { + // it's single or range so we us actual tuned frequency + transmitter_model.set_tuning_frequency(freq); + receiver_model.set_tuning_frequency(freq); + } + } + // there is no way yet to set modulation and bandwidth from Recon to MicApp nav_.pop(); nav_.push(); };