mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
SSB Demod: applied new channel marker signal handling
This commit is contained in:
parent
f6337e4597
commit
20b93b8186
@ -81,8 +81,10 @@ bool SSBDemodGUI::handleMessage(const Message& message __attribute__((unused)))
|
||||
return false;
|
||||
}
|
||||
|
||||
void SSBDemodGUI::viewChanged()
|
||||
void SSBDemodGUI::channelMarkerChangedByCursor()
|
||||
{
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@ -220,24 +222,27 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
m_channelMarker.blockSignals(true);
|
||||
m_channelMarker.setColor(Qt::green);
|
||||
m_channelMarker.setBandwidth(6000);
|
||||
m_channelMarker.setCenterFrequency(0);
|
||||
m_channelMarker.setTitle("SSB Demodulator");
|
||||
m_channelMarker.setUDPAddress("127.0.0.1");
|
||||
m_channelMarker.setUDPSendPort(9999);
|
||||
m_channelMarker.setVisible(true);
|
||||
m_channelMarker.blockSignals(false);
|
||||
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
||||
|
||||
setTitleColor(m_channelMarker.getColor());
|
||||
|
||||
m_settings.setChannelMarker(&m_channelMarker);
|
||||
m_settings.setSpectrumGUI(ui->spectrumGUI);
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_deviceUISet->registerRxChannelInstance(SSBDemod::m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
displaySettings();
|
||||
@ -263,9 +268,6 @@ void SSBDemodGUI::applySettings(bool force)
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
setTitleColor(m_channelMarker.getColor());
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
|
||||
SSBDemod::MsgConfigureChannelizer* channelConfigMsg = SSBDemod::MsgConfigureChannelizer::create(
|
||||
48000, m_channelMarker.getCenterFrequency());
|
||||
m_ssbDemod->getInputMessageQueue()->push(channelConfigMsg);
|
||||
@ -365,15 +367,10 @@ void SSBDemodGUI::applyBandwidths(bool force)
|
||||
|
||||
void SSBDemodGUI::displaySettings()
|
||||
{
|
||||
bool applySettingsWereBlocked = blockApplySettings(true);
|
||||
|
||||
m_channelMarker.blockSignals(true);
|
||||
|
||||
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
|
||||
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth * 2);
|
||||
m_channelMarker.setLowCutoff(m_settings.m_lowCutoff);
|
||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
|
||||
if (m_settings.m_dsb) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
@ -386,8 +383,16 @@ void SSBDemodGUI::displaySettings()
|
||||
}
|
||||
|
||||
m_channelMarker.blockSignals(false);
|
||||
m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayUDPAddress();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
|
||||
ui->agc->setChecked(m_settings.m_agc);
|
||||
ui->agcClamping->setChecked(m_settings.m_agcClamping);
|
||||
ui->audioBinaural->setChecked(m_settings.m_audioBinaural);
|
||||
@ -438,12 +443,12 @@ void SSBDemodGUI::displaySettings()
|
||||
s = QString::number(ui->agcThresholdGate->value(), 'f', 0);
|
||||
ui->agcThresholdGateText->setText(s);
|
||||
|
||||
blockApplySettings(applySettingsWereBlocked);
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void SSBDemodGUI::displayUDPAddress()
|
||||
{
|
||||
//TODO: ui->copyAudioToUDP->setToolTip(QString("Copy audio output to UDP %1:%2").arg(m_channelMarker.getUDPAddress()).arg(m_channelMarker.getUDPSendPort()));
|
||||
//TODO: ui->copyAudioToUDP->setToolTip(QString("Copy audio output to UDP %1:%2").arg(m_settings.m_udpAddress).arg(m_settings.m_udpPort));
|
||||
}
|
||||
|
||||
void SSBDemodGUI::displayAGCPowerThreshold(int value)
|
||||
@ -461,16 +466,12 @@ void SSBDemodGUI::displayAGCPowerThreshold(int value)
|
||||
|
||||
void SSBDemodGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
bool applySettingsWereBlocked = blockApplySettings(true);
|
||||
m_channelMarker.setHighlighted(false);
|
||||
blockApplySettings(applySettingsWereBlocked);
|
||||
}
|
||||
|
||||
void SSBDemodGUI::enterEvent(QEvent*)
|
||||
{
|
||||
bool applySettingsWereBlocked = blockApplySettings(true);
|
||||
m_channelMarker.setHighlighted(true);
|
||||
blockApplySettings(applySettingsWereBlocked);
|
||||
}
|
||||
|
||||
void SSBDemodGUI::tick()
|
||||
|
@ -38,24 +38,8 @@ public:
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual bool handleMessage(const Message& message);
|
||||
|
||||
private slots:
|
||||
void viewChanged();
|
||||
void on_deltaFrequency_changed(qint64 value);
|
||||
void on_audioBinaural_toggled(bool binaural);
|
||||
void on_audioFlipChannels_toggled(bool flip);
|
||||
void on_dsb_toggled(bool dsb);
|
||||
void on_BW_valueChanged(int value);
|
||||
void on_lowCut_valueChanged(int value);
|
||||
void on_volume_valueChanged(int value);
|
||||
void on_agc_toggled(bool checked);
|
||||
void on_agcClamping_toggled(bool checked);
|
||||
void on_agcTimeLog2_valueChanged(int value);
|
||||
void on_agcPowerThreshold_valueChanged(int value);
|
||||
void on_agcThresholdGate_valueChanged(int value);
|
||||
void on_audioMute_toggled(bool checked);
|
||||
void on_spanLog2_valueChanged(int value);
|
||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||
void tick();
|
||||
public slots:
|
||||
void channelMarkerChangedByCursor();
|
||||
|
||||
private:
|
||||
Ui::SSBDemodGUI* ui;
|
||||
@ -88,6 +72,24 @@ private:
|
||||
|
||||
void leaveEvent(QEvent*);
|
||||
void enterEvent(QEvent*);
|
||||
|
||||
private slots:
|
||||
void on_deltaFrequency_changed(qint64 value);
|
||||
void on_audioBinaural_toggled(bool binaural);
|
||||
void on_audioFlipChannels_toggled(bool flip);
|
||||
void on_dsb_toggled(bool dsb);
|
||||
void on_BW_valueChanged(int value);
|
||||
void on_lowCut_valueChanged(int value);
|
||||
void on_volume_valueChanged(int value);
|
||||
void on_agc_toggled(bool checked);
|
||||
void on_agcClamping_toggled(bool checked);
|
||||
void on_agcTimeLog2_valueChanged(int value);
|
||||
void on_agcPowerThreshold_valueChanged(int value);
|
||||
void on_agcThresholdGate_valueChanged(int value);
|
||||
void on_audioMute_toggled(bool checked);
|
||||
void on_spanLog2_valueChanged(int value);
|
||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||
void tick();
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SSBDEMODGUI_H
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
|
||||
QString("SSB Demodulator"),
|
||||
QString("3.8.3"),
|
||||
QString("3.8.4"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
Loading…
Reference in New Issue
Block a user