diff --git a/firmware/baseband/dsp_demodulate.hpp b/firmware/baseband/dsp_demodulate.hpp index 09149285..c5f871e1 100644 --- a/firmware/baseband/dsp_demodulate.hpp +++ b/firmware/baseband/dsp_demodulate.hpp @@ -55,9 +55,13 @@ public: buffer_s16_t dst ); + void configure(const float sampling_rate, const float deviation_hz) { + k = static_cast(32767.0f / (2.0 * pi * deviation_hz / sampling_rate)); + } + private: complex16_t::rep_type z_; - const float k; + float k; }; } /* namespace demodulate */ diff --git a/firmware/baseband/main.cpp b/firmware/baseband/main.cpp index 7aedc677..75974d75 100755 --- a/firmware/baseband/main.cpp +++ b/firmware/baseband/main.cpp @@ -492,6 +492,7 @@ public: } void configure(const FSKConfiguration new_configuration) { + demod.configure(76800, 2 * new_configuration.symbol_rate); clock_recovery.configure(new_configuration.symbol_rate, 76800); access_code_correlator.configure( new_configuration.access_code,