From ad4d7a2e8ace8dc9474d7fc6c952f95ca4fbb0ee Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 30 Jan 2016 17:30:03 -0800 Subject: [PATCH] Add SSB demodulator, switch between AM and SSB. --- firmware/baseband/proc_am_audio.cpp | 9 +++++++-- firmware/baseband/proc_am_audio.hpp | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/firmware/baseband/proc_am_audio.cpp b/firmware/baseband/proc_am_audio.cpp index ad655f54..dc94b7b1 100644 --- a/firmware/baseband/proc_am_audio.cpp +++ b/firmware/baseband/proc_am_audio.cpp @@ -39,8 +39,13 @@ void NarrowbandAMAudio::execute(const buffer_c8_t& buffer) { feed_channel_stats(channel_out); channel_spectrum.feed(channel_out, channel_filter_pass_f, channel_filter_stop_f); - auto audio = demod.execute(channel_out, audio_buffer); - audio_output.write(audio); + if( false ) { + auto audio = demod_am.execute(channel_out, audio_buffer); + audio_output.write(audio); + } else { + auto audio = demod_ssb.execute(channel_out, audio_buffer); + audio_output.write(audio); + } } void NarrowbandAMAudio::on_message(const Message* const message) { diff --git a/firmware/baseband/proc_am_audio.hpp b/firmware/baseband/proc_am_audio.hpp index 07406aa2..a695df3d 100644 --- a/firmware/baseband/proc_am_audio.hpp +++ b/firmware/baseband/proc_am_audio.hpp @@ -61,7 +61,8 @@ private: uint32_t channel_filter_pass_f = 0; uint32_t channel_filter_stop_f = 0; - dsp::demodulate::AM demod; + dsp::demodulate::AM demod_am; + dsp::demodulate::SSB demod_ssb; AudioOutput audio_output;