diff --git a/firmware/baseband/dsp_squelch.cpp b/firmware/baseband/dsp_squelch.cpp index 4cfe651a..8047b388 100644 --- a/firmware/baseband/dsp_squelch.cpp +++ b/firmware/baseband/dsp_squelch.cpp @@ -41,5 +41,5 @@ bool FMSquelch::execute(buffer_s16_t audio) { } } - return (max_squared < (threshold * threshold)); + return (max_squared < threshold_squared); } diff --git a/firmware/baseband/dsp_squelch.hpp b/firmware/baseband/dsp_squelch.hpp index 37cf68a3..8d1923c6 100644 --- a/firmware/baseband/dsp_squelch.hpp +++ b/firmware/baseband/dsp_squelch.hpp @@ -35,7 +35,7 @@ public: private: static constexpr size_t N = 32; - static constexpr int16_t threshold = 3072; + static constexpr uint32_t threshold_squared = 8192 * 8192; IIRBiquadFilter non_audio_hpf { non_audio_hpf_config }; };