1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 05:11:49 -05:00

Channel Ana,yzer, FreeDV mod and demod, FT8 demod: fixed SSB spectrum display

This commit is contained in:
f4exb 2023-07-09 01:19:39 +02:00
parent 7ec955fc61
commit 28c70fb806
7 changed files with 24 additions and 9 deletions

View File

@ -200,15 +200,17 @@ void ChannelAnalyzerGUI::setSpectrumDisplay()
if (m_settings.m_ssb) if (m_settings.m_ssb)
{ {
ui->glSpectrum->setCenterFrequency(sinkSampleRate/4); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(sinkSampleRate/2); ui->glSpectrum->setSampleRate(sinkSampleRate);
ui->glSpectrum->setLsbDisplay(ui->BW->value() < 0); ui->glSpectrum->setLsbDisplay(ui->BW->value() < 0);
ui->glSpectrum->setSsbSpectrum(true);
} }
else else
{ {
ui->glSpectrum->setCenterFrequency(0); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(sinkSampleRate); ui->glSpectrum->setSampleRate(sinkSampleRate);
ui->glSpectrum->setLsbDisplay(false); ui->glSpectrum->setLsbDisplay(false);
ui->glSpectrum->setSsbSpectrum(false);
} }
} }

View File

@ -322,6 +322,13 @@ void ChannelAnalyzerSink::applySettings(const ChannelAnalyzerSettings& settings,
doApplySampleRate = true; doApplySampleRate = true;
} }
if ((settings.m_ssb != m_settings.m_ssb) || force)
{
if (m_scopeVis) {
m_scopeVis->setSSBSpectrum(settings.m_ssb);
}
}
m_settings = settings; m_settings = settings;
qDebug() << "ChannelAnalyzerSink::applySettings:" qDebug() << "ChannelAnalyzerSink::applySettings:"

View File

@ -377,9 +377,10 @@ void FreeDVDemodGUI::displayBandwidths(int spanLog2)
QString spanStr = QString::number(bwMax/10.0, 'f', 1); QString spanStr = QString::number(bwMax/10.0, 'f', 1);
ui->spanText->setText(tr("%1k").arg(spanStr)); ui->spanText->setText(tr("%1k").arg(spanStr));
ui->glSpectrum->setCenterFrequency(m_spectrumRate/2); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(m_spectrumRate); ui->glSpectrum->setSampleRate(2*m_spectrumRate);
ui->glSpectrum->setLsbDisplay(false); ui->glSpectrum->setLsbDisplay(false);
ui->glSpectrum->setSsbSpectrum(true);
} }
void FreeDVDemodGUI::displaySettings() void FreeDVDemodGUI::displaySettings()

View File

@ -728,9 +728,10 @@ void FT8DemodGUI::applyBandwidths(unsigned int spanLog2, bool force)
ui->BWText->setText(tr("%1k").arg(bwStr)); ui->BWText->setText(tr("%1k").arg(bwStr));
ui->spanText->setText(tr("%1k").arg(spanStr)); ui->spanText->setText(tr("%1k").arg(spanStr));
ui->glSpectrum->setCenterFrequency(m_spectrumRate/2); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(m_spectrumRate); ui->glSpectrum->setSampleRate(2*m_spectrumRate);
ui->glSpectrum->setLsbDisplay(bw < 0); ui->glSpectrum->setLsbDisplay(bw < 0);
ui->glSpectrum->setSsbSpectrum(true);
ui->lowCutText->setText(tr("%1k").arg(lwStr)); ui->lowCutText->setText(tr("%1k").arg(lwStr));

View File

@ -467,9 +467,10 @@ void FreeDVModGUI::displayBandwidths(int spanLog2)
QString spanStr = QString::number(bwMax/10.0, 'f', 1); QString spanStr = QString::number(bwMax/10.0, 'f', 1);
ui->spanText->setText(tr("%1k").arg(spanStr)); ui->spanText->setText(tr("%1k").arg(spanStr));
ui->glSpectrum->setCenterFrequency(m_spectrumRate/2); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(m_spectrumRate); ui->glSpectrum->setSampleRate(2*m_spectrumRate);
ui->glSpectrum->setLsbDisplay(false); ui->glSpectrum->setLsbDisplay(false);
ui->glSpectrum->setSsbSpectrum(true);
} }
void FreeDVModGUI::displaySettings() void FreeDVModGUI::displaySettings()

View File

@ -43,6 +43,7 @@ MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGMemoryTrace, Message)
ScopeVis::ScopeVis() : ScopeVis::ScopeVis() :
m_glScope(nullptr), m_glScope(nullptr),
m_spectrumVis(nullptr), m_spectrumVis(nullptr),
m_ssbSpectrum(false),
m_preTriggerDelay(0), m_preTriggerDelay(0),
m_livePreTriggerDelay(0), m_livePreTriggerDelay(0),
m_currentTriggerIndex(0), m_currentTriggerIndex(0),
@ -765,7 +766,7 @@ int ScopeVis::processTraces(const std::vector<ComplexVector::const_iterator>& vc
int remainder = ilength; int remainder = ilength;
if (m_spectrumVis) { 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)) while ((remainder > 0) && (m_nbSamples > 0))

View File

@ -341,6 +341,7 @@ public:
void setGLScope(GLScopeInterface* glScope); void setGLScope(GLScopeInterface* glScope);
void setSpectrumVis(SpectrumVis *spectrumVis) { m_spectrumVis = spectrumVis; } 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 MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication
void setLiveRate(int sampleRate); void setLiveRate(int sampleRate);
@ -1216,6 +1217,7 @@ private:
GLScopeInterface* m_glScope; GLScopeInterface* m_glScope;
SpectrumVis *m_spectrumVis; SpectrumVis *m_spectrumVis;
bool m_ssbSpectrum;
GLScopeSettings m_settings; GLScopeSettings m_settings;
MessageQueue m_inputMessageQueue; MessageQueue m_inputMessageQueue;
uint32_t m_preTriggerDelay; //!< Pre-trigger delay in number of samples uint32_t m_preTriggerDelay; //!< Pre-trigger delay in number of samples