mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 21:57:51 -04:00
BFM demod: update spectrum with sample rate information by polling
This commit is contained in:
parent
4aaaad2fe9
commit
205fee6837
@ -252,7 +252,8 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_channelPowerDbAvg(20,0)
|
m_channelPowerDbAvg(20,0),
|
||||||
|
m_rate(625000)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
@ -268,12 +269,8 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
|
|||||||
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this);
|
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this);
|
||||||
DSPEngine::instance()->addThreadedSink(m_threadedChannelizer);
|
DSPEngine::instance()->addThreadedSink(m_threadedChannelizer);
|
||||||
|
|
||||||
//ui->glSpectrum->setCenterFrequency(BFMDemodGUI::m_rfBW[ui->rfBW->value()] / 4);
|
ui->glSpectrum->setCenterFrequency(m_rate / 4);
|
||||||
//ui->glSpectrum->setSampleRate(BFMDemodGUI::m_rfBW[ui->rfBW->value()] / 2);
|
ui->glSpectrum->setSampleRate(m_rate / 2);
|
||||||
ui->glSpectrum->setCenterFrequency(625000 / 4);
|
|
||||||
ui->glSpectrum->setSampleRate(625000 / 2);
|
|
||||||
//ui->glSpectrum->setCenterFrequency(48000 / 4);
|
|
||||||
//ui->glSpectrum->setSampleRate(48000 / 2);
|
|
||||||
ui->glSpectrum->setDisplayWaterfall(false);
|
ui->glSpectrum->setDisplayWaterfall(false);
|
||||||
ui->glSpectrum->setDisplayMaxHold(false);
|
ui->glSpectrum->setDisplayMaxHold(false);
|
||||||
ui->glSpectrum->setSsbSpectrum(true);
|
ui->glSpectrum->setSsbSpectrum(true);
|
||||||
@ -366,5 +363,12 @@ void BFMDemodGUI::tick()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((m_bfmDemod) && (m_rate != m_bfmDemod->getSampleRate()))
|
||||||
|
{
|
||||||
|
m_rate = m_bfmDemod->getSampleRate();
|
||||||
|
ui->glSpectrum->setCenterFrequency(m_rate / 4);
|
||||||
|
ui->glSpectrum->setSampleRate(m_rate / 2);
|
||||||
|
}
|
||||||
|
|
||||||
//qDebug() << "Pilot lock: " << m_bfmDemod->getPilotLock() << ":" << m_bfmDemod->getPilotLevel(); TODO: update a GUI item with status
|
//qDebug() << "Pilot lock: " << m_bfmDemod->getPilotLock() << ":" << m_bfmDemod->getPilotLevel(); TODO: update a GUI item with status
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,7 @@ private:
|
|||||||
|
|
||||||
BFMDemod* m_bfmDemod;
|
BFMDemod* m_bfmDemod;
|
||||||
MovingAverage<Real> m_channelPowerDbAvg;
|
MovingAverage<Real> m_channelPowerDbAvg;
|
||||||
|
int m_rate;
|
||||||
|
|
||||||
static const int m_rfBW[];
|
static const int m_rfBW[];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user