From 5dac0bbe496ad9662ff43e77cfb081050797124f Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 10 Jan 2016 20:16:21 -0800 Subject: [PATCH] Squelch special case when threshold == 0, do not squelch. --- firmware/baseband/dsp_squelch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/baseband/dsp_squelch.cpp b/firmware/baseband/dsp_squelch.cpp index c4c18cca1..72f026e0c 100644 --- a/firmware/baseband/dsp_squelch.cpp +++ b/firmware/baseband/dsp_squelch.cpp @@ -25,6 +25,10 @@ #include bool FMSquelch::execute(const buffer_s16_t& audio) { + if( threshold_squared == 0 ) { + return true; + } + // TODO: No hard-coded array size. std::array squelch_energy_buffer; const buffer_s16_t squelch_energy {