mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-03 07:22:26 -04:00
DSD Demod: applied new channel marker signal handling
This commit is contained in:
parent
a182656294
commit
04c495d876
@ -227,6 +227,17 @@ void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
|
||||||
|
m_settings.m_udpPort = m_channelMarker.getUDPSendPort(),
|
||||||
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
|
|
||||||
|
setWindowTitle(m_channelMarker.getTitle());
|
||||||
|
setTitleColor(m_settings.m_rgbColor);
|
||||||
|
displayUDPAddress();
|
||||||
|
|
||||||
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent) :
|
||||||
@ -270,19 +281,22 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
||||||
ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
|
ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
|
||||||
|
|
||||||
|
m_channelMarker.blockSignals(true);
|
||||||
m_channelMarker.setTitle(windowTitle());
|
|
||||||
m_channelMarker.setColor(Qt::cyan);
|
m_channelMarker.setColor(Qt::cyan);
|
||||||
m_channelMarker.setBandwidth(10000);
|
m_channelMarker.setBandwidth(10000);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setTitle("DSD Demodulator");
|
||||||
|
m_channelMarker.setUDPAddress("127.0.0.1");
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
m_channelMarker.setUDPSendPort(9999);
|
||||||
|
m_channelMarker.blockSignals(false);
|
||||||
|
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
||||||
|
|
||||||
m_deviceUISet->registerRxChannelInstance(DSDDemod::m_channelID, this);
|
m_deviceUISet->registerRxChannelInstance(DSDDemod::m_channelID, this);
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceUISet->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
|
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||||
|
|
||||||
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
|
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
|
||||||
|
|
||||||
m_settings.setChannelMarker(&m_channelMarker);
|
m_settings.setChannelMarker(&m_channelMarker);
|
||||||
@ -290,7 +304,6 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
|
|
||||||
updateMyPosition();
|
updateMyPosition();
|
||||||
displaySettings();
|
displaySettings();
|
||||||
displayUDPAddress();
|
|
||||||
applySettings(true);
|
applySettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,7 +329,7 @@ void DSDDemodGUI::updateMyPosition()
|
|||||||
|
|
||||||
void DSDDemodGUI::displayUDPAddress()
|
void DSDDemodGUI::displayUDPAddress()
|
||||||
{
|
{
|
||||||
ui->udpOutput->setToolTip(QString("Copy audio output to UDP %1:%2").arg(m_channelMarker.getUDPAddress()).arg(m_channelMarker.getUDPSendPort()));
|
ui->udpOutput->setToolTip(QString("Copy audio output to UDP %1:%2").arg(m_settings.m_udpAddress).arg(m_settings.m_udpPort));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::displaySettings()
|
void DSDDemodGUI::displaySettings()
|
||||||
@ -324,10 +337,12 @@ void DSDDemodGUI::displaySettings()
|
|||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
|
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
|
||||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
m_channelMarker.setColor(m_settings.m_rgbColor);
|
||||||
setTitleColor(m_settings.m_rgbColor);
|
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
|
setTitleColor(m_settings.m_rgbColor); // activate signal on the last setting only
|
||||||
|
|
||||||
|
setTitleColor(m_settings.m_rgbColor);
|
||||||
setWindowTitle(m_channelMarker.getTitle());
|
setWindowTitle(m_channelMarker.getTitle());
|
||||||
|
displayUDPAddress();
|
||||||
|
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
|
|
||||||
@ -382,16 +397,12 @@ void DSDDemodGUI::applySettings(bool force)
|
|||||||
|
|
||||||
void DSDDemodGUI::leaveEvent(QEvent*)
|
void DSDDemodGUI::leaveEvent(QEvent*)
|
||||||
{
|
{
|
||||||
blockApplySettings(true);
|
|
||||||
m_channelMarker.setHighlighted(false);
|
m_channelMarker.setHighlighted(false);
|
||||||
blockApplySettings(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::enterEvent(QEvent*)
|
void DSDDemodGUI::enterEvent(QEvent*)
|
||||||
{
|
{
|
||||||
blockApplySettings(true);
|
|
||||||
m_channelMarker.setHighlighted(true);
|
m_channelMarker.setHighlighted(true);
|
||||||
blockApplySettings(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::blockApplySettings(bool block)
|
void DSDDemodGUI::blockApplySettings(bool block)
|
||||||
@ -538,10 +549,10 @@ void DSDDemodGUI::formatStatusText()
|
|||||||
m_formatStatusText[82] = '\0'; // guard
|
m_formatStatusText[82] = '\0'; // guard
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::channelMarkerChanged()
|
void DSDDemodGUI::channelMarkerChangedByCursor()
|
||||||
{
|
{
|
||||||
setWindowTitle(m_channelMarker.getTitle());
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
displayUDPAddress();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,28 +57,8 @@ public:
|
|||||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void formatStatusText();
|
void channelMarkerChangedByCursor();
|
||||||
void channelMarkerChanged();
|
|
||||||
void on_deltaFrequency_changed(qint64 value);
|
|
||||||
void on_rfBW_valueChanged(int index);
|
|
||||||
void on_demodGain_valueChanged(int value);
|
|
||||||
void on_volume_valueChanged(int value);
|
|
||||||
void on_baudRate_currentIndexChanged(int index);
|
|
||||||
void on_enableCosineFiltering_toggled(bool enable);
|
|
||||||
void on_syncOrConstellation_toggled(bool checked);
|
|
||||||
void on_slot1On_toggled(bool checked);
|
|
||||||
void on_slot2On_toggled(bool checked);
|
|
||||||
void on_tdmaStereoSplit_toggled(bool checked);
|
|
||||||
void on_fmDeviation_valueChanged(int value);
|
|
||||||
void on_squelchGate_valueChanged(int value);
|
|
||||||
void on_squelch_valueChanged(int value);
|
|
||||||
void on_audioMute_toggled(bool checked);
|
|
||||||
void on_symbolPLLLock_toggled(bool checked);
|
|
||||||
void on_udpOutput_toggled(bool checked);
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
|
||||||
void onMenuDialogCalled(const QPoint& p);
|
|
||||||
void tick();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -127,6 +107,28 @@ private:
|
|||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void formatStatusText();
|
||||||
|
void on_deltaFrequency_changed(qint64 value);
|
||||||
|
void on_rfBW_valueChanged(int index);
|
||||||
|
void on_demodGain_valueChanged(int value);
|
||||||
|
void on_volume_valueChanged(int value);
|
||||||
|
void on_baudRate_currentIndexChanged(int index);
|
||||||
|
void on_enableCosineFiltering_toggled(bool enable);
|
||||||
|
void on_syncOrConstellation_toggled(bool checked);
|
||||||
|
void on_slot1On_toggled(bool checked);
|
||||||
|
void on_slot2On_toggled(bool checked);
|
||||||
|
void on_tdmaStereoSplit_toggled(bool checked);
|
||||||
|
void on_fmDeviation_valueChanged(int value);
|
||||||
|
void on_squelchGate_valueChanged(int value);
|
||||||
|
void on_squelch_valueChanged(int value);
|
||||||
|
void on_audioMute_toggled(bool checked);
|
||||||
|
void on_symbolPLLLock_toggled(bool checked);
|
||||||
|
void on_udpOutput_toggled(bool checked);
|
||||||
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
|
void onMenuDialogCalled(const QPoint& p);
|
||||||
|
void tick();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_DSDDEMODGUI_H
|
#endif // INCLUDE_DSDDEMODGUI_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user