mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-05 14:47:50 -04:00
Massive UI revamping (v7): display channel absolute frequency in status bar. Manage shift frequency limits
This commit is contained in:
parent
f1cf2f4f18
commit
af13b31d85
@ -99,6 +99,7 @@ void ChannelAnalyzerGUI::displaySettings()
|
|||||||
ui->rrcRolloffText->setText(rolloffStr);
|
ui->rrcRolloffText->setText(rolloffStr);
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,6 +234,10 @@ bool ChannelAnalyzerGUI::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
DSPSignalNotification& cmd = (DSPSignalNotification&) message;
|
DSPSignalNotification& cmd = (DSPSignalNotification&) message;
|
||||||
m_basebandSampleRate = cmd.getSampleRate();
|
m_basebandSampleRate = cmd.getSampleRate();
|
||||||
|
m_deviceCenterFrequency = cmd.getCenterFrequency();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
qDebug("ChannelAnalyzerGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: %d", m_basebandSampleRate);
|
qDebug("ChannelAnalyzerGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: %d", m_basebandSampleRate);
|
||||||
setSinkSampleRate();
|
setSinkSampleRate();
|
||||||
|
|
||||||
@ -275,6 +280,7 @@ void ChannelAnalyzerGUI::channelMarkerChangedByCursor()
|
|||||||
{
|
{
|
||||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,6 +394,7 @@ void ChannelAnalyzerGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,7 +475,6 @@ void ChannelAnalyzerGUI::onMenuDialogCalled(const QPoint& p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -703,3 +709,8 @@ void ChannelAnalyzerGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->lowCut, &QSlider::valueChanged, this, &ChannelAnalyzerGUI::on_lowCut_valueChanged);
|
QObject::connect(ui->lowCut, &QSlider::valueChanged, this, &ChannelAnalyzerGUI::on_lowCut_valueChanged);
|
||||||
QObject::connect(ui->ssb, &QCheckBox::toggled, this, &ChannelAnalyzerGUI::on_ssb_toggled);
|
QObject::connect(ui->ssb, &QCheckBox::toggled, this, &ChannelAnalyzerGUI::on_ssb_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChannelAnalyzerGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -69,6 +69,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
ChannelAnalyzerSettings m_settings;
|
ChannelAnalyzerSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
int m_basebandSampleRate; //!< sample rate after final in-channel decimation (spanlog2)
|
int m_basebandSampleRate; //!< sample rate after final in-channel decimation (spanlog2)
|
||||||
MovingAverageUtil<double, double, 40> m_channelPowerAvg;
|
MovingAverageUtil<double, double, 40> m_channelPowerAvg;
|
||||||
@ -93,6 +94,7 @@ private:
|
|||||||
void setSpectrumDisplay();
|
void setSpectrumDisplay();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -2144,6 +2144,11 @@ if (DSPSignalNotification::match(message))
|
|||||||
ui->warning->setText("");
|
ui->warning->setText("");
|
||||||
}
|
}
|
||||||
getRollupContents()->arrangeRollups();
|
getRollupContents()->arrangeRollups();
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = sr;
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -sr/2, sr/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(sr/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (ADSBDemodReport::MsgReportADSB::match(message))
|
else if (ADSBDemodReport::MsgReportADSB::match(message))
|
||||||
@ -2211,6 +2216,7 @@ void ADSBDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2776,7 +2782,6 @@ void ADSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -3675,6 +3680,8 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
@ -4691,3 +4698,8 @@ void ADSBDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &ADSBDemodGUI::on_logFilename_clicked);
|
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &ADSBDemodGUI::on_logFilename_clicked);
|
||||||
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &ADSBDemodGUI::on_logOpen_clicked);
|
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &ADSBDemodGUI::on_logOpen_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ADSBDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -785,6 +785,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
ADSBDemodSettings m_settings;
|
ADSBDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
@ -848,6 +850,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void updatePosition(Aircraft *aircraft);
|
void updatePosition(Aircraft *aircraft);
|
||||||
bool updateLocalPosition(Aircraft *aircraft, double latitude, double longitude, bool surfacePosition);
|
bool updateLocalPosition(Aircraft *aircraft, double latitude, double longitude, bool surfacePosition);
|
||||||
|
@ -151,6 +151,10 @@ bool AISDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "AISDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "AISDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgMessage::match(cmd))
|
else if (MsgMessage::match(cmd))
|
||||||
|
@ -217,6 +217,16 @@ bool AISDemodGUI::handleMessage(const Message& message)
|
|||||||
messageReceived(report.getMessage(), report.getDateTime());
|
messageReceived(report.getMessage(), report.getDateTime());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -250,6 +260,7 @@ void AISDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,6 +437,8 @@ AISDemodGUI::AISDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
@ -617,6 +630,7 @@ void AISDemodGUI::displaySettings()
|
|||||||
filter();
|
filter();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -778,3 +792,8 @@ void AISDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &AISDemodGUI::on_logFilename_clicked);
|
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &AISDemodGUI::on_logFilename_clicked);
|
||||||
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &AISDemodGUI::on_logOpen_clicked);
|
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &AISDemodGUI::on_logOpen_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AISDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -78,6 +78,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
AISDemodSettings m_settings;
|
AISDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
ScopeVis* m_scopeVis;
|
ScopeVis* m_scopeVis;
|
||||||
|
|
||||||
@ -98,6 +100,7 @@ private:
|
|||||||
void messageReceived(const QByteArray& message, const QDateTime& dateTime);
|
void messageReceived(const QByteArray& message, const QDateTime& dateTime);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -167,6 +167,10 @@ bool AMDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "AMDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "AMDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MainCore::MsgChannelDemodQuery::match(cmd))
|
else if (MainCore::MsgChannelDemodQuery::match(cmd))
|
||||||
|
@ -24,17 +24,17 @@
|
|||||||
|
|
||||||
#include "device/deviceuiset.h"
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "ui_amdemodgui.h"
|
#include "dsp/dspcommands.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
#include "gui/devicestreamselectiondialog.h"
|
#include "gui/devicestreamselectiondialog.h"
|
||||||
#include "dsp/dspengine.h"
|
|
||||||
#include "gui/crightclickenabler.h"
|
#include "gui/crightclickenabler.h"
|
||||||
#include "gui/audioselectdialog.h"
|
#include "gui/audioselectdialog.h"
|
||||||
#include "maincore.h"
|
#include "maincore.h"
|
||||||
|
|
||||||
|
#include "ui_amdemodgui.h"
|
||||||
#include "amdemod.h"
|
#include "amdemod.h"
|
||||||
|
|
||||||
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||||
@ -85,6 +85,17 @@ bool AMDemodGUI::handleMessage(const Message& message)
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -118,6 +129,7 @@ void AMDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,7 +211,6 @@ void AMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -238,6 +249,8 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
m_audioSampleRate(-1),
|
m_audioSampleRate(-1),
|
||||||
@ -378,6 +391,7 @@ void AMDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,3 +507,8 @@ void AMDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &AMDemodGUI::on_squelch_valueChanged);
|
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &AMDemodGUI::on_squelch_valueChanged);
|
||||||
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &AMDemodGUI::on_audioMute_toggled);
|
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &AMDemodGUI::on_audioMute_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AMDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -51,6 +51,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
AMDemodSettings m_settings;
|
AMDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
AMDemod* m_amDemod;
|
AMDemod* m_amDemod;
|
||||||
@ -72,6 +74,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -209,8 +209,9 @@ bool APTDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "APTDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "APTDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
// Forward to GUI if any
|
// Forward to GUI if any
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -274,7 +274,11 @@ bool APTDemodGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,6 +314,7 @@ void APTDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,6 +597,7 @@ APTDemodGUI::APTDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
m_scene(nullptr),
|
m_scene(nullptr),
|
||||||
@ -779,6 +785,7 @@ void APTDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -912,3 +919,8 @@ void APTDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->zoomOut, &QToolButton::clicked, this, &APTDemodGUI::on_zoomOut_clicked);
|
QObject::connect(ui->zoomOut, &QToolButton::clicked, this, &APTDemodGUI::on_zoomOut_clicked);
|
||||||
QObject::connect(ui->zoomAll, &ButtonSwitch::clicked, this, &APTDemodGUI::on_zoomAll_clicked);
|
QObject::connect(ui->zoomAll, &ButtonSwitch::clicked, this, &APTDemodGUI::on_zoomAll_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void APTDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -95,6 +95,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
APTDemodSettings m_settings;
|
APTDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
APTDemod* m_aptDemod;
|
APTDemod* m_aptDemod;
|
||||||
@ -124,6 +125,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void deleteImageFromMap(const QString &name);
|
void deleteImageFromMap(const QString &name);
|
||||||
void resetDecoder();
|
void resetDecoder();
|
||||||
|
@ -127,10 +127,8 @@ bool ATVDemod::handleMessage(const Message& cmd)
|
|||||||
m_basebandSink->getInputMessageQueue()->push(notifToSink);
|
m_basebandSink->getInputMessageQueue()->push(notifToSink);
|
||||||
|
|
||||||
// Forward to GUI
|
// Forward to GUI
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
DSPSignalNotification *notifToGUI = new DSPSignalNotification(notif);
|
|
||||||
getMessageQueueToGUI()->push(notifToGUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -121,6 +121,7 @@ void ATVDemodGUI::displaySettings()
|
|||||||
|
|
||||||
applySampleRate();
|
applySampleRate();
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
m_doApplySettings = true;
|
m_doApplySettings = true;
|
||||||
}
|
}
|
||||||
@ -168,6 +169,10 @@ bool ATVDemodGUI::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySampleRate();
|
applySampleRate();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -219,6 +224,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
|
|||||||
m_pluginAPI(objPluginAPI),
|
m_pluginAPI(objPluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(false),
|
m_doApplySettings(false),
|
||||||
m_intTickCount(0),
|
m_intTickCount(0),
|
||||||
m_basebandSampleRate(48000)
|
m_basebandSampleRate(48000)
|
||||||
@ -499,6 +505,7 @@ void ATVDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_settings.m_inputFrequencyOffset = value;
|
m_settings.m_inputFrequencyOffset = value;
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,3 +599,8 @@ void ATVDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->amScaleOffset, &QDial::valueChanged, this, &ATVDemodGUI::on_amScaleOffset_valueChanged);
|
QObject::connect(ui->amScaleOffset, &QDial::valueChanged, this, &ATVDemodGUI::on_amScaleOffset_valueChanged);
|
||||||
QObject::connect(ui->screenTabWidget, &QTabWidget::currentChanged, this, &ATVDemodGUI::on_screenTabWidget_currentChanged);
|
QObject::connect(ui->screenTabWidget, &QTabWidget::currentChanged, this, &ATVDemodGUI::on_screenTabWidget_currentChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ATVDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -71,6 +71,7 @@ private:
|
|||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
ATVDemod* m_atvDemod;
|
ATVDemod* m_atvDemod;
|
||||||
ATVDemodSettings m_settings;
|
ATVDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
@ -97,6 +98,7 @@ private:
|
|||||||
void topTimeUpdate();
|
void topTimeUpdate();
|
||||||
bool handleMessage(const Message& objMessage);
|
bool handleMessage(const Message& objMessage);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -151,6 +151,10 @@ bool BFMDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "BFMDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "BFMDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "gui/glspectrum.h"
|
#include "gui/glspectrum.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
@ -110,6 +111,16 @@ bool BFMDemodGUI::handleMessage(const Message& message)
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -145,6 +156,7 @@ void BFMDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -322,7 +334,6 @@ void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -361,6 +372,8 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_rdsTimerCount(0),
|
m_rdsTimerCount(0),
|
||||||
m_radiotext_AB_flag(false),
|
m_radiotext_AB_flag(false),
|
||||||
m_rate(625000)
|
m_rate(625000)
|
||||||
@ -483,6 +496,7 @@ void BFMDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -847,3 +861,8 @@ void BFMDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->rds, &ButtonSwitch::clicked, this, &BFMDemodGUI::on_rds_clicked);
|
QObject::connect(ui->rds, &ButtonSwitch::clicked, this, &BFMDemodGUI::on_rds_clicked);
|
||||||
QObject::connect(ui->clearData, &QPushButton::clicked, this, &BFMDemodGUI::on_clearData_clicked);
|
QObject::connect(ui->clearData, &QPushButton::clicked, this, &BFMDemodGUI::on_clearData_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BFMDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -68,6 +68,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
BFMDemodSettings m_settings;
|
BFMDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
int m_rdsTimerCount;
|
int m_rdsTimerCount;
|
||||||
bool m_radiotext_AB_flag;
|
bool m_radiotext_AB_flag;
|
||||||
@ -90,6 +92,7 @@ private:
|
|||||||
void rdsUpdateFixedFields();
|
void rdsUpdateFixedFields();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -285,10 +285,8 @@ bool ChirpChatDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "ChirpChatDemod::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << m_basebandSampleRate;
|
qDebug() << "ChirpChatDemod::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << m_basebandSampleRate;
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif)); // make a copy
|
||||||
DSPSignalNotification* repToGUI = new DSPSignalNotification(notif); // make a copy
|
|
||||||
getMessageQueueToGUI()->push(repToGUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -81,6 +81,7 @@ bool ChirpChatDemodGUI::handleMessage(const Message& message)
|
|||||||
if (DSPSignalNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
int basebandSampleRate = notif.getSampleRate();
|
int basebandSampleRate = notif.getSampleRate();
|
||||||
qDebug() << "ChirpChatDemodGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << basebandSampleRate;
|
qDebug() << "ChirpChatDemodGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: " << basebandSampleRate;
|
||||||
|
|
||||||
@ -90,6 +91,10 @@ bool ChirpChatDemodGUI::handleMessage(const Message& message)
|
|||||||
setBandwidths();
|
setBandwidths();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (ChirpChatDemod::MsgReportDecodeBytes::match(message))
|
else if (ChirpChatDemod::MsgReportDecodeBytes::match(message))
|
||||||
@ -151,6 +156,7 @@ void ChirpChatDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,7 +346,6 @@ void ChirpChatDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -379,6 +384,7 @@ ChirpChatDemodGUI::ChirpChatDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_basebandSampleRate(250000),
|
m_basebandSampleRate(250000),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
@ -504,6 +510,7 @@ void ChirpChatDemodGUI::displaySettings()
|
|||||||
displaySquelch();
|
displaySquelch();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -793,3 +800,8 @@ void ChirpChatDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->udpAddress, &QLineEdit::editingFinished, this, &ChirpChatDemodGUI::on_udpAddress_editingFinished);
|
QObject::connect(ui->udpAddress, &QLineEdit::editingFinished, this, &ChirpChatDemodGUI::on_udpAddress_editingFinished);
|
||||||
QObject::connect(ui->udpPort, &QLineEdit::editingFinished, this, &ChirpChatDemodGUI::on_udpPort_editingFinished);
|
QObject::connect(ui->udpPort, &QLineEdit::editingFinished, this, &ChirpChatDemodGUI::on_udpPort_editingFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChirpChatDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -97,6 +97,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
ChirpChatDemodSettings m_settings;
|
ChirpChatDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
int m_basebandSampleRate;
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
@ -124,6 +125,7 @@ private:
|
|||||||
void resetLoRaStatus();
|
void resetLoRaStatus();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_CHIRPCHATDEMODGUI_H
|
#endif // INCLUDE_CHIRPCHATDEMODGUI_H
|
||||||
|
@ -162,10 +162,8 @@ bool DABDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "DABDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "DABDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
// Forward to GUI if any
|
// Forward to GUI if any
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
{
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
rep = new DSPSignalNotification(notif);
|
|
||||||
m_guiMessageQueue->push(rep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -200,15 +200,22 @@ bool DABDemodGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
bool srTooLow = m_basebandSampleRate < 2048000;
|
bool srTooLow = m_basebandSampleRate < 2048000;
|
||||||
ui->warning->setVisible(srTooLow);
|
ui->warning->setVisible(srTooLow);
|
||||||
|
|
||||||
if (srTooLow) {
|
if (srTooLow) {
|
||||||
ui->warning->setText("Sample rate must be >= 2048000");
|
ui->warning->setText("Sample rate must be >= 2048000");
|
||||||
} else {
|
} else {
|
||||||
ui->warning->setText("");
|
ui->warning->setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
getRollupContents()->arrangeRollups();
|
getRollupContents()->arrangeRollups();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DABDemod::MsgDABEnsembleName::match(message))
|
else if (DABDemod::MsgDABEnsembleName::match(message))
|
||||||
@ -318,6 +325,7 @@ void DABDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,6 +447,7 @@ DABDemodGUI::DABDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
m_channelFreq(0.0)
|
m_channelFreq(0.0)
|
||||||
@ -574,6 +583,7 @@ void DABDemodGUI::displaySettings()
|
|||||||
filter();
|
filter();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,3 +718,8 @@ void DABDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->programs, &QTableWidget::cellDoubleClicked, this, &DABDemodGUI::on_programs_cellDoubleClicked);
|
QObject::connect(ui->programs, &QTableWidget::cellDoubleClicked, this, &DABDemodGUI::on_programs_cellDoubleClicked);
|
||||||
QObject::connect(ui->channel, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DABDemodGUI::on_channel_currentIndexChanged);
|
QObject::connect(ui->channel, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DABDemodGUI::on_channel_currentIndexChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DABDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -73,6 +73,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
DABDemodSettings m_settings;
|
DABDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
DABDemod* m_dabDemod;
|
DABDemod* m_dabDemod;
|
||||||
@ -93,6 +94,7 @@ private:
|
|||||||
void addProgramName(const DABDemod::MsgDABProgramName& program);
|
void addProgramName(const DABDemod::MsgDABProgramName& program);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -138,6 +138,11 @@ bool DATVDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* notifToSink = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* notifToSink = new DSPSignalNotification(notif); // make a copy
|
||||||
m_basebandSink->getInputMessageQueue()->push(notifToSink);
|
m_basebandSink->getInputMessageQueue()->push(notifToSink);
|
||||||
|
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -23,16 +23,17 @@
|
|||||||
|
|
||||||
#include "device/deviceuiset.h"
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
#include "ui_datvdemodgui.h"
|
|
||||||
#include "gui/crightclickenabler.h"
|
#include "gui/crightclickenabler.h"
|
||||||
#include "gui/audioselectdialog.h"
|
#include "gui/audioselectdialog.h"
|
||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
#include "gui/devicestreamselectiondialog.h"
|
#include "gui/devicestreamselectiondialog.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include "ui_datvdemodgui.h"
|
||||||
#include "datvdemodreport.h"
|
#include "datvdemodreport.h"
|
||||||
#include "datvdvbs2ldpcdialog.h"
|
#include "datvdvbs2ldpcdialog.h"
|
||||||
#include "datvdemodgui.h"
|
#include "datvdemodgui.h"
|
||||||
@ -100,6 +101,16 @@ bool DATVDemodGUI::handleMessage(const Message& message)
|
|||||||
displaySettings();
|
displaySettings();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -154,7 +165,6 @@ void DATVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_centerFrequency = m_objChannelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_objChannelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_objChannelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_objChannelMarker.getTitle();
|
m_settings.m_title = m_objChannelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -193,6 +203,8 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
|||||||
m_objPluginAPI(objPluginAPI),
|
m_objPluginAPI(objPluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_objChannelMarker(this),
|
m_objChannelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_blnBasicSettingsShown(false),
|
m_blnBasicSettingsShown(false),
|
||||||
m_blnDoApplySettings(true),
|
m_blnDoApplySettings(true),
|
||||||
m_modcodModulationIndex(-1),
|
m_modcodModulationIndex(-1),
|
||||||
@ -400,6 +412,7 @@ void DATVDemodGUI::displaySettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,6 +792,7 @@ void DATVDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_objChannelMarker.setCenterFrequency(value);
|
m_objChannelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_centerFrequency = m_objChannelMarker.getCenterFrequency();
|
m_settings.m_centerFrequency = m_objChannelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -952,3 +966,8 @@ void DATVDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->udpTSPort, &QLineEdit::editingFinished, this, &DATVDemodGUI::on_udpTSPort_editingFinished);
|
QObject::connect(ui->udpTSPort, &QLineEdit::editingFinished, this, &DATVDemodGUI::on_udpTSPort_editingFinished);
|
||||||
QObject::connect(ui->playerEnable, &QCheckBox::clicked, this, &DATVDemodGUI::on_playerEnable_clicked);
|
QObject::connect(ui->playerEnable, &QCheckBox::clicked, this, &DATVDemodGUI::on_playerEnable_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DATVDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_centerFrequency);
|
||||||
|
}
|
||||||
|
@ -114,6 +114,8 @@ private:
|
|||||||
DATVDemod* m_datvDemod;
|
DATVDemod* m_datvDemod;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
DATVDemodSettings m_settings;
|
DATVDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
|
|
||||||
QTimer m_objTimer;
|
QTimer m_objTimer;
|
||||||
qint64 m_intPreviousDecodedData;
|
qint64 m_intPreviousDecodedData;
|
||||||
@ -146,6 +148,7 @@ private:
|
|||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
bool handleMessage(const Message& objMessage);
|
bool handleMessage(const Message& objMessage);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_DATVDEMODGUI_H
|
#endif // INCLUDE_DATVDEMODGUI_H
|
||||||
|
@ -149,6 +149,10 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "DSDDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "DSDDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "ui_dsddemodgui.h"
|
#include "ui_dsddemodgui.h"
|
||||||
#include "dsp/scopevisxy.h"
|
#include "dsp/scopevisxy.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
@ -94,6 +95,16 @@ bool DSDDemodGUI::handleMessage(const Message& message)
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -117,6 +128,7 @@ void DSDDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,7 +278,6 @@ void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -311,6 +322,8 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_enableCosineFiltering(false),
|
m_enableCosineFiltering(false),
|
||||||
m_syncOrConstellation(false),
|
m_syncOrConstellation(false),
|
||||||
@ -468,6 +481,7 @@ void DSDDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,3 +654,8 @@ void DSDDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->symbolPLLLock, &QToolButton::toggled, this, &DSDDemodGUI::on_symbolPLLLock_toggled);
|
QObject::connect(ui->symbolPLLLock, &QToolButton::toggled, this, &DSDDemodGUI::on_symbolPLLLock_toggled);
|
||||||
QObject::connect(ui->viewStatusLog, &QPushButton::clicked, this, &DSDDemodGUI::on_viewStatusLog_clicked);
|
QObject::connect(ui->viewStatusLog, &QPushButton::clicked, this, &DSDDemodGUI::on_viewStatusLog_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DSDDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -81,6 +81,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
DSDDemodSettings m_settings;
|
DSDDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
ScopeVisXY* m_scopeVisXY;
|
ScopeVisXY* m_scopeVisXY;
|
||||||
@ -113,6 +115,7 @@ private:
|
|||||||
void updateMyPosition();
|
void updateMyPosition();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -151,6 +151,10 @@ bool FreeDVDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "FreeDVDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "FreeDVDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,16 @@ bool FreeDVDemodGUI::handleMessage(const Message& message)
|
|||||||
applyBandwidths(5 - ui->spanLog2->value()); // will update spectrum details with new sample rate
|
applyBandwidths(5 - ui->spanLog2->value()); // will update spectrum details with new sample rate
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -130,6 +140,7 @@ void FreeDVDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,7 +210,6 @@ void FreeDVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -247,6 +257,8 @@ FreeDVDemodGUI::FreeDVDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_spectrumRate(6000),
|
m_spectrumRate(6000),
|
||||||
m_audioBinaural(false),
|
m_audioBinaural(false),
|
||||||
@ -398,6 +410,7 @@ void FreeDVDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,3 +515,8 @@ void FreeDVDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->agc, &ButtonSwitch::toggled, this, &FreeDVDemodGUI::on_agc_toggled);
|
QObject::connect(ui->agc, &ButtonSwitch::toggled, this, &FreeDVDemodGUI::on_agc_toggled);
|
||||||
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &FreeDVDemodGUI::on_audioMute_toggled);
|
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &FreeDVDemodGUI::on_audioMute_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FreeDVDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -70,6 +70,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
FreeDVDemodSettings m_settings;
|
FreeDVDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
int m_spectrumRate;
|
int m_spectrumRate;
|
||||||
bool m_audioBinaural;
|
bool m_audioBinaural;
|
||||||
@ -97,6 +99,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -151,6 +151,10 @@ bool NFMDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "NFMDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "NFMDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "gui/audioselectdialog.h"
|
#include "gui/audioselectdialog.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "dsp/dcscodes.h"
|
#include "dsp/dcscodes.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "maincore.h"
|
#include "maincore.h"
|
||||||
|
|
||||||
#include "nfmdemodreport.h"
|
#include "nfmdemodreport.h"
|
||||||
@ -80,6 +81,16 @@ bool NFMDemodGUI::handleMessage(const Message& message)
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -113,6 +124,7 @@ void NFMDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +309,6 @@ void NFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -336,6 +347,8 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
@ -514,6 +527,7 @@ void NFMDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,3 +648,8 @@ void NFMDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->highPassFilter, &ButtonSwitch::toggled, this, &NFMDemodGUI::on_highPassFilter_toggled);
|
QObject::connect(ui->highPassFilter, &ButtonSwitch::toggled, this, &NFMDemodGUI::on_highPassFilter_toggled);
|
||||||
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &NFMDemodGUI::on_audioMute_toggled);
|
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &NFMDemodGUI::on_audioMute_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NFMDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -50,6 +50,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
NFMDemodSettings m_settings;
|
NFMDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
@ -72,6 +74,7 @@ private:
|
|||||||
void setDcsCode(unsigned int dcsCode);
|
void setDcsCode(unsigned int dcsCode);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -153,10 +153,8 @@ bool PacketDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "PacketDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "PacketDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
// Forward to GUI if any
|
// Forward to GUI if any
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
{
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
rep = new DSPSignalNotification(notif);
|
|
||||||
m_guiMessageQueue->push(rep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -218,7 +218,11 @@ bool PacketDemodGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MainCore::MsgPacket::match(message))
|
else if (MainCore::MsgPacket::match(message))
|
||||||
@ -260,6 +264,7 @@ void PacketDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,6 +429,7 @@ PacketDemodGUI::PacketDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
@ -558,6 +564,7 @@ void PacketDemodGUI::displaySettings()
|
|||||||
filter();
|
filter();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -704,3 +711,8 @@ void PacketDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &PacketDemodGUI::on_logFilename_clicked);
|
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &PacketDemodGUI::on_logFilename_clicked);
|
||||||
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &PacketDemodGUI::on_logOpen_clicked);
|
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &PacketDemodGUI::on_logOpen_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PacketDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -78,6 +78,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
PacketDemodSettings m_settings;
|
PacketDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
PacketDemod* m_packetDemod;
|
PacketDemod* m_packetDemod;
|
||||||
@ -97,6 +98,7 @@ private:
|
|||||||
void packetReceived(QByteArray packet);
|
void packetReceived(QByteArray packet);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -145,6 +145,10 @@ bool PagerDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "PagerDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "PagerDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -277,6 +277,16 @@ bool PagerDemodGUI::handleMessage(const Message& message)
|
|||||||
report.getEvenParityErrors(), report.getBCHParityErrors());
|
report.getEvenParityErrors(), report.getBCHParityErrors());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -310,6 +320,7 @@ void PagerDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,6 +486,8 @@ PagerDemodGUI::PagerDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
@ -650,6 +663,7 @@ void PagerDemodGUI::displaySettings()
|
|||||||
filter();
|
filter();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -819,3 +833,8 @@ void PagerDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &PagerDemodGUI::on_logFilename_clicked);
|
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &PagerDemodGUI::on_logFilename_clicked);
|
||||||
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &PagerDemodGUI::on_logOpen_clicked);
|
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &PagerDemodGUI::on_logOpen_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PagerDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -72,6 +72,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
PagerDemodSettings m_settings;
|
PagerDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
ScopeVis* m_scopeVis;
|
ScopeVis* m_scopeVis;
|
||||||
|
|
||||||
@ -93,6 +95,7 @@ private:
|
|||||||
int evenParityErrors, int bchParityErrors);
|
int evenParityErrors, int bchParityErrors);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -149,6 +149,10 @@ bool RadiosondeDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "RadiosondeDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "RadiosondeDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -324,6 +324,16 @@ bool RadiosondeDemodGUI::handleMessage(const Message& frame)
|
|||||||
frameReceived(report.getMessage(), report.getDateTime(), report.getErrorsCorrected(), report.getThreshold());
|
frameReceived(report.getMessage(), report.getDateTime(), report.getErrorsCorrected(), report.getThreshold());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(frame))
|
||||||
|
{
|
||||||
|
const DSPSignalNotification& notif = (const DSPSignalNotification&) frame;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -357,6 +367,7 @@ void RadiosondeDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,6 +543,8 @@ RadiosondeDemodGUI::RadiosondeDemodGUI(PluginAPI* pluginAPI, DeviceUISet *device
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
@ -754,6 +767,7 @@ void RadiosondeDemodGUI::displaySettings()
|
|||||||
filter();
|
filter();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -914,3 +928,8 @@ void RadiosondeDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &RadiosondeDemodGUI::on_logFilename_clicked);
|
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &RadiosondeDemodGUI::on_logFilename_clicked);
|
||||||
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &RadiosondeDemodGUI::on_logOpen_clicked);
|
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &RadiosondeDemodGUI::on_logOpen_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RadiosondeDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -74,6 +74,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
RadiosondeDemodSettings m_settings;
|
RadiosondeDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
ScopeVis* m_scopeVis;
|
ScopeVis* m_scopeVis;
|
||||||
|
|
||||||
@ -96,6 +98,7 @@ private:
|
|||||||
void frameReceived(const QByteArray& frame, const QDateTime& dateTime, int errorsCorrected, int threshold);
|
void frameReceived(const QByteArray& frame, const QDateTime& dateTime, int errorsCorrected, int threshold);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -145,6 +145,10 @@ bool SSBDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "SSBDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "SSBDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forwatd to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,16 @@ bool SSBDemodGUI::handleMessage(const Message& message)
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
const DSPSignalNotification& notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -139,6 +149,7 @@ void SSBDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +250,6 @@ void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -287,6 +297,8 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_spectrumRate(6000),
|
m_spectrumRate(6000),
|
||||||
m_audioBinaural(false),
|
m_audioBinaural(false),
|
||||||
@ -581,6 +593,7 @@ void SSBDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,3 +709,8 @@ void SSBDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->spanLog2, &QSlider::valueChanged, this, &SSBDemodGUI::on_spanLog2_valueChanged);
|
QObject::connect(ui->spanLog2, &QSlider::valueChanged, this, &SSBDemodGUI::on_spanLog2_valueChanged);
|
||||||
QObject::connect(ui->flipSidebands, &QPushButton::clicked, this, &SSBDemodGUI::on_flipSidebands_clicked);
|
QObject::connect(ui->flipSidebands, &QPushButton::clicked, this, &SSBDemodGUI::on_flipSidebands_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SSBDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -53,6 +53,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
SSBDemodSettings m_settings;
|
SSBDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
int m_spectrumRate;
|
int m_spectrumRate;
|
||||||
bool m_audioBinaural;
|
bool m_audioBinaural;
|
||||||
@ -82,6 +84,7 @@ private:
|
|||||||
void displayAGCThresholdGate(int value);
|
void displayAGCThresholdGate(int value);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -150,10 +150,8 @@ bool VORDemod::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "VORDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "VORDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
// Forward to GUI if any
|
// Forward to GUI if any
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
{
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
rep = new DSPSignalNotification(notif);
|
|
||||||
m_guiMessageQueue->push(rep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -764,7 +764,9 @@ bool VORDemodGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (VORDemodReport::MsgReportRadial::match(message))
|
else if (VORDemodReport::MsgReportRadial::match(message))
|
||||||
@ -1160,6 +1162,7 @@ VORDemodGUI::VORDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
@ -1441,3 +1444,8 @@ void VORDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->getOpenAIPVORDB, &QPushButton::clicked, this, &VORDemodGUI::on_getOpenAIPVORDB_clicked);
|
QObject::connect(ui->getOpenAIPVORDB, &QPushButton::clicked, this, &VORDemodGUI::on_getOpenAIPVORDB_clicked);
|
||||||
QObject::connect(ui->magDecAdjust, &QPushButton::clicked, this, &VORDemodGUI::on_magDecAdjust_clicked);
|
QObject::connect(ui->magDecAdjust, &QPushButton::clicked, this, &VORDemodGUI::on_magDecAdjust_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VORDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency);
|
||||||
|
}
|
||||||
|
@ -236,6 +236,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
VORDemodSettings m_settings;
|
VORDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
VORDemod* m_vorDemod;
|
VORDemod* m_vorDemod;
|
||||||
@ -263,6 +264,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -152,10 +152,8 @@ bool VORDemodSC::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "VORDemodSC::handleMessage: DSPSignalNotification";
|
qDebug() << "VORDemodSC::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
// Forward to GUI if any
|
// Forward to GUI if any
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
{
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
rep = new DSPSignalNotification(notif);
|
|
||||||
m_guiMessageQueue->push(rep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -91,7 +91,11 @@ bool VORDemodSCGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (VORDemodSCReport::MsgReportRadial::match(message))
|
else if (VORDemodSCReport::MsgReportRadial::match(message))
|
||||||
@ -188,6 +192,7 @@ void VORDemodSCGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +282,7 @@ VORDemodSCGUI::VORDemodSCGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
ui(new Ui::VORDemodSCGUI),
|
ui(new Ui::VORDemodSCGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
@ -377,6 +383,7 @@ void VORDemodSCGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,3 +463,8 @@ void VORDemodSCGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->squelch, &QDial::valueChanged, this, &VORDemodSCGUI::on_squelch_valueChanged);
|
QObject::connect(ui->squelch, &QDial::valueChanged, this, &VORDemodSCGUI::on_squelch_valueChanged);
|
||||||
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &VORDemodSCGUI::on_audioMute_toggled);
|
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &VORDemodSCGUI::on_audioMute_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VORDemodSCGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -68,6 +68,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
VORDemodSCSettings m_settings;
|
VORDemodSCSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
VORDemodSC* m_vorDemod;
|
VORDemodSC* m_vorDemod;
|
||||||
@ -85,6 +86,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -148,6 +148,10 @@ bool WFMDemod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "WFMDemod::handleMessage: DSPSignalNotification";
|
qDebug() << "WFMDemod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forwatd to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include "ui_wfmdemodgui.h"
|
#include "ui_wfmdemodgui.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
@ -56,7 +57,6 @@ bool WFMDemodGUI::deserialize(const QByteArray& data)
|
|||||||
|
|
||||||
bool WFMDemodGUI::handleMessage(const Message& message)
|
bool WFMDemodGUI::handleMessage(const Message& message)
|
||||||
{
|
{
|
||||||
(void) message;
|
|
||||||
if (WFMDemod::MsgConfigureWFMDemod::match(message))
|
if (WFMDemod::MsgConfigureWFMDemod::match(message))
|
||||||
{
|
{
|
||||||
qDebug("WFMDemodGUI::handleMessage: WFMDemod::MsgConfigureWFMDemod");
|
qDebug("WFMDemodGUI::handleMessage: WFMDemod::MsgConfigureWFMDemod");
|
||||||
@ -67,6 +67,16 @@ bool WFMDemodGUI::handleMessage(const Message& message)
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
const DSPSignalNotification& notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -102,6 +112,7 @@ void WFMDemodGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +173,6 @@ void WFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -201,6 +211,8 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
m_audioSampleRate(-1)
|
m_audioSampleRate(-1)
|
||||||
@ -299,6 +311,7 @@ void WFMDemodGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,3 +388,8 @@ void WFMDemodGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &WFMDemodGUI::on_squelch_valueChanged);
|
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &WFMDemodGUI::on_squelch_valueChanged);
|
||||||
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &WFMDemodGUI::on_audioMute_toggled);
|
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &WFMDemodGUI::on_audioMute_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WFMDemodGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -48,6 +48,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
WFMDemodSettings m_settings;
|
WFMDemodSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
@ -66,6 +68,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -170,10 +170,8 @@ bool FileSink::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification *notif = new DSPSignalNotification(cfg);
|
DSPSignalNotification *notif = new DSPSignalNotification(cfg);
|
||||||
m_basebandSink->getInputMessageQueue()->push(notif);
|
m_basebandSink->getInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(cfg));
|
||||||
DSPSignalNotification *notifToGUI = new DSPSignalNotification(cfg);
|
|
||||||
getMessageQueueToGUI()->push(notifToGUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -76,7 +76,11 @@ bool FileSinkGUI::handleMessage(const Message& message)
|
|||||||
if (DSPSignalNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification notif = (const DSPSignalNotification&) message;
|
DSPSignalNotification notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRate();
|
displayRate();
|
||||||
|
|
||||||
if (m_fixedPosition)
|
if (m_fixedPosition)
|
||||||
@ -178,6 +182,7 @@ FileSinkGUI::FileSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_fixedShiftIndex(0),
|
m_fixedShiftIndex(0),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
@ -284,6 +289,7 @@ void FileSinkGUI::displaySettings()
|
|||||||
setPosFromFrequency();
|
setPosFromFrequency();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,6 +416,7 @@ void FileSinkGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
setPosFromFrequency();
|
setPosFromFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -542,6 +549,7 @@ void FileSinkGUI::setFrequencyFromPos()
|
|||||||
m_channelMarker.setCenterFrequency(inputFrequencyOffset);
|
m_channelMarker.setCenterFrequency(inputFrequencyOffset);
|
||||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSinkGUI::setPosFromFrequency()
|
void FileSinkGUI::setPosFromFrequency()
|
||||||
@ -609,3 +617,8 @@ void FileSinkGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->record, &ButtonSwitch::toggled, this, &FileSinkGUI::on_record_toggled);
|
QObject::connect(ui->record, &ButtonSwitch::toggled, this, &FileSinkGUI::on_record_toggled);
|
||||||
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &FileSinkGUI::on_showFileDialog_clicked);
|
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &FileSinkGUI::on_showFileDialog_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileSinkGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -69,6 +69,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
FileSinkSettings m_settings;
|
FileSinkSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
int m_fixedShiftIndex;
|
int m_fixedShiftIndex;
|
||||||
int m_basebandSampleRate;
|
int m_basebandSampleRate;
|
||||||
@ -97,6 +98,7 @@ private:
|
|||||||
QString displayScaled(uint64_t value, int precision);
|
QString displayScaled(uint64_t value, int precision);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -142,10 +142,8 @@ bool FreqTracker::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "FreqTracker::handleMessage: DSPSignalNotification";
|
qDebug() << "FreqTracker::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
DSPSignalNotification *msg = new DSPSignalNotification(notif);
|
|
||||||
getMessageQueueToGUI()->push(msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -90,7 +90,11 @@ bool FreqTrackerGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& cfg = (DSPSignalNotification&) message;
|
DSPSignalNotification& cfg = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = cfg.getCenterFrequency();
|
||||||
m_basebandSampleRate = cfg.getSampleRate();
|
m_basebandSampleRate = cfg.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
int sinkSampleRate = m_basebandSampleRate / (1<<m_settings.m_log2Decim);
|
int sinkSampleRate = m_basebandSampleRate / (1<<m_settings.m_log2Decim);
|
||||||
ui->channelSampleRateText->setText(tr("%1k").arg(QString::number(sinkSampleRate / 1000.0f, 'g', 5)));
|
ui->channelSampleRateText->setText(tr("%1k").arg(QString::number(sinkSampleRate / 1000.0f, 'g', 5)));
|
||||||
displaySpectrumBandwidth(m_settings.m_spanLog2);
|
displaySpectrumBandwidth(m_settings.m_spanLog2);
|
||||||
@ -147,6 +151,7 @@ void FreqTrackerGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +273,6 @@ void FreqTrackerGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -308,6 +312,7 @@ FreqTrackerGUI::FreqTrackerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
|
|||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_pllChannelMarker(this),
|
m_pllChannelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
@ -438,6 +443,7 @@ void FreqTrackerGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -535,3 +541,8 @@ void FreqTrackerGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &FreqTrackerGUI::on_squelch_valueChanged);
|
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &FreqTrackerGUI::on_squelch_valueChanged);
|
||||||
QObject::connect(ui->squelchGate, &QDial::valueChanged, this, &FreqTrackerGUI::on_squelchGate_valueChanged);
|
QObject::connect(ui->squelchGate, &QDial::valueChanged, this, &FreqTrackerGUI::on_squelchGate_valueChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FreqTrackerGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -70,6 +70,7 @@ private:
|
|||||||
ChannelMarker m_pllChannelMarker;
|
ChannelMarker m_pllChannelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
FreqTrackerSettings m_settings;
|
FreqTrackerSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
int m_basebandSampleRate;
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
@ -90,6 +91,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include "localsink.h"
|
#include "localsink.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSink::MsgConfigureLocalSink, Message)
|
MESSAGE_CLASS_DEFINITION(LocalSink::MsgConfigureLocalSink, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSink::MsgBasebandSampleRateNotification, Message)
|
|
||||||
|
|
||||||
const char* const LocalSink::m_channelIdURI = "sdrangel.channel.localsink";
|
const char* const LocalSink::m_channelIdURI = "sdrangel.channel.localsink";
|
||||||
const char* const LocalSink::m_channelId = "LocalSink";
|
const char* const LocalSink::m_channelId = "LocalSink";
|
||||||
@ -138,10 +137,8 @@ bool LocalSink::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification *msg = new DSPSignalNotification(notif.getSampleRate(), notif.getCenterFrequency());
|
DSPSignalNotification *msg = new DSPSignalNotification(notif.getSampleRate(), notif.getCenterFrequency());
|
||||||
m_basebandSink->getInputMessageQueue()->push(msg);
|
m_basebandSink->getInputMessageQueue()->push(msg);
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
MsgBasebandSampleRateNotification *msg = MsgBasebandSampleRateNotification::create(notif.getSampleRate());
|
|
||||||
getMessageQueueToGUI()->push(msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -61,26 +61,6 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgBasebandSampleRateNotification : public Message {
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
static MsgBasebandSampleRateNotification* create(int sampleRate) {
|
|
||||||
return new MsgBasebandSampleRateNotification(sampleRate);
|
|
||||||
}
|
|
||||||
|
|
||||||
int getSampleRate() const { return m_sampleRate; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
MsgBasebandSampleRateNotification(int sampleRate) :
|
|
||||||
Message(),
|
|
||||||
m_sampleRate(sampleRate)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
int m_sampleRate;
|
|
||||||
};
|
|
||||||
|
|
||||||
LocalSink(DeviceAPI *deviceAPI);
|
LocalSink(DeviceAPI *deviceAPI);
|
||||||
virtual ~LocalSink();
|
virtual ~LocalSink();
|
||||||
virtual void destroy() { delete this; }
|
virtual void destroy() { delete this; }
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
#include "gui/devicestreamselectiondialog.h"
|
#include "gui/devicestreamselectiondialog.h"
|
||||||
#include "dsp/hbfilterchainconverter.h"
|
#include "dsp/hbfilterchainconverter.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "localsinkgui.h"
|
#include "localsinkgui.h"
|
||||||
@ -69,11 +70,13 @@ bool LocalSinkGUI::deserialize(const QByteArray& data)
|
|||||||
|
|
||||||
bool LocalSinkGUI::handleMessage(const Message& message)
|
bool LocalSinkGUI::handleMessage(const Message& message)
|
||||||
{
|
{
|
||||||
if (LocalSink::MsgBasebandSampleRateNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
LocalSink::MsgBasebandSampleRateNotification& notif = (LocalSink::MsgBasebandSampleRateNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
//m_channelMarker.setBandwidth(notif.getSampleRate());
|
//m_channelMarker.setBandwidth(notif.getSampleRate());
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -98,6 +101,7 @@ LocalSinkGUI::LocalSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
|
|||||||
ui(new Ui::LocalSinkGUI),
|
ui(new Ui::LocalSinkGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
@ -363,6 +367,7 @@ void LocalSinkGUI::applyPosition()
|
|||||||
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Decim, m_settings.m_filterChainHash, s);
|
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Decim, m_settings.m_filterChainHash, s);
|
||||||
ui->filterChainText->setText(s);
|
ui->filterChainText->setText(s);
|
||||||
|
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -382,3 +387,9 @@ void LocalSinkGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->localDevicesRefresh, &QPushButton::clicked, this, &LocalSinkGUI::on_localDevicesRefresh_clicked);
|
QObject::connect(ui->localDevicesRefresh, &QPushButton::clicked, this, &LocalSinkGUI::on_localDevicesRefresh_clicked);
|
||||||
QObject::connect(ui->localDevicePlay, &ButtonSwitch::toggled, this, &LocalSinkGUI::on_localDevicePlay_toggled);
|
QObject::connect(ui->localDevicePlay, &ButtonSwitch::toggled, this, &LocalSinkGUI::on_localDevicePlay_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocalSinkGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
int shift = m_shiftFrequencyFactor * m_basebandSampleRate;
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + shift);
|
||||||
|
}
|
||||||
|
@ -64,6 +64,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
LocalSinkSettings m_settings;
|
LocalSinkSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
int m_basebandSampleRate;
|
int m_basebandSampleRate;
|
||||||
double m_shiftFrequencyFactor; //!< Channel frequency shift factor
|
double m_shiftFrequencyFactor; //!< Channel frequency shift factor
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
@ -85,6 +86,7 @@ private:
|
|||||||
int getLocalDeviceIndexInCombo(int localDeviceIndex);
|
int getLocalDeviceIndexInCombo(int localDeviceIndex);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -445,10 +445,8 @@ bool NoiseFigure::handleMessage(const Message& cmd)
|
|||||||
qDebug() << "NoiseFigure::handleMessage: DSPSignalNotification";
|
qDebug() << "NoiseFigure::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
// Forward to GUI if any
|
// Forward to GUI if any
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
{
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
rep = new DSPSignalNotification(notif);
|
|
||||||
m_guiMessageQueue->push(rep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -269,7 +269,11 @@ bool NoiseFigureGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getSampleRate();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
updateBW();
|
updateBW();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -323,6 +327,7 @@ void NoiseFigureGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -587,6 +592,7 @@ NoiseFigureGUI::NoiseFigureGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_basebandSampleRate(1000000),
|
m_basebandSampleRate(1000000),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
@ -747,6 +753,7 @@ void NoiseFigureGUI::displaySettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -810,3 +817,8 @@ void NoiseFigureGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->openReference, &QToolButton::clicked, this, &NoiseFigureGUI::on_openReference_clicked);
|
QObject::connect(ui->openReference, &QToolButton::clicked, this, &NoiseFigureGUI::on_openReference_clicked);
|
||||||
QObject::connect(ui->clearReference, &QToolButton::clicked, this, &NoiseFigureGUI::on_clearReference_clicked);
|
QObject::connect(ui->clearReference, &QToolButton::clicked, this, &NoiseFigureGUI::on_clearReference_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NoiseFigureGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -75,6 +75,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
NoiseFigureSettings m_settings;
|
NoiseFigureSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
NoiseFigure* m_noiseFigure;
|
NoiseFigure* m_noiseFigure;
|
||||||
@ -101,6 +102,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -973,10 +973,16 @@ bool RadioAstronomyGUI::handleMessage(const Message& message)
|
|||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
m_centerFrequency = notif.getCenterFrequency();
|
m_centerFrequency = notif.getCenterFrequency();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
if (m_settings.m_tempGalLink) {
|
if (m_settings.m_tempGalLink) {
|
||||||
calcGalacticBackgroundTemp();
|
calcGalacticBackgroundTemp();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTSys0();
|
updateTSys0();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (RadioAstronomy::MsgReportAvailableFeatures::match(message))
|
else if (RadioAstronomy::MsgReportAvailableFeatures::match(message))
|
||||||
@ -1199,6 +1205,7 @@ void RadioAstronomyGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1997,6 +2004,7 @@ RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
@ -2555,6 +2563,7 @@ void RadioAstronomyGUI::displaySettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
getRollupContents()->arrangeRollups();
|
getRollupContents()->arrangeRollups();
|
||||||
}
|
}
|
||||||
@ -6145,3 +6154,8 @@ void RadioAstronomyGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->powerColourPalette, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RadioAstronomyGUI::on_powerColourPalette_currentIndexChanged);
|
QObject::connect(ui->powerColourPalette, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RadioAstronomyGUI::on_powerColourPalette_currentIndexChanged);
|
||||||
QObject::connect(ui->powerTable, &QTableWidget::cellDoubleClicked, this, &RadioAstronomyGUI::on_powerTable_cellDoubleClicked);
|
QObject::connect(ui->powerTable, &QTableWidget::cellDoubleClicked, this, &RadioAstronomyGUI::on_powerTable_cellDoubleClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RadioAstronomyGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -218,6 +218,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
RadioAstronomySettings m_settings;
|
RadioAstronomySettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
QList<RadioAstronomySettings::AvailableFeature> m_availableFeatures;
|
QList<RadioAstronomySettings::AvailableFeature> m_availableFeatures;
|
||||||
|
|
||||||
@ -333,6 +334,7 @@ private:
|
|||||||
void updateRotatorList(const QList<RadioAstronomySettings::AvailableFeature>& rotators);
|
void updateRotatorList(const QList<RadioAstronomySettings::AvailableFeature>& rotators);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
double degreesToSteradian(double deg) const;
|
double degreesToSteradian(double deg) const;
|
||||||
double hpbwToSteradians(double hpbw) const;
|
double hpbwToSteradians(double hpbw) const;
|
||||||
|
@ -165,6 +165,10 @@ bool RadioClock::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "RadioClock::handleMessage: DSPSignalNotification";
|
qDebug() << "RadioClock::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,16 @@ bool RadioClockGUI::handleMessage(const Message& message)
|
|||||||
ui->status->setText(report.getStatus());
|
ui->status->setText(report.getStatus());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
const DSPSignalNotification& notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -165,6 +175,7 @@ void RadioClockGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,6 +277,8 @@ RadioClockGUI::RadioClockGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
@ -372,6 +385,7 @@ void RadioClockGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,3 +436,8 @@ void RadioClockGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->modulation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RadioClockGUI::on_modulation_currentIndexChanged);
|
QObject::connect(ui->modulation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RadioClockGUI::on_modulation_currentIndexChanged);
|
||||||
QObject::connect(ui->timezone, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RadioClockGUI::on_timezone_currentIndexChanged);
|
QObject::connect(ui->timezone, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RadioClockGUI::on_timezone_currentIndexChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RadioClockGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -71,6 +71,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
RadioClockSettings m_settings;
|
RadioClockSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
ScopeVis* m_scopeVis;
|
ScopeVis* m_scopeVis;
|
||||||
|
|
||||||
@ -89,6 +91,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void displayDateTime();
|
void displayDateTime();
|
||||||
|
|
||||||
|
@ -155,10 +155,8 @@ bool RemoteSink::handleMessage(const Message& cmd)
|
|||||||
m_basebandSink->getInputMessageQueue()->push(msgToBaseband);
|
m_basebandSink->getInputMessageQueue()->push(msgToBaseband);
|
||||||
|
|
||||||
// Forward to the GUI
|
// Forward to the GUI
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
DSPSignalNotification* msgToGUI = new DSPSignalNotification(notif); // make a copy
|
|
||||||
getMessageQueueToGUI()->push(msgToGUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -79,6 +79,7 @@ bool RemoteSinkGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPSignalNotification::match(message))
|
else if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& cfg = (DSPSignalNotification&) message;
|
DSPSignalNotification& cfg = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = cfg.getCenterFrequency();
|
||||||
m_basebandSampleRate = cfg.getSampleRate();
|
m_basebandSampleRate = cfg.getSampleRate();
|
||||||
qDebug("RemoteSinkGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: %d", m_basebandSampleRate);
|
qDebug("RemoteSinkGUI::handleMessage: DSPSignalNotification: m_basebandSampleRate: %d", m_basebandSampleRate);
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
@ -97,6 +98,7 @@ RemoteSinkGUI::RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
ui->setupUi(getRollupContents());
|
ui->setupUi(getRollupContents());
|
||||||
@ -176,6 +178,7 @@ void RemoteSinkGUI::displaySettings()
|
|||||||
applyDecimation();
|
applyDecimation();
|
||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,6 +369,7 @@ void RemoteSinkGUI::applyPosition()
|
|||||||
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Decim, m_settings.m_filterChainHash, s);
|
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Decim, m_settings.m_filterChainHash, s);
|
||||||
ui->filterChainText->setText(s);
|
ui->filterChainText->setText(s);
|
||||||
|
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -387,3 +391,9 @@ void RemoteSinkGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->nbFECBlocks, &QDial::valueChanged, this, &RemoteSinkGUI::on_nbFECBlocks_valueChanged);
|
QObject::connect(ui->nbFECBlocks, &QDial::valueChanged, this, &RemoteSinkGUI::on_nbFECBlocks_valueChanged);
|
||||||
QObject::connect(ui->nbTxBytes, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RemoteSinkGUI::on_nbTxBytes_currentIndexChanged);
|
QObject::connect(ui->nbTxBytes, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RemoteSinkGUI::on_nbTxBytes_currentIndexChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RemoteSinkGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
int shift = m_shiftFrequencyFactor * m_basebandSampleRate;
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + shift);
|
||||||
|
}
|
||||||
|
@ -84,6 +84,7 @@ private:
|
|||||||
void displayRateAndShift();
|
void displayRateAndShift();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -170,10 +170,8 @@ bool SigMFFileSink::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification *notif = new DSPSignalNotification(cfg);
|
DSPSignalNotification *notif = new DSPSignalNotification(cfg);
|
||||||
m_basebandSink->getInputMessageQueue()->push(notif);
|
m_basebandSink->getInputMessageQueue()->push(notif);
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(cfg));
|
||||||
DSPSignalNotification *notifToGUI = new DSPSignalNotification(cfg);
|
|
||||||
getMessageQueueToGUI()->push(notifToGUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -75,7 +75,10 @@ bool SigMFFileSinkGUI::handleMessage(const Message& message)
|
|||||||
if (DSPSignalNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification notif = (const DSPSignalNotification&) message;
|
DSPSignalNotification notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
displayRate();
|
displayRate();
|
||||||
|
|
||||||
if (m_fixedPosition)
|
if (m_fixedPosition)
|
||||||
@ -165,6 +168,7 @@ SigMFFileSinkGUI::SigMFFileSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISe
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_fixedShiftIndex(0),
|
m_fixedShiftIndex(0),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
@ -277,6 +281,7 @@ void SigMFFileSinkGUI::displaySettings()
|
|||||||
setPosFromFrequency();
|
setPosFromFrequency();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,6 +408,7 @@ void SigMFFileSinkGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
setPosFromFrequency();
|
setPosFromFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -537,6 +543,7 @@ void SigMFFileSinkGUI::setFrequencyFromPos()
|
|||||||
m_channelMarker.setCenterFrequency(inputFrequencyOffset);
|
m_channelMarker.setCenterFrequency(inputFrequencyOffset);
|
||||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SigMFFileSinkGUI::setPosFromFrequency()
|
void SigMFFileSinkGUI::setPosFromFrequency()
|
||||||
@ -604,3 +611,8 @@ void SigMFFileSinkGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->record, &ButtonSwitch::toggled, this, &SigMFFileSinkGUI::on_record_toggled);
|
QObject::connect(ui->record, &ButtonSwitch::toggled, this, &SigMFFileSinkGUI::on_record_toggled);
|
||||||
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &SigMFFileSinkGUI::on_showFileDialog_clicked);
|
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &SigMFFileSinkGUI::on_showFileDialog_clicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SigMFFileSinkGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -69,6 +69,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
SigMFFileSinkSettings m_settings;
|
SigMFFileSinkSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
int m_fixedShiftIndex;
|
int m_fixedShiftIndex;
|
||||||
int m_basebandSampleRate;
|
int m_basebandSampleRate;
|
||||||
@ -97,6 +98,7 @@ private:
|
|||||||
QString displayScaled(uint64_t value, int precision);
|
QString displayScaled(uint64_t value, int precision);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -141,6 +141,10 @@ bool UDPSink::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "UDPSink::handleMessage: DSPSignalNotification";
|
qDebug() << "UDPSink::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSink->getInputMessageQueue()->push(rep);
|
m_basebandSink->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
@ -81,6 +82,16 @@ bool UDPSinkGUI::handleMessage(const Message& message )
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
const DSPSignalNotification& notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 8, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -139,7 +150,9 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
|
|||||||
ui(new Ui::UDPSinkGUI),
|
ui(new Ui::UDPSinkGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_udpSink(0),
|
m_udpSink(nullptr),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_channelPowerAvg(4, 1e-10),
|
m_channelPowerAvg(4, 1e-10),
|
||||||
m_inPowerAvg(4, 1e-10),
|
m_inPowerAvg(4, 1e-10),
|
||||||
@ -262,6 +275,7 @@ void UDPSinkGUI::displaySettings()
|
|||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
|
|
||||||
ui->glSpectrum->setSampleRate(m_settings.m_outputSampleRate);
|
ui->glSpectrum->setSampleRate(m_settings.m_outputSampleRate);
|
||||||
@ -399,6 +413,7 @@ void UDPSinkGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -611,7 +626,6 @@ void UDPSinkGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -673,3 +687,8 @@ void UDPSinkGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->squelchGate, &QDial::valueChanged, this, &UDPSinkGUI::on_squelchGate_valueChanged);
|
QObject::connect(ui->squelchGate, &QDial::valueChanged, this, &UDPSinkGUI::on_squelchGate_valueChanged);
|
||||||
QObject::connect(ui->agc, &ButtonSwitch::toggled, this, &UDPSinkGUI::on_agc_toggled);
|
QObject::connect(ui->agc, &ButtonSwitch::toggled, this, &UDPSinkGUI::on_agc_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UDPSinkGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -68,6 +68,8 @@ private:
|
|||||||
DeviceUISet* m_deviceUISet;
|
DeviceUISet* m_deviceUISet;
|
||||||
UDPSink* m_udpSink;
|
UDPSink* m_udpSink;
|
||||||
UDPSinkSettings m_settings;
|
UDPSinkSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
MovingAverage<double> m_channelPowerAvg;
|
MovingAverage<double> m_channelPowerAvg;
|
||||||
@ -94,6 +96,7 @@ private:
|
|||||||
void setSampleFormatIndex(const UDPSinkSettings::SampleFormat& sampleFormat);
|
void setSampleFormatIndex(const UDPSinkSettings::SampleFormat& sampleFormat);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
|
|
||||||
#include "filesourcebaseband.h"
|
#include "filesourcebaseband.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(FileSource::MsgSampleRateNotification, Message)
|
|
||||||
MESSAGE_CLASS_DEFINITION(FileSource::MsgConfigureFileSource, Message)
|
MESSAGE_CLASS_DEFINITION(FileSource::MsgConfigureFileSource, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(FileSource::MsgConfigureFileSourceWork, Message)
|
MESSAGE_CLASS_DEFINITION(FileSource::MsgConfigureFileSourceWork, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(FileSource::MsgConfigureFileSourceStreamTiming, Message)
|
MESSAGE_CLASS_DEFINITION(FileSource::MsgConfigureFileSourceStreamTiming, Message)
|
||||||
@ -134,8 +133,7 @@ bool FileSource::handleMessage(const Message& cmd)
|
|||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue)
|
||||||
{
|
{
|
||||||
qDebug() << "FileSource::handleMessage: DSPSignalNotification: push to GUI";
|
qDebug() << "FileSource::handleMessage: DSPSignalNotification: push to GUI";
|
||||||
MsgSampleRateNotification *msg = MsgSampleRateNotification::create(notif.getSampleRate());
|
m_guiMessageQueue->push(new DSPSignalNotification(notif));
|
||||||
m_guiMessageQueue->push(msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -67,26 +67,6 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgSampleRateNotification : public Message {
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
static MsgSampleRateNotification* create(int sampleRate) {
|
|
||||||
return new MsgSampleRateNotification(sampleRate);
|
|
||||||
}
|
|
||||||
|
|
||||||
int getSampleRate() const { return m_sampleRate; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
MsgSampleRateNotification(int sampleRate) :
|
|
||||||
Message(),
|
|
||||||
m_sampleRate(sampleRate)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
int m_sampleRate;
|
|
||||||
};
|
|
||||||
|
|
||||||
class MsgConfigureFileSourceWork : public Message {
|
class MsgConfigureFileSourceWork : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "device/deviceapi.h"
|
#include "device/deviceapi.h"
|
||||||
#include "device/deviceuiset.h"
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/hbfilterchainconverter.h"
|
#include "dsp/hbfilterchainconverter.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
#include "gui/devicestreamselectiondialog.h"
|
#include "gui/devicestreamselectiondialog.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
@ -70,10 +71,12 @@ bool FileSourceGUI::deserialize(const QByteArray& data)
|
|||||||
|
|
||||||
bool FileSourceGUI::handleMessage(const Message& message)
|
bool FileSourceGUI::handleMessage(const Message& message)
|
||||||
{
|
{
|
||||||
if (FileSource::MsgSampleRateNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
FileSource::MsgSampleRateNotification& notif = (FileSource::MsgSampleRateNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_sampleRate = notif.getSampleRate();
|
m_sampleRate = notif.getSampleRate();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -165,6 +168,7 @@ FileSourceGUI::FileSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
ui(new Ui::FileSourceGUI),
|
ui(new Ui::FileSourceGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_shiftFrequencyFactor(0.0),
|
m_shiftFrequencyFactor(0.0),
|
||||||
m_fileSampleRate(0),
|
m_fileSampleRate(0),
|
||||||
@ -315,6 +319,7 @@ void FileSourceGUI::displaySettings()
|
|||||||
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
|
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
|
||||||
applyInterpolation();
|
applyInterpolation();
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,6 +502,7 @@ void FileSourceGUI::applyPosition()
|
|||||||
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Interp, m_settings.m_filterChainHash, s);
|
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Interp, m_settings.m_filterChainHash, s);
|
||||||
ui->filterChainText->setText(s);
|
ui->filterChainText->setText(s);
|
||||||
|
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -540,3 +546,9 @@ void FileSourceGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->play, &ButtonSwitch::toggled, this, &FileSourceGUI::on_play_toggled);
|
QObject::connect(ui->play, &ButtonSwitch::toggled, this, &FileSourceGUI::on_play_toggled);
|
||||||
QObject::connect(ui->navTime, &QSlider::valueChanged, this, &FileSourceGUI::on_navTime_valueChanged);
|
QObject::connect(ui->navTime, &QSlider::valueChanged, this, &FileSourceGUI::on_navTime_valueChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileSourceGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
int shift = m_shiftFrequencyFactor * m_sampleRate;
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + shift);
|
||||||
|
}
|
||||||
|
@ -64,6 +64,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
FileSourceSettings m_settings;
|
FileSourceSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
int m_sampleRate;
|
int m_sampleRate;
|
||||||
double m_shiftFrequencyFactor; //!< Channel frequency shift factor
|
double m_shiftFrequencyFactor; //!< Channel frequency shift factor
|
||||||
int m_fileSampleRate;
|
int m_fileSampleRate;
|
||||||
@ -94,6 +95,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "localsourcebaseband.h"
|
#include "localsourcebaseband.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSource::MsgConfigureLocalSource, Message)
|
MESSAGE_CLASS_DEFINITION(LocalSource::MsgConfigureLocalSource, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(LocalSource::MsgBasebandSampleRateNotification, Message)
|
|
||||||
|
|
||||||
const char* const LocalSource::m_channelIdURI = "sdrangel.channel.localsource";
|
const char* const LocalSource::m_channelIdURI = "sdrangel.channel.localsource";
|
||||||
const char* const LocalSource::m_channelId = "LocalSource";
|
const char* const LocalSource::m_channelId = "LocalSource";
|
||||||
@ -122,10 +121,8 @@ bool LocalSource::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification *msg = new DSPSignalNotification(cfg.getSampleRate(), cfg.getCenterFrequency());
|
DSPSignalNotification *msg = new DSPSignalNotification(cfg.getSampleRate(), cfg.getCenterFrequency());
|
||||||
m_basebandSource->getInputMessageQueue()->push(msg);
|
m_basebandSource->getInputMessageQueue()->push(msg);
|
||||||
|
|
||||||
if (m_guiMessageQueue)
|
if (m_guiMessageQueue) {
|
||||||
{
|
m_guiMessageQueue->push(new DSPSignalNotification(cfg));
|
||||||
MsgBasebandSampleRateNotification *msg = MsgBasebandSampleRateNotification::create(cfg.getSampleRate());
|
|
||||||
m_guiMessageQueue->push(msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -60,26 +60,6 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgBasebandSampleRateNotification : public Message {
|
|
||||||
MESSAGE_CLASS_DECLARATION
|
|
||||||
|
|
||||||
public:
|
|
||||||
static MsgBasebandSampleRateNotification* create(int sampleRate) {
|
|
||||||
return new MsgBasebandSampleRateNotification(sampleRate);
|
|
||||||
}
|
|
||||||
|
|
||||||
int getBasebandSampleRate() const { return m_sampleRate; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
MsgBasebandSampleRateNotification(int sampleRate) :
|
|
||||||
Message(),
|
|
||||||
m_sampleRate(sampleRate)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
int m_sampleRate;
|
|
||||||
};
|
|
||||||
|
|
||||||
LocalSource(DeviceAPI *deviceAPI);
|
LocalSource(DeviceAPI *deviceAPI);
|
||||||
virtual ~LocalSource();
|
virtual ~LocalSource();
|
||||||
virtual void destroy() { delete this; }
|
virtual void destroy() { delete this; }
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
#include "gui/devicestreamselectiondialog.h"
|
#include "gui/devicestreamselectiondialog.h"
|
||||||
#include "dsp/hbfilterchainconverter.h"
|
#include "dsp/hbfilterchainconverter.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "localsourcegui.h"
|
#include "localsourcegui.h"
|
||||||
@ -64,10 +65,12 @@ bool LocalSourceGUI::deserialize(const QByteArray& data)
|
|||||||
|
|
||||||
bool LocalSourceGUI::handleMessage(const Message& message)
|
bool LocalSourceGUI::handleMessage(const Message& message)
|
||||||
{
|
{
|
||||||
if (LocalSource::MsgBasebandSampleRateNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
LocalSource::MsgBasebandSampleRateNotification& notif = (LocalSource::MsgBasebandSampleRateNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
m_basebandSampleRate = notif.getBasebandSampleRate();
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -93,6 +96,7 @@ LocalSourceGUI::LocalSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_basebandSampleRate(0),
|
m_basebandSampleRate(0),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
{
|
{
|
||||||
ui->setupUi(getRollupContents());
|
ui->setupUi(getRollupContents());
|
||||||
@ -168,6 +172,7 @@ void LocalSourceGUI::displaySettings()
|
|||||||
ui->localDevicePlay->setChecked(m_settings.m_play);
|
ui->localDevicePlay->setChecked(m_settings.m_play);
|
||||||
applyInterpolation();
|
applyInterpolation();
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,6 +337,7 @@ void LocalSourceGUI::applyPosition()
|
|||||||
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Interp, m_settings.m_filterChainHash, s);
|
m_shiftFrequencyFactor = HBFilterChainConverter::convertToString(m_settings.m_log2Interp, m_settings.m_filterChainHash, s);
|
||||||
ui->filterChainText->setText(s);
|
ui->filterChainText->setText(s);
|
||||||
|
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -351,3 +357,9 @@ void LocalSourceGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->localDevicesRefresh, &QPushButton::clicked, this, &LocalSourceGUI::on_localDevicesRefresh_clicked);
|
QObject::connect(ui->localDevicesRefresh, &QPushButton::clicked, this, &LocalSourceGUI::on_localDevicesRefresh_clicked);
|
||||||
QObject::connect(ui->localDevicePlay, &ButtonSwitch::toggled, this, &LocalSourceGUI::on_localDevicePlay_toggled);
|
QObject::connect(ui->localDevicePlay, &ButtonSwitch::toggled, this, &LocalSourceGUI::on_localDevicePlay_toggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocalSourceGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
int shift = m_shiftFrequencyFactor * m_basebandSampleRate;
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + shift);
|
||||||
|
}
|
||||||
|
@ -85,6 +85,7 @@ private:
|
|||||||
void updateLocalDevices();
|
void updateLocalDevices();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -145,10 +145,8 @@ bool IEEE_802_15_4_Mod::handleMessage(const Message& cmd)
|
|||||||
m_basebandSource->getInputMessageQueue()->push(rep);
|
m_basebandSource->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
// Forward to GUI
|
// Forward to GUI
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI()) {
|
||||||
{
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
DSPSignalNotification *notifToGUI = new DSPSignalNotification(notif);
|
|
||||||
getMessageQueueToGUI()->push(notifToGUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -104,7 +104,11 @@ bool IEEE_802_15_4_ModGUI::handleMessage(const Message& message)
|
|||||||
if (DSPSignalNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
m_scopeVis->setLiveRate(m_basebandSampleRate);
|
m_scopeVis->setLiveRate(m_basebandSampleRate);
|
||||||
checkSampleRate();
|
checkSampleRate();
|
||||||
return true;
|
return true;
|
||||||
@ -172,6 +176,7 @@ void IEEE_802_15_4_ModGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +337,6 @@ void IEEE_802_15_4_ModGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -371,6 +375,7 @@ IEEE_802_15_4_ModGUI::IEEE_802_15_4_ModGUI(PluginAPI* pluginAPI, DeviceUISet *de
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_basebandSampleRate(12000000)
|
m_basebandSampleRate(12000000)
|
||||||
{
|
{
|
||||||
@ -566,6 +571,7 @@ void IEEE_802_15_4_ModGUI::displaySettings()
|
|||||||
ui->udpPort->setText(QString::number(m_settings.m_udpPort));
|
ui->udpPort->setText(QString::number(m_settings.m_udpPort));
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,3 +645,8 @@ void IEEE_802_15_4_ModGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->udpAddress, &QLineEdit::editingFinished, this, &IEEE_802_15_4_ModGUI::on_udpAddress_editingFinished);
|
QObject::connect(ui->udpAddress, &QLineEdit::editingFinished, this, &IEEE_802_15_4_ModGUI::on_udpAddress_editingFinished);
|
||||||
QObject::connect(ui->udpPort, &QLineEdit::editingFinished, this, &IEEE_802_15_4_ModGUI::on_udpPort_editingFinished);
|
QObject::connect(ui->udpPort, &QLineEdit::editingFinished, this, &IEEE_802_15_4_ModGUI::on_udpPort_editingFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IEEE_802_15_4_ModGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -74,6 +74,7 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
IEEE_802_15_4_ModSettings m_settings;
|
IEEE_802_15_4_ModSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
SpectrumVis* m_spectrumVis;
|
SpectrumVis* m_spectrumVis;
|
||||||
ScopeVis* m_scopeVis;
|
ScopeVis* m_scopeVis;
|
||||||
@ -98,6 +99,7 @@ private:
|
|||||||
QString getDisplayValueWithMultiplier(int value);
|
QString getDisplayValueWithMultiplier(int value);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -164,6 +164,10 @@ bool AISMod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "AISMod::handleMessage: DSPSignalNotification";
|
qDebug() << "AISMod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSource->getInputMessageQueue()->push(rep);
|
m_basebandSource->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MainCore::MsgChannelDemodQuery::match(cmd))
|
else if (MainCore::MsgChannelDemodQuery::match(cmd))
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
#include "dsp/scopevis.h"
|
#include "dsp/scopevis.h"
|
||||||
#include "dsp/glscopesettings.h"
|
#include "dsp/glscopesettings.h"
|
||||||
|
#include "dsp/dspcommands.h"
|
||||||
#include "device/deviceuiset.h"
|
#include "device/deviceuiset.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
@ -96,6 +97,16 @@ bool AISModGUI::handleMessage(const Message& message)
|
|||||||
ui->message->setText(m_settings.m_data);
|
ui->message->setText(m_settings.m_data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (DSPSignalNotification::match(message))
|
||||||
|
{
|
||||||
|
const DSPSignalNotification& notif = (const DSPSignalNotification&) message;
|
||||||
|
m_deviceCenterFrequency = notif.getCenterFrequency();
|
||||||
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
|
ui->deltaFrequency->setValueRange(false, 7, -m_basebandSampleRate/2, m_basebandSampleRate/2);
|
||||||
|
ui->deltaFrequencyLabel->setToolTip(tr("Range %1 %L2 Hz").arg(QChar(0xB1)).arg(m_basebandSampleRate/2));
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -127,6 +138,7 @@ void AISModGUI::on_deltaFrequency_changed(qint64 value)
|
|||||||
{
|
{
|
||||||
m_channelMarker.setCenterFrequency(value);
|
m_channelMarker.setCenterFrequency(value);
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +360,6 @@ void AISModGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
dialog.move(p);
|
dialog.move(p);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
|
||||||
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
|
||||||
m_settings.m_title = m_channelMarker.getTitle();
|
m_settings.m_title = m_channelMarker.getTitle();
|
||||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||||
@ -387,6 +398,8 @@ AISModGUI::AISModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
|
|||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
|
m_deviceCenterFrequency(0),
|
||||||
|
m_basebandSampleRate(1),
|
||||||
m_doApplySettings(true)
|
m_doApplySettings(true)
|
||||||
{
|
{
|
||||||
ui->setupUi(getRollupContents());
|
ui->setupUi(getRollupContents());
|
||||||
@ -557,6 +570,7 @@ void AISModGUI::displaySettings()
|
|||||||
ui->message->setText(m_settings.m_data);
|
ui->message->setText(m_settings.m_data);
|
||||||
|
|
||||||
getRollupContents()->restoreState(m_rollupState);
|
getRollupContents()->restoreState(m_rollupState);
|
||||||
|
updateAbsoluteCenterFrequency();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,3 +627,8 @@ void AISModGUI::makeUIConnections()
|
|||||||
QObject::connect(ui->udpAddress, &QLineEdit::editingFinished, this, &AISModGUI::on_udpAddress_editingFinished);
|
QObject::connect(ui->udpAddress, &QLineEdit::editingFinished, this, &AISModGUI::on_udpAddress_editingFinished);
|
||||||
QObject::connect(ui->udpPort, &QLineEdit::editingFinished, this, &AISModGUI::on_udpPort_editingFinished);
|
QObject::connect(ui->udpPort, &QLineEdit::editingFinished, this, &AISModGUI::on_udpPort_editingFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AISModGUI::updateAbsoluteCenterFrequency()
|
||||||
|
{
|
||||||
|
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_inputFrequencyOffset);
|
||||||
|
}
|
||||||
|
@ -68,6 +68,8 @@ private:
|
|||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
AISModSettings m_settings;
|
AISModSettings m_settings;
|
||||||
|
qint64 m_deviceCenterFrequency;
|
||||||
|
int m_basebandSampleRate;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
SpectrumVis* m_spectrumVis;
|
SpectrumVis* m_spectrumVis;
|
||||||
ScopeVis* m_scopeVis;
|
ScopeVis* m_scopeVis;
|
||||||
@ -87,6 +89,7 @@ private:
|
|||||||
void displayStreamIndex();
|
void displayStreamIndex();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections();
|
||||||
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
@ -196,6 +196,10 @@ bool AMMod::handleMessage(const Message& cmd)
|
|||||||
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
DSPSignalNotification* rep = new DSPSignalNotification(notif); // make a copy
|
||||||
qDebug() << "AMMod::handleMessage: DSPSignalNotification";
|
qDebug() << "AMMod::handleMessage: DSPSignalNotification";
|
||||||
m_basebandSource->getInputMessageQueue()->push(rep);
|
m_basebandSource->getInputMessageQueue()->push(rep);
|
||||||
|
// Forward to GUI if any
|
||||||
|
if (getMessageQueueToGUI()) {
|
||||||
|
getMessageQueueToGUI()->push(new DSPSignalNotification(notif));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user