mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
BFM demod: fixed spectrum gui update when channel sample rate changes
This commit is contained in:
parent
db889c78f8
commit
8958edd4be
@ -86,8 +86,6 @@ BFMDemod::BFMDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
|
||||
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
|
||||
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
@ -302,12 +300,6 @@ void BFMDemod::stop()
|
||||
{
|
||||
}
|
||||
|
||||
void BFMDemod::channelSampleRateChanged()
|
||||
{
|
||||
MsgReportChannelSampleRateChanged *msg = MsgReportChannelSampleRateChanged::create(getSampleRate());
|
||||
getMessageQueueToGUI()->push(msg);
|
||||
}
|
||||
|
||||
bool BFMDemod::handleMessage(const Message& cmd)
|
||||
{
|
||||
if (DownChannelizer::MsgChannelizerNotification::match(cmd))
|
||||
@ -325,6 +317,12 @@ bool BFMDemod::handleMessage(const Message& cmd)
|
||||
<< " m_inputSampleRate: " << settings.m_inputSampleRate
|
||||
<< " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset;
|
||||
|
||||
if (getMessageQueueToGUI())
|
||||
{
|
||||
MsgReportChannelSampleRateChanged *msg = MsgReportChannelSampleRateChanged::create(getSampleRate());
|
||||
getMessageQueueToGUI()->push(msg);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgConfigureChannelizer::match(cmd))
|
||||
|
@ -146,9 +146,6 @@ public:
|
||||
|
||||
static const QString m_channelID;
|
||||
|
||||
private slots:
|
||||
void channelSampleRateChanged();
|
||||
|
||||
private:
|
||||
enum RateState {
|
||||
RSInitialFill,
|
||||
|
@ -112,6 +112,7 @@ bool BFMDemodGUI::handleMessage(const Message& message)
|
||||
{
|
||||
BFMDemod::MsgReportChannelSampleRateChanged& report = (BFMDemod::MsgReportChannelSampleRateChanged&) message;
|
||||
m_rate = report.getSampleRate();
|
||||
qDebug("BFMDemodGUI::handleMessage: MsgReportChannelSampleRateChanged: %d S/s", m_rate);
|
||||
ui->glSpectrum->setCenterFrequency(m_rate / 4);
|
||||
ui->glSpectrum->setSampleRate(m_rate / 2);
|
||||
return true;
|
||||
@ -128,8 +129,6 @@ void BFMDemodGUI::handleInputMessages()
|
||||
|
||||
while ((message = getInputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("BFMDemodGUI::handleInputMessages: message: %s", message->getIdentifier());
|
||||
|
||||
if (handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
|
Loading…
Reference in New Issue
Block a user