mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
BFM demod: fixed missing channel configuration message handling
This commit is contained in:
parent
79f46bec29
commit
32f284a0de
@ -324,6 +324,19 @@ bool BFMDemod::handleMessage(const Message& cmd)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (MsgConfigureChannelizer::match(cmd))
|
||||||
|
{
|
||||||
|
MsgConfigureChannelizer& cfg = (MsgConfigureChannelizer&) cmd;
|
||||||
|
|
||||||
|
m_channelizer->configure(m_channelizer->getInputMessageQueue(),
|
||||||
|
cfg.getSampleRate(),
|
||||||
|
cfg.getCenterFrequency());
|
||||||
|
|
||||||
|
qDebug() << "BFMDemod::handleMessage: MsgConfigureChannelizer: sampleRate: " << cfg.getSampleRate()
|
||||||
|
<< " centerFrequency: " << cfg.getCenterFrequency();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else if (MsgConfigureBFMDemod::match(cmd))
|
else if (MsgConfigureBFMDemod::match(cmd))
|
||||||
{
|
{
|
||||||
MsgConfigureBFMDemod& cfg = (MsgConfigureBFMDemod&) cmd;
|
MsgConfigureBFMDemod& cfg = (MsgConfigureBFMDemod&) cmd;
|
||||||
@ -353,7 +366,7 @@ bool BFMDemod::handleMessage(const Message& cmd)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "BFMDemod::handleMessage: none";
|
qDebug() << "BFMDemod::handleMessage: passed: " << cmd.getIdentifier();
|
||||||
|
|
||||||
if (m_sampleSink != 0)
|
if (m_sampleSink != 0)
|
||||||
{
|
{
|
||||||
|
@ -138,14 +138,12 @@ void BFMDemodGUI::handleInputMessages()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BFMDemodGUI::channelMarkerChanged()
|
void BFMDemodGUI::channelMarkerUpdate()
|
||||||
{
|
{
|
||||||
setWindowTitle(m_channelMarker.getTitle());
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
|
m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
|
||||||
m_settings.m_udpPort = m_channelMarker.getUDPSendPort(),
|
m_settings.m_udpPort = m_channelMarker.getUDPSendPort(),
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
displayUDPAddress();
|
displaySettings();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,6 +308,11 @@ void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
|
if (dialog.hasChanged())
|
||||||
|
{
|
||||||
|
channelMarkerUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||||
@ -398,15 +401,11 @@ void BFMDemodGUI::applySettings(bool force)
|
|||||||
{
|
{
|
||||||
if (m_doApplySettings)
|
if (m_doApplySettings)
|
||||||
{
|
{
|
||||||
setTitleColor(m_channelMarker.getColor());
|
|
||||||
|
|
||||||
BFMDemod::MsgConfigureChannelizer *msgChan = BFMDemod::MsgConfigureChannelizer::create(
|
BFMDemod::MsgConfigureChannelizer *msgChan = BFMDemod::MsgConfigureChannelizer::create(
|
||||||
requiredBW(BFMDemodSettings::getRFBW(ui->rfBW->value())),
|
requiredBW(m_settings.m_rfBandwidth),
|
||||||
m_channelMarker.getCenterFrequency());
|
m_settings.m_inputFrequencyOffset);
|
||||||
m_bfmDemod->getInputMessageQueue()->push(msgChan);
|
m_bfmDemod->getInputMessageQueue()->push(msgChan);
|
||||||
|
|
||||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
|
||||||
|
|
||||||
BFMDemod::MsgConfigureBFMDemod* msgConfig = BFMDemod::MsgConfigureBFMDemod::create( m_settings, force);
|
BFMDemod::MsgConfigureBFMDemod* msgConfig = BFMDemod::MsgConfigureBFMDemod::create( m_settings, force);
|
||||||
m_bfmDemod->getInputMessageQueue()->push(msgConfig);
|
m_bfmDemod->getInputMessageQueue()->push(msgConfig);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,6 @@ public:
|
|||||||
static const QString m_channelID;
|
static const QString m_channelID;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void channelMarkerChanged();
|
|
||||||
void on_deltaFrequency_changed(qint64 value);
|
void on_deltaFrequency_changed(qint64 value);
|
||||||
void on_rfBW_valueChanged(int value);
|
void on_rfBW_valueChanged(int value);
|
||||||
void on_afBW_valueChanged(int value);
|
void on_afBW_valueChanged(int value);
|
||||||
@ -106,6 +105,7 @@ private:
|
|||||||
void displayUDPAddress();
|
void displayUDPAddress();
|
||||||
void rdsUpdate(bool force);
|
void rdsUpdate(bool force);
|
||||||
void rdsUpdateFixedFields();
|
void rdsUpdateFixedFields();
|
||||||
|
void channelMarkerUpdate();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
Loading…
Reference in New Issue
Block a user