diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.cpp b/plugins/channelrx/chanalyzer/chanalyzergui.cpp index deca7e316..de6a5a7c9 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzergui.cpp @@ -200,15 +200,17 @@ void ChannelAnalyzerGUI::setSpectrumDisplay() if (m_settings.m_ssb) { - ui->glSpectrum->setCenterFrequency(sinkSampleRate/4); - ui->glSpectrum->setSampleRate(sinkSampleRate/2); + ui->glSpectrum->setCenterFrequency(0); + ui->glSpectrum->setSampleRate(sinkSampleRate); ui->glSpectrum->setLsbDisplay(ui->BW->value() < 0); + ui->glSpectrum->setSsbSpectrum(true); } else { ui->glSpectrum->setCenterFrequency(0); ui->glSpectrum->setSampleRate(sinkSampleRate); ui->glSpectrum->setLsbDisplay(false); + ui->glSpectrum->setSsbSpectrum(false); } } diff --git a/plugins/channelrx/chanalyzer/chanalyzersink.cpp b/plugins/channelrx/chanalyzer/chanalyzersink.cpp index eb5d88142..8d8d0ea62 100644 --- a/plugins/channelrx/chanalyzer/chanalyzersink.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzersink.cpp @@ -322,6 +322,13 @@ void ChannelAnalyzerSink::applySettings(const ChannelAnalyzerSettings& settings, doApplySampleRate = true; } + if ((settings.m_ssb != m_settings.m_ssb) || force) + { + if (m_scopeVis) { + m_scopeVis->setSSBSpectrum(settings.m_ssb); + } + } + m_settings = settings; qDebug() << "ChannelAnalyzerSink::applySettings:" diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp index fc1800a0e..e96767971 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp @@ -377,9 +377,10 @@ void FreeDVDemodGUI::displayBandwidths(int spanLog2) QString spanStr = QString::number(bwMax/10.0, 'f', 1); ui->spanText->setText(tr("%1k").arg(spanStr)); - ui->glSpectrum->setCenterFrequency(m_spectrumRate/2); - ui->glSpectrum->setSampleRate(m_spectrumRate); + ui->glSpectrum->setCenterFrequency(0); + ui->glSpectrum->setSampleRate(2*m_spectrumRate); ui->glSpectrum->setLsbDisplay(false); + ui->glSpectrum->setSsbSpectrum(true); } void FreeDVDemodGUI::displaySettings() diff --git a/plugins/channelrx/demodft8/ft8demodgui.cpp b/plugins/channelrx/demodft8/ft8demodgui.cpp index 5ff13dc21..ea61a5cdf 100644 --- a/plugins/channelrx/demodft8/ft8demodgui.cpp +++ b/plugins/channelrx/demodft8/ft8demodgui.cpp @@ -728,9 +728,10 @@ void FT8DemodGUI::applyBandwidths(unsigned int spanLog2, bool force) ui->BWText->setText(tr("%1k").arg(bwStr)); ui->spanText->setText(tr("%1k").arg(spanStr)); - ui->glSpectrum->setCenterFrequency(m_spectrumRate/2); - ui->glSpectrum->setSampleRate(m_spectrumRate); + ui->glSpectrum->setCenterFrequency(0); + ui->glSpectrum->setSampleRate(2*m_spectrumRate); ui->glSpectrum->setLsbDisplay(bw < 0); + ui->glSpectrum->setSsbSpectrum(true); ui->lowCutText->setText(tr("%1k").arg(lwStr)); diff --git a/plugins/channeltx/modfreedv/freedvmodgui.cpp b/plugins/channeltx/modfreedv/freedvmodgui.cpp index 949d60e5e..2cdd5dd10 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.cpp +++ b/plugins/channeltx/modfreedv/freedvmodgui.cpp @@ -467,9 +467,10 @@ void FreeDVModGUI::displayBandwidths(int spanLog2) QString spanStr = QString::number(bwMax/10.0, 'f', 1); ui->spanText->setText(tr("%1k").arg(spanStr)); - ui->glSpectrum->setCenterFrequency(m_spectrumRate/2); - ui->glSpectrum->setSampleRate(m_spectrumRate); + ui->glSpectrum->setCenterFrequency(0); + ui->glSpectrum->setSampleRate(2*m_spectrumRate); ui->glSpectrum->setLsbDisplay(false); + ui->glSpectrum->setSsbSpectrum(true); } void FreeDVModGUI::displaySettings() diff --git a/sdrbase/dsp/scopevis.cpp b/sdrbase/dsp/scopevis.cpp index 702a81482..865e7a576 100644 --- a/sdrbase/dsp/scopevis.cpp +++ b/sdrbase/dsp/scopevis.cpp @@ -43,6 +43,7 @@ MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGMemoryTrace, Message) ScopeVis::ScopeVis() : m_glScope(nullptr), m_spectrumVis(nullptr), + m_ssbSpectrum(false), m_preTriggerDelay(0), m_livePreTriggerDelay(0), m_currentTriggerIndex(0), @@ -765,7 +766,7 @@ int ScopeVis::processTraces(const std::vector& vc int remainder = ilength; if (m_spectrumVis) { - m_spectrumVis->feed(vcbegin[0], vcbegin[0] + ilength, false); + m_spectrumVis->feed(vcbegin[0], vcbegin[0] + ilength, m_ssbSpectrum); } while ((remainder > 0) && (m_nbSamples > 0)) diff --git a/sdrbase/dsp/scopevis.h b/sdrbase/dsp/scopevis.h index 1ed6dc8a8..6099cf859 100644 --- a/sdrbase/dsp/scopevis.h +++ b/sdrbase/dsp/scopevis.h @@ -341,6 +341,7 @@ public: void setGLScope(GLScopeInterface* glScope); void setSpectrumVis(SpectrumVis *spectrumVis) { m_spectrumVis = spectrumVis; } + void setSSBSpectrum(bool ssbSpectrum) { m_ssbSpectrum = ssbSpectrum; } MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication void setLiveRate(int sampleRate); @@ -1216,6 +1217,7 @@ private: GLScopeInterface* m_glScope; SpectrumVis *m_spectrumVis; + bool m_ssbSpectrum; GLScopeSettings m_settings; MessageQueue m_inputMessageQueue; uint32_t m_preTriggerDelay; //!< Pre-trigger delay in number of samples