From 4b89ac3360f5678f19ba3d9f577bb058387552f9 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 5 Jan 2017 11:37:57 +0100 Subject: [PATCH] WFM modulator: do not go below 96 kHz for the channelizer sample rate. Attempt to fix CW problem --- plugins/channeltx/modwfm/wfmmod.cpp | 2 ++ plugins/channeltx/modwfm/wfmmodgui.cpp | 4 +--- sdrbase/dsp/cwkeyer.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 1ade3aee9..e002b7701 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -82,6 +82,7 @@ WFMMod::WFMMod() : m_cwSmoother.setNbFadeSamples(m_config.m_outputSampleRate / 250); // 4 ms m_cwKeyer.setWPM(13); m_cwKeyer.setMode(CWKeyer::CWNone); + m_cwKeyer.reset(); } WFMMod::~WFMMod() @@ -426,6 +427,7 @@ void WFMMod::apply() { m_cwKeyer.setSampleRate(m_config.m_outputSampleRate); m_cwSmoother.setNbFadeSamples(m_config.m_outputSampleRate / 250); // 4 ms + m_cwKeyer.reset(); } m_running.m_outputSampleRate = m_config.m_outputSampleRate; diff --git a/plugins/channeltx/modwfm/wfmmodgui.cpp b/plugins/channeltx/modwfm/wfmmodgui.cpp index 111f5ce43..529027d56 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.cpp +++ b/plugins/channeltx/modwfm/wfmmodgui.cpp @@ -42,9 +42,7 @@ const int WFMModGUI::m_nbRfBW = 14; int WFMModGUI::requiredBW(int rfBW) { - if (rfBW <= 48000) - return 48000; - else if (rfBW < 100000) + if (rfBW < 96000) return 96000; else return 384000; diff --git a/sdrbase/dsp/cwkeyer.h b/sdrbase/dsp/cwkeyer.h index a35dbf042..1b29aba02 100644 --- a/sdrbase/dsp/cwkeyer.h +++ b/sdrbase/dsp/cwkeyer.h @@ -66,6 +66,7 @@ public: void setText(const QString& text); void setMode(CWMode mode); void setLoop(bool loop) { m_loop = loop; } + void reset() { m_keyIambicState = KeySilent; } int getSample(); bool eom();