From c85e6a4d523585bd0838b06759c01bf8679e69c2 Mon Sep 17 00:00:00 2001 From: teixeluis Date: Wed, 9 Jun 2021 09:10:01 +0100 Subject: [PATCH] Now getting rssi events.Pitch changes still to be improved. --- firmware/application/apps/ui_sonde.cpp | 7 +++++++ firmware/baseband/proc_sonde.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/firmware/application/apps/ui_sonde.cpp b/firmware/application/apps/ui_sonde.cpp index 278037dd..28796cd7 100644 --- a/firmware/application/apps/ui_sonde.cpp +++ b/firmware/application/apps/ui_sonde.cpp @@ -130,6 +130,13 @@ SondeView::SondeView(NavigationView& nav) { audio::output::start(); audio::output::speaker_unmute(); + // inject a PitchRSSIConfigureMessage in order to arm + // the pitch rssi events that will be used by the + // processor: + const PitchRSSIConfigureMessage message { true, 0 }; + + shared_memory.application_queue.push(message); + baseband::set_pitch_rssi(0, true); } diff --git a/firmware/baseband/proc_sonde.cpp b/firmware/baseband/proc_sonde.cpp index a593bec9..4beb6eb4 100644 --- a/firmware/baseband/proc_sonde.cpp +++ b/firmware/baseband/proc_sonde.cpp @@ -114,7 +114,7 @@ void SondeProcessor::pitch_rssi_config(const PitchRSSIConfigureMessage& message) // log_file.write_entry(datetime, "pitch_rssi_config: message.rssi: " + message.rssi); pitch_rssi_enabled = message.enabled; - tone_delta = (message.rssi * 10 + 1000) * ((1ULL << 32) / 24000); + tone_delta = (message.rssi + 1000) * ((1ULL << 32) / 24000); // log_file.write_entry(datetime, "pitch_rssi_config: tone_delta: " + tone_delta); }