From 8331b1e5b186fffd31e000d8cfb55f100995fbb7 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Fri, 11 Dec 2015 22:21:41 -0500 Subject: [PATCH] Fix modem pre-selection bandwidth defaults --- src/AppFrame.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index af15863..a980eb5 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -969,17 +969,22 @@ void AppFrame::OnIdle(wxIdleEvent& event) { // basic demodulators if (dSelection != "" && dSelection != mgr->getLastDemodulatorType()) { mgr->setLastDemodulatorType(dSelection); + mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelection)); + demodTuner->setHalfBand(dSelection=="USB" || dSelection=="LSB"); demodModeSelectorAdv->setSelection(-1); } // advanced demodulators else if(dSelectionadv != "" && dSelectionadv != mgr->getLastDemodulatorType()) { mgr->setLastDemodulatorType(dSelectionadv); + mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelectionadv)); + demodTuner->setHalfBand(false); demodModeSelector->setSelection(-1); } #else // basic demodulators if (dSelection != "" && dSelection != mgr->getLastDemodulatorType()) { mgr->setLastDemodulatorType(dSelection); + demodTuner->setHalfBand(dSelection=="USB" || dSelection=="LSB"); } #endif demodGainMeter->setLevel(mgr->getLastGain());