1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

Removed destroy method leftovers and Sonar lint

This commit is contained in:
f4exb 2024-08-25 23:36:46 +02:00 committed by Edouard Griffiths
parent 704eb403d1
commit 5d0fa7fa67
131 changed files with 518 additions and 621 deletions

View File

@ -46,7 +46,6 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) :
m_thread(nullptr),
m_basebandSource(nullptr),
m_running(false),
m_guiMessageQueue(nullptr),
m_frequencyOffset(0),
m_basebandSampleRate(48000)
{
@ -62,7 +61,7 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) :
this,
&BeamSteeringCWMod::networkManagerFinished
);
startSources();
BeamSteeringCWMod::startSources();
}
BeamSteeringCWMod::~BeamSteeringCWMod()
@ -77,7 +76,7 @@ BeamSteeringCWMod::~BeamSteeringCWMod()
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeMIMOChannel(this);
stopSources();
BeamSteeringCWMod::stopSources();
}
void BeamSteeringCWMod::setDeviceAPI(DeviceAPI *deviceAPI)
@ -194,7 +193,7 @@ void BeamSteeringCWMod::applySettings(const BeamSteeringCWModSettings& settings,
QList<ObjectPipe*> pipes;
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
if (pipes.size() > 0) {
if (!pipes.empty()) {
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
}
@ -205,7 +204,7 @@ void BeamSteeringCWMod::handleInputMessages()
{
Message* message;
while ((message = m_inputMessageQueue.pop()) != 0)
while ((message = m_inputMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message))
{
@ -218,14 +217,14 @@ bool BeamSteeringCWMod::handleMessage(const Message& cmd)
{
if (MsgConfigureBeamSteeringCWMod::match(cmd))
{
MsgConfigureBeamSteeringCWMod& cfg = (MsgConfigureBeamSteeringCWMod&) cmd;
auto& cfg = (const MsgConfigureBeamSteeringCWMod&) cmd;
qDebug() << "BeamSteeringCWMod::handleMessage: MsgConfigureBeamSteeringCWMod";
applySettings(cfg.getSettings(), cfg.getForce());
return true;
}
else if (DSPMIMOSignalNotification::match(cmd))
{
DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd;
auto& notif = (const DSPMIMOSignalNotification&) cmd;
qDebug() << "BeamSteeringCWMod::handleMessage: DSPMIMOSignalNotification:"
<< " basebandSampleRate: " << notif.getSampleRate()
@ -301,7 +300,7 @@ void BeamSteeringCWMod::validateFilterChainHash(BeamSteeringCWModSettings& setti
void BeamSteeringCWMod::calculateFrequencyOffset()
{
double shiftFactor = HBFilterChainConverter::getShiftFactor(m_settings.m_log2Interp, m_settings.m_filterChainHash);
m_frequencyOffset = m_basebandSampleRate * shiftFactor;
m_frequencyOffset = (int64_t) (m_basebandSampleRate * shiftFactor);
}
int BeamSteeringCWMod::webapiSettingsGet(
@ -380,13 +379,13 @@ void BeamSteeringCWMod::webapiUpdateChannelSettings(
settings.m_reverseAPIAddress = *response.getBeamSteeringCwModSettings()->getReverseApiAddress();
}
if (channelSettingsKeys.contains("reverseAPIPort")) {
settings.m_reverseAPIPort = response.getBeamSteeringCwModSettings()->getReverseApiPort();
settings.m_reverseAPIPort = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiPort();
}
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
settings.m_reverseAPIDeviceIndex = response.getBeamSteeringCwModSettings()->getReverseApiDeviceIndex();
settings.m_reverseAPIDeviceIndex = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiDeviceIndex();
}
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getBeamSteeringCwModSettings()->getReverseApiChannelIndex();
settings.m_reverseAPIChannelIndex = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getChannelMarker());
@ -429,7 +428,7 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getBeamSteeringCwModSettings()->setChannelMarker(swgChannelMarker);
}
@ -443,16 +442,16 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getBeamSteeringCwModSettings()->setRollupState(swgRollupState);
}
}
}
void BeamSteeringCWMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force)
void BeamSteeringCWMod::webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
@ -463,8 +462,8 @@ void BeamSteeringCWMod::webapiReverseSendSettings(QList<QString>& channelSetting
m_networkRequest.setUrl(QUrl(channelSettingsURL));
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QBuffer *buffer = new QBuffer();
buffer->open((QBuffer::ReadWrite));
auto *buffer = new QBuffer();
buffer->open(QBuffer::ReadWrite);
buffer->write(swgChannelSettings->asJson().toUtf8());
buffer->seek(0);
@ -477,9 +476,9 @@ void BeamSteeringCWMod::webapiReverseSendSettings(QList<QString>& channelSetting
void BeamSteeringCWMod::sendChannelSettings(
const QList<ObjectPipe*>& pipes,
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
const BeamSteeringCWModSettings& settings,
bool force)
bool force) const
{
for (const auto& pipe : pipes)
{
@ -487,7 +486,7 @@ void BeamSteeringCWMod::sendChannelSettings(
if (messageQueue)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
this,
@ -501,11 +500,11 @@ void BeamSteeringCWMod::sendChannelSettings(
}
void BeamSteeringCWMod::webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const BeamSteeringCWModSettings& settings,
bool force
)
) const
{
swgChannelSettings->setDirection(2); // MIMO sink
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
@ -534,20 +533,20 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgBeamSteeringCWSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgBeamSteeringCWSettings->setRollupState(swgRollupState);
}
}
void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply)
void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply) const
{
QNetworkReply::NetworkError replyError = reply->error();

View File

@ -86,67 +86,64 @@ public:
qint64 m_centerFrequency;
};
BeamSteeringCWMod(DeviceAPI *deviceAPI);
virtual ~BeamSteeringCWMod();
virtual void destroy() { delete this; }
virtual void setDeviceAPI(DeviceAPI *deviceAPI);
virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; }
explicit BeamSteeringCWMod(DeviceAPI *deviceAPI);
~BeamSteeringCWMod() final;
void destroy() final { delete this; }
void setDeviceAPI(DeviceAPI *deviceAPI) final;
DeviceAPI *getDeviceAPI() final { return m_deviceAPI; }
virtual void startSinks() {}
virtual void stopSinks() {}
virtual void startSources(); //!< thread start()
virtual void stopSources(); //!< thread exit() and wait()
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex);
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex);
virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); }
virtual QString getMIMOName() { return objectName(); }
void startSinks() final { /* Not used for MIMO */ }
void stopSinks() final { /* Not used for MIMO */ }
void startSources( /* Not used for MIMO */ ) final; //!< thread start()
void stopSources( /* Not used for MIMO */ ) final; //!< thread exit() and wait()
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final;
void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final;
void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); }
QString getMIMOName() final { return objectName(); }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual QString getIdentifier() const { return objectName(); }
virtual void getTitle(QString& title) { title = "BeamSteeringCWMod"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }
virtual void setCenterFrequency(qint64) {}
void getIdentifier(QString& id) final { id = objectName(); }
QString getIdentifier() const final { return objectName(); }
void getTitle(QString& title) final { title = "BeamSteeringCWMod"; }
qint64 getCenterFrequency() const final { return m_frequencyOffset; }
void setCenterFrequency(qint64) final { /* Not used for MIMO */ }
uint32_t getBasebandSampleRate() const { return m_basebandSampleRate; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
QByteArray serialize() const final;
bool deserialize(const QByteArray& data) final;
virtual int getNbSinkStreams() const { return 0; }
virtual int getNbSourceStreams() const { return 2; }
virtual int getStreamIndex() const { return -1; }
int getNbSinkStreams() const final { return 0; }
int getNbSourceStreams() const final { return 2; }
int getStreamIndex() const final { return -1; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const final
{
(void) streamIndex;
(void) sinkElseSource;
return m_frequencyOffset;
}
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage) final;
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage) final;
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
virtual int webapiWorkspaceGet(
SWGSDRangel::SWGWorkspaceInfo& query,
QString& errorMessage);
int webapiWorkspaceGet(
SWGSDRangel::SWGWorkspaceInfo& query,
QString& errorMessage) final;
static void webapiFormatChannelSettings(
SWGSDRangel::SWGChannelSettings& response,
const BeamSteeringCWModSettings& settings);
static void webapiUpdateChannelSettings(
BeamSteeringCWModSettings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
BeamSteeringCWModSettings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
static const char* const m_channelIdURI;
static const char* const m_channelId;
@ -161,36 +158,36 @@ private:
BasebandSampleSink* m_spectrumSink;
BasebandSampleSink* m_scopeSink;
BeamSteeringCWModSettings m_settings;
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
int64_t m_frequencyOffset;
uint32_t m_basebandSampleRate;
int m_count0, m_count1;
int m_count0;
int m_count1;
virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed
bool handleMessage(const Message& cmd) final; //!< Processing of a message. Returns true if message has actually been processed
void applySettings(const BeamSteeringCWModSettings& settings, bool force = false);
static void validateFilterChainHash(BeamSteeringCWModSettings& settings);
void calculateFrequencyOffset();
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force);
void webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force);
void sendChannelSettings(
const QList<ObjectPipe*>& pipes,
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
const BeamSteeringCWModSettings& settings,
bool force
);
) const;
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const BeamSteeringCWModSettings& settings,
bool force
);
) const;
private slots:
void handleInputMessages();
void networkManagerFinished(QNetworkReply *reply);
void networkManagerFinished(QNetworkReply *reply) const;
};
#endif // INCLUDE_BEAMSTEERINGCWSOURCE_H

View File

@ -30,15 +30,10 @@
BeamSteeringCWModGUI* BeamSteeringCWModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel)
{
BeamSteeringCWModGUI* gui = new BeamSteeringCWModGUI(pluginAPI, deviceUISet, mimoChannel);
auto* gui = new BeamSteeringCWModGUI(pluginAPI, deviceUISet, mimoChannel);
return gui;
}
void BeamSteeringCWModGUI::destroy()
{
delete this;
}
void BeamSteeringCWModGUI::resetToDefaults()
{
m_settings.resetToDefaults();
@ -67,7 +62,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message)
{
if (BeamSteeringCWMod::MsgBasebandNotification::match(message))
{
BeamSteeringCWMod::MsgBasebandNotification& notif = (BeamSteeringCWMod::MsgBasebandNotification&) message;
auto& notif = (const BeamSteeringCWMod::MsgBasebandNotification&) message;
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
displayRateAndShift();
@ -76,7 +71,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message)
}
else if (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod::match(message))
{
const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod& cfg = (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message;
auto& cfg = (const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
@ -109,7 +104,7 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_bsCWSource = (BeamSteeringCWMod*) mimoChannel;
m_bsCWSource->setMessageQueueToGUI(getInputMessageQueue());
m_bsCWSource->setMessageQueueToGUI(BeamSteeringCWModGUI::getInputMessageQueue());
m_basebandSampleRate = m_bsCWSource->getBasebandSampleRate();
connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
@ -128,7 +123,7 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de
m_deviceUISet->addChannelMarker(&m_channelMarker);
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
connect(BeamSteeringCWModGUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
displaySettings();
makeUIConnections();
@ -183,13 +178,13 @@ void BeamSteeringCWModGUI::displaySettings()
void BeamSteeringCWModGUI::displayRateAndShift()
{
int shift = m_shiftFrequencyFactor * m_basebandSampleRate;
auto shift = (int) (m_shiftFrequencyFactor * m_basebandSampleRate);
double channelSampleRate = ((double) m_basebandSampleRate) / (1<<m_settings.m_log2Interp);
QLocale loc;
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
m_channelMarker.setCenterFrequency(shift);
m_channelMarker.setBandwidth(channelSampleRate);
m_channelMarker.setBandwidth((int) channelSampleRate);
}
void BeamSteeringCWModGUI::leaveEvent(QEvent*)
@ -206,7 +201,7 @@ void BeamSteeringCWModGUI::handleSourceMessages()
{
Message* message;
while ((message = getInputMessageQueue()->pop()) != 0)
while ((message = getInputMessageQueue()->pop()) != nullptr)
{
if (handleMessage(*message))
{
@ -215,7 +210,7 @@ void BeamSteeringCWModGUI::handleSourceMessages()
}
}
void BeamSteeringCWModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void BeamSteeringCWModGUI::onWidgetRolled(const QWidget* widget, bool rollDown)
{
(void) widget;
(void) rollDown;
@ -226,7 +221,7 @@ void BeamSteeringCWModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void BeamSteeringCWModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
@ -316,7 +311,7 @@ void BeamSteeringCWModGUI::tick()
}
}
void BeamSteeringCWModGUI::makeUIConnections()
void BeamSteeringCWModGUI::makeUIConnections() const
{
QObject::connect(ui->channelOutput, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BeamSteeringCWModGUI::on_channelOutput_currentIndexChanged);
QObject::connect(ui->interpolationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BeamSteeringCWModGUI::on_interpolationFactor_currentIndexChanged);
@ -326,5 +321,5 @@ void BeamSteeringCWModGUI::makeUIConnections()
void BeamSteeringCWModGUI::updateAbsoluteCenterFrequency()
{
setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_basebandSampleRate);
setStatusFrequency(m_centerFrequency + (qint64) (m_shiftFrequencyFactor * m_basebandSampleRate));
}

View File

@ -47,22 +47,21 @@ class BeamSteeringCWModGUI : public ChannelGUI {
public:
static BeamSteeringCWModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
virtual void destroy();
virtual void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
virtual QString getTitle() const { return m_settings.m_title; };
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
virtual bool getHidden() const { return m_settings.m_hidden; }
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
virtual int getStreamIndex() const { return -1; }
virtual void setStreamIndex(int streamIndex) { (void) streamIndex; }
void resetToDefaults() final;
QByteArray serialize() const final;
bool deserialize(const QByteArray& data) final;
MessageQueue *getInputMessageQueue() final { return &m_inputMessageQueue; }
void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; };
int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; };
void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; };
QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; };
QString getTitle() const final { return m_settings.m_title; };
QColor getTitleColor() const final { return m_settings.m_rgbColor; };
void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; }
bool getHidden() const final { return m_settings.m_hidden; }
ChannelMarker& getChannelMarker() final { return m_channelMarker; }
int getStreamIndex() const final { return -1; }
void setStreamIndex(int streamIndex) final { (void) streamIndex; }
private:
Ui::BeamSteeringCWModGUI* ui;
@ -82,18 +81,18 @@ private:
uint32_t m_tickCount;
explicit BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel, QWidget* parent = nullptr);
virtual ~BeamSteeringCWModGUI();
~BeamSteeringCWModGUI() final;
void blockApplySettings(bool block);
void applySettings(bool force = false);
void displaySettings();
void displayRateAndShift();
bool handleMessage(const Message& message);
void makeUIConnections();
void makeUIConnections() const;
void updateAbsoluteCenterFrequency();
void leaveEvent(QEvent*);
void enterEvent(EnterEventType*);
void leaveEvent(QEvent*) final;
void enterEvent(EnterEventType*) final;
void applyInterpolation();
void applyPosition();
@ -104,7 +103,7 @@ private slots:
void on_interpolationFactor_currentIndexChanged(int index);
void on_position_valueChanged(int value);
void on_steeringDegrees_valueChanged(int value);
void onWidgetRolled(QWidget* widget, bool rollDown);
void onWidgetRolled(const QWidget* widget, bool rollDown);
void onMenuDialogCalled(const QPoint& p);
void tick();
};

View File

@ -48,7 +48,6 @@ DOA2::DOA2(DeviceAPI *deviceAPI) :
m_thread(nullptr),
m_basebandSink(nullptr),
m_running(false),
m_guiMessageQueue(nullptr),
m_frequencyOffset(0),
m_deviceSampleRate(48000),
m_deviceCenterFrequency(435000000)
@ -65,7 +64,7 @@ DOA2::DOA2(DeviceAPI *deviceAPI) :
this,
&DOA2::networkManagerFinished
);
startSinks();
DOA2::startSinks();
}
DOA2::~DOA2()
@ -80,7 +79,7 @@ DOA2::~DOA2()
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeMIMOChannel(this);
stopSinks();
DOA2::stopSinks();
}
void DOA2::setDeviceAPI(DeviceAPI *deviceAPI)
@ -203,7 +202,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force)
reverseAPIKeys.append("squelchdB");
if (m_running) {
m_basebandSink->setMagThreshold(CalcDb::powerFromdB(settings.m_squelchdB));
m_basebandSink->setMagThreshold((float) CalcDb::powerFromdB(settings.m_squelchdB));
}
}
@ -217,7 +216,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force)
}
if (m_running && ((m_settings.m_log2Decim != settings.m_log2Decim)
|| (m_settings.m_filterChainHash != settings.m_filterChainHash) || force))
|| (m_settings.m_filterChainHash != settings.m_filterChainHash) || force))
{
DOA2Baseband::MsgConfigureChannelizer *msg = DOA2Baseband::MsgConfigureChannelizer::create(
settings.m_log2Decim, settings.m_filterChainHash);
@ -238,7 +237,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force)
QList<ObjectPipe*> pipes;
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
if (pipes.size() > 0) {
if (!pipes.empty()) {
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
}
@ -249,7 +248,7 @@ void DOA2::handleInputMessages()
{
Message* message;
while ((message = m_inputMessageQueue.pop()) != 0)
while ((message = m_inputMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message))
{
@ -262,14 +261,14 @@ bool DOA2::handleMessage(const Message& cmd)
{
if (MsgConfigureDOA2::match(cmd))
{
MsgConfigureDOA2& cfg = (MsgConfigureDOA2&) cmd;
auto& cfg = (const MsgConfigureDOA2&) cmd;
qDebug() << "DOA2::handleMessage: MsgConfigureDOA2";
applySettings(cfg.getSettings(), cfg.getForce());
return true;
}
else if (DSPMIMOSignalNotification::match(cmd))
{
DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd;
auto& notif = (const DSPMIMOSignalNotification&) cmd;
qDebug() << "DOA2::handleMessage: DSPMIMOSignalNotification:"
<< " inputSampleRate: " << notif.getSampleRate()
@ -347,7 +346,7 @@ void DOA2::validateFilterChainHash(DOA2Settings& settings)
void DOA2::calculateFrequencyOffset()
{
double shiftFactor = HBFilterChainConverter::getShiftFactor(m_settings.m_log2Decim, m_settings.m_filterChainHash);
m_frequencyOffset = m_deviceSampleRate * shiftFactor;
m_frequencyOffset = (int64_t) (m_deviceSampleRate * shiftFactor);
}
void DOA2::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash)
@ -360,12 +359,12 @@ void DOA2::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash)
m_basebandSink->getInputMessageQueue()->push(msg);
}
float DOA2::getPhi() const
double DOA2::getPhi() const
{
return m_basebandSink ? m_basebandSink->getPhi() : 0.0f;
return m_basebandSink ? m_basebandSink->getPhi() : 0.0;
}
float DOA2::getPositiveDOA() const
double DOA2::getPositiveDOA() const
{
return std::acos(getPhi()/M_PI)*(180/M_PI);
}
@ -469,13 +468,13 @@ void DOA2::webapiUpdateChannelSettings(
settings.m_reverseAPIAddress = *response.getDoa2Settings()->getReverseApiAddress();
}
if (channelSettingsKeys.contains("reverseAPIPort")) {
settings.m_reverseAPIPort = response.getDoa2Settings()->getReverseApiPort();
settings.m_reverseAPIPort = (uint16_t) response.getDoa2Settings()->getReverseApiPort();
}
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
settings.m_reverseAPIDeviceIndex = response.getDoa2Settings()->getReverseApiDeviceIndex();
settings.m_reverseAPIDeviceIndex = (uint16_t) response.getDoa2Settings()->getReverseApiDeviceIndex();
}
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getDoa2Settings()->getReverseApiChannelIndex();
settings.m_reverseAPIChannelIndex = (uint16_t) response.getDoa2Settings()->getReverseApiChannelIndex();
}
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getDoa2Settings()->getScopeConfig());
@ -525,7 +524,7 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response
}
else
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
auto *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
response.getDoa2Settings()->setScopeConfig(swgGLScope);
}
@ -539,7 +538,7 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getDoa2Settings()->setChannelMarker(swgChannelMarker);
}
@ -553,39 +552,39 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getDoa2Settings()->setRollupState(swgRollupState);
}
}
}
void DOA2::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
void DOA2::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) const
{
float phi = normalizeAngle(getPhi() * (180/M_PI), 180.0f);
response.getDoa2Report()->setPhi(phi);
double phi = normalizeAngle(getPhi() * (180.0/M_PI), 180.0);
response.getDoa2Report()->setPhi((qint32) phi);
float hwl = 1.5e8 / (m_deviceCenterFrequency + m_frequencyOffset);
float cosTheta = (getPhi()/M_PI) * ((hwl * 1000.0) / m_settings.m_basebandDistance);
float blindAngle = (m_settings.m_basebandDistance > hwl * 1000.0) ?
double hwl = 1.5e8 / (double) (m_deviceCenterFrequency + m_frequencyOffset);
double cosTheta = (getPhi()/M_PI) * ((hwl * 1000.0) / m_settings.m_basebandDistance);
double blindAngle = (m_settings.m_basebandDistance > hwl * 1000.0) ?
std::acos((hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) :
0;
response.getDoa2Report()->setBlindAngle((int) blindAngle);
float doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180/M_PI);
double doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180.0/M_PI);
qDebug("DOA2::webapiFormatChannelReport: phi: %f cosT: %f DOAngle: %f", getPhi(), cosTheta, doaAngle);
float posAngle = normalizeAngle(m_settings.m_antennaAz - doaAngle, 360.0f); // DOA angles are trigonometric but displayed angles are clockwise
float negAngle = normalizeAngle(m_settings.m_antennaAz + doaAngle, 360.0f);
response.getDoa2Report()->setPosAz(posAngle);
response.getDoa2Report()->setNegAz(negAngle);
double posAngle = normalizeAngle(m_settings.m_antennaAz - doaAngle, 360.0); // DOA angles are trigonometric but displayed angles are clockwise
double negAngle = normalizeAngle(m_settings.m_antennaAz + doaAngle, 360.0);
response.getDoa2Report()->setPosAz((qint32) posAngle);
response.getDoa2Report()->setNegAz((qint32) negAngle);
response.getDoa2Report()->setFftSize(m_fftSize);
int channelSampleRate = m_deviceSampleRate / (1<<m_settings.m_log2Decim);
response.getDoa2Report()->setChannelSampleRate(channelSampleRate);
}
void DOA2::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DOA2Settings& settings, bool force)
void DOA2::webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const DOA2Settings& settings, bool force)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
@ -596,8 +595,8 @@ void DOA2::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const
m_networkRequest.setUrl(QUrl(channelSettingsURL));
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QBuffer *buffer = new QBuffer();
buffer->open((QBuffer::ReadWrite));
auto *buffer = new QBuffer();
buffer->open(QBuffer::ReadWrite);
buffer->write(swgChannelSettings->asJson().toUtf8());
buffer->seek(0);
@ -610,9 +609,9 @@ void DOA2::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const
void DOA2::sendChannelSettings(
const QList<ObjectPipe*>& pipes,
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
const DOA2Settings& settings,
bool force)
bool force) const
{
for (const auto& pipe : pipes)
{
@ -620,7 +619,7 @@ void DOA2::sendChannelSettings(
if (messageQueue)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
this,
@ -634,11 +633,11 @@ void DOA2::sendChannelSettings(
}
void DOA2::webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const DOA2Settings& settings,
bool force
)
) const
{
swgChannelSettings->setDirection(2); // MIMO sink
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
@ -677,29 +676,26 @@ void DOA2::webapiFormatChannelSettings(
swgDOA2Settings->setFftAveragingValue(DOA2Settings::getAveragingValue(settings.m_fftAveragingIndex));
}
if (settings.m_scopeGUI)
{
if (channelSettingsKeys.contains("scopeConfig") || force) {
settings.m_scopeGUI->formatTo(swgDOA2Settings->getScopeConfig());
}
if ((settings.m_scopeGUI) && (channelSettingsKeys.contains("scopeConfig") || force)) {
settings.m_scopeGUI->formatTo(swgDOA2Settings->getScopeConfig());
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDOA2Settings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgDOA2Settings->setRollupState(swgRollupState);
}
}
void DOA2::networkManagerFinished(QNetworkReply *reply)
void DOA2::networkManagerFinished(QNetworkReply *reply) const
{
QNetworkReply::NetworkError replyError = reply->error();
@ -720,7 +716,7 @@ void DOA2::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
float DOA2::normalizeAngle(float angle, float max)
double DOA2::normalizeAngle(double angle, double max)
{
if (angle < 0) { return max + angle; }
if (angle > max) { return angle - max; }

View File

@ -86,76 +86,73 @@ public:
qint64 m_centerFrequency;
};
DOA2(DeviceAPI *deviceAPI);
virtual ~DOA2();
virtual void destroy() { delete this; }
virtual void setDeviceAPI(DeviceAPI *deviceAPI);
virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; }
explicit DOA2(DeviceAPI *deviceAPI);
~DOA2() final;
void destroy() final { delete this; }
void setDeviceAPI(DeviceAPI *deviceAPI) final;
DeviceAPI *getDeviceAPI() final { return m_deviceAPI; }
virtual void startSinks(); //!< thread start()
virtual void stopSinks(); //!< thread exit() and wait()
virtual void startSources() {}
virtual void stopSources() {}
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex);
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex);
virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); }
virtual QString getMIMOName() { return objectName(); }
void startSinks() final; //!< thread start()
void stopSinks() final; //!< thread exit() and wait()
void startSources() final { /* Not for MIMO */ }
void stopSources() final { /* Not for MIMO */ }
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final;
void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final;
void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); }
QString getMIMOName() final { return objectName(); }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual QString getIdentifier() const { return objectName(); }
virtual void getTitle(QString& title) { title = "DOA 2 sources"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }
virtual void setCenterFrequency(qint64) {}
void getIdentifier(QString& id) final { id = objectName(); }
QString getIdentifier() const final { return objectName(); }
void getTitle(QString& title) final { title = "DOA 2 sources"; }
qint64 getCenterFrequency() const final { return m_frequencyOffset; }
void setCenterFrequency(qint64) final { /* Not for MIMO */ }
uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
QByteArray serialize() const final;
bool deserialize(const QByteArray& data) final;
virtual int getNbSinkStreams() const { return 2; }
virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return -1; }
int getNbSinkStreams() const final { return 2; }
int getNbSourceStreams() const final { return 0; }
int getStreamIndex() const final { return -1; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const final
{
(void) streamIndex;
(void) sinkElseSource;
return m_frequencyOffset;
}
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
ScopeVis *getScopeVis() { return &m_scopeSink; }
void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash);
float getPhi() const;
float getPositiveDOA() const;
double getPhi() const;
double getPositiveDOA() const;
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage) final;
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage) final;
virtual int webapiReportGet(
SWGSDRangel::SWGChannelReport& response,
QString& errorMessage);
int webapiReportGet(
SWGSDRangel::SWGChannelReport& response,
QString& errorMessage) final;
virtual int webapiWorkspaceGet(
SWGSDRangel::SWGWorkspaceInfo& query,
QString& errorMessage);
int webapiWorkspaceGet(
SWGSDRangel::SWGWorkspaceInfo& query,
QString& errorMessage) final;
static void webapiFormatChannelSettings(
SWGSDRangel::SWGChannelSettings& response,
const DOA2Settings& settings);
static void webapiUpdateChannelSettings(
DOA2Settings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
DOA2Settings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
static const char* const m_channelIdURI;
static const char* const m_channelId;
@ -169,7 +166,6 @@ private:
QMutex m_mutex;
bool m_running;
DOA2Settings m_settings;
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
@ -177,31 +173,32 @@ private:
int64_t m_frequencyOffset;
uint32_t m_deviceSampleRate;
qint64 m_deviceCenterFrequency;
int m_count0, m_count1;
int m_count0;
int m_count1;
virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed
bool handleMessage(const Message& cmd) final; //!< Processing of a message. Returns true if message has actually been processed
void applySettings(const DOA2Settings& settings, bool force = false);
static void validateFilterChainHash(DOA2Settings& settings);
void calculateFrequencyOffset();
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DOA2Settings& settings, bool force);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) const;
void webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const DOA2Settings& settings, bool force);
void sendChannelSettings(
const QList<ObjectPipe*>& pipes,
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
const DOA2Settings& settings,
bool force
);
) const;
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
const QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const DOA2Settings& settings,
bool force
);
static float normalizeAngle(float angle, float max);
) const;
static double normalizeAngle(double angle, double max);
private slots:
void handleInputMessages();
void networkManagerFinished(QNetworkReply *reply);
void networkManagerFinished(QNetworkReply *reply) const;
};
#endif // INCLUDE_DOA2_H

View File

@ -73,7 +73,7 @@ public:
private:
DOA2Settings::CorrelationType m_correlationType;
MsgConfigureCorrelation(DOA2Settings::CorrelationType correlationType) :
explicit MsgConfigureCorrelation(DOA2Settings::CorrelationType correlationType) :
Message(),
m_correlationType(correlationType)
{}
@ -103,8 +103,8 @@ public:
{ }
};
DOA2Baseband(int fftSize);
~DOA2Baseband();
explicit DOA2Baseband(int fftSize);
~DOA2Baseband() final;
void reset();
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication
@ -114,7 +114,7 @@ public:
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int streamIndex);
void setBasebandSampleRate(unsigned int sampleRate);
float getPhi() const { return m_phi; }
double getPhi() const { return m_phi; }
void setMagThreshold(float threshold) { m_magThreshold = threshold * SDR_RX_SCALED * SDR_RX_SCALED; }
void setFFTAveraging(int nbFFT);
@ -128,9 +128,9 @@ private:
DOA2Settings::CorrelationType m_correlationType;
int m_fftSize;
int m_samplesCount; //!< Number of samples processed by DOA
float m_magSum; //!< Squared magnitudes accumulator
float m_wphSum; //!< Phase difference accumulator (averaging weighted by squared magnitude)
float m_phi; //!< Resulting calculated phase difference
double m_magSum; //!< Squared magnitudes accumulator
double m_wphSum; //!< Phase difference accumulator (averaging weighted by squared magnitude)
double m_phi; //!< Resulting calculated phase difference
double m_magThreshold; //!< Squared magnitude scaled threshold
int m_fftAvg; //!< Average over a certain number of FFTs
int m_fftAvgCount; //!< FFT averaging counter

View File

@ -33,15 +33,10 @@
DOA2GUI* DOA2GUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *channelMIMO)
{
DOA2GUI* gui = new DOA2GUI(pluginAPI, deviceUISet, channelMIMO);
auto* gui = new DOA2GUI(pluginAPI, deviceUISet, channelMIMO);
return gui;
}
void DOA2GUI::destroy()
{
delete this;
}
void DOA2GUI::resetToDefaults()
{
m_settings.resetToDefaults();
@ -78,7 +73,7 @@ bool DOA2GUI::handleMessage(const Message& message)
{
if (DOA2::MsgBasebandNotification::match(message))
{
DOA2::MsgBasebandNotification& notif = (DOA2::MsgBasebandNotification&) message;
auto& notif = (const DOA2::MsgBasebandNotification&) message;
m_sampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
displayRateAndShift();
@ -88,7 +83,7 @@ bool DOA2GUI::handleMessage(const Message& message)
}
else if (DOA2::MsgConfigureDOA2::match(message))
{
const DOA2::MsgConfigureDOA2& notif = (const DOA2::MsgConfigureDOA2&) message;
auto& notif = (const DOA2::MsgConfigureDOA2&) message;
m_settings = notif.getSettings();
ui->scopeGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
@ -122,7 +117,7 @@ DOA2GUI::DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *ch
m_doa2 = (DOA2*) channelMIMO;
m_scopeVis = m_doa2->getScopeVis();
m_scopeVis->setGLScope(ui->glScope);
m_doa2->setMessageQueueToGUI(getInputMessageQueue());
m_doa2->setMessageQueueToGUI(DOA2GUI::getInputMessageQueue());
m_sampleRate = m_doa2->getDeviceSampleRate();
ui->glScope->setTraceModulo(DOA2::m_fftSize);
@ -150,7 +145,7 @@ DOA2GUI::DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *ch
ui->scopeGUI->traceLengthChange();
ui->compass->setBlindAngleBorder(true);
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
connect(DOA2GUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
displaySettings();
makeUIConnections();
@ -221,20 +216,20 @@ void DOA2GUI::displaySettings()
void DOA2GUI::displayRateAndShift()
{
int shift = m_shiftFrequencyFactor * m_sampleRate;
auto shift = (int) (m_shiftFrequencyFactor * m_sampleRate);
double channelSampleRate = ((double) m_sampleRate) / (1<<m_settings.m_log2Decim);
QLocale loc;
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
m_channelMarker.setCenterFrequency(shift);
m_channelMarker.setBandwidth(channelSampleRate);
m_scopeVis->setLiveRate(channelSampleRate);
m_channelMarker.setBandwidth((int) channelSampleRate);
m_scopeVis->setLiveRate((int) channelSampleRate);
}
void DOA2GUI::setFFTAveragingTooltip()
{
float channelSampleRate = ((float) m_sampleRate) / (1<<m_settings.m_log2Decim);
float averagingTime = (DOA2::m_fftSize * DOA2Settings::getAveragingValue(m_settings.m_fftAveragingIndex)) /
float channelSampleRate = ((float) m_sampleRate) / ((float) (1<<m_settings.m_log2Decim));
float averagingTime = ((float) DOA2::m_fftSize * (float) DOA2Settings::getAveragingValue(m_settings.m_fftAveragingIndex)) /
channelSampleRate;
QString s;
setNumberStr(averagingTime, 2, s);
@ -274,7 +269,7 @@ void DOA2GUI::handleSourceMessages()
{
Message* message;
while ((message = getInputMessageQueue()->pop()) != 0)
while ((message = getInputMessageQueue()->pop()) != nullptr)
{
if (handleMessage(*message))
{
@ -283,7 +278,7 @@ void DOA2GUI::handleSourceMessages()
}
}
void DOA2GUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DOA2GUI::onWidgetRolled(const QWidget* widget, bool rollDown)
{
(void) widget;
(void) rollDown;
@ -294,7 +289,7 @@ void DOA2GUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DOA2GUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
@ -434,7 +429,7 @@ void DOA2GUI::tick()
}
}
void DOA2GUI::makeUIConnections()
void DOA2GUI::makeUIConnections() const
{
QObject::connect(ui->decimationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DOA2GUI::on_decimationFactor_currentIndexChanged);
QObject::connect(ui->position, &QSlider::valueChanged, this, &DOA2GUI::on_position_valueChanged);
@ -449,9 +444,9 @@ void DOA2GUI::makeUIConnections()
void DOA2GUI::updateAbsoluteCenterFrequency()
{
qint64 cf = m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate;
auto cf = (qint64) ((double) m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate);
setStatusFrequency(cf);
m_hwl = 1.5e+8 / cf;
m_hwl = 1.5e+8 / (double) cf;
ui->halfWLText->setText(tr("%1").arg(m_hwl*1000, 5, 'f', 0));
updateScopeFScale();
}
@ -470,14 +465,14 @@ void DOA2GUI::updateScopeFScale()
void DOA2GUI::updateDOA()
{
float cosTheta = (m_doa2->getPhi()/M_PI) * ((m_hwl * 1000.0) / m_settings.m_basebandDistance);
float blindAngle = (m_settings.m_basebandDistance > m_hwl * 1000.0) ?
double cosTheta = (m_doa2->getPhi()/M_PI) * ((m_hwl * 1000.0) / m_settings.m_basebandDistance);
double blindAngle = (m_settings.m_basebandDistance > m_hwl * 1000.0) ?
std::acos((m_hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) :
0;
ui->compass->setBlindAngle(blindAngle);
float doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180/M_PI);
float posAngle = ui->antAz->value() - doaAngle; // DOA angles are trigonometric but displayed angles are clockwise
float negAngle = ui->antAz->value() + doaAngle;
double doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180/M_PI);
double posAngle = ui->antAz->value() - doaAngle; // DOA angles are trigonometric but displayed angles are clockwise
double negAngle = ui->antAz->value() + doaAngle;
ui->compass->setAzPos(posAngle);
ui->compass->setAzNeg(negAngle);
ui->posText->setText(tr("%1").arg(ui->compass->getAzPos(), 3, 'f', 0, QLatin1Char('0')));

View File

@ -46,22 +46,21 @@ class DOA2GUI : public ChannelGUI {
public:
static DOA2GUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
virtual void destroy();
virtual void resetToDefaults();
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue* getInputMessageQueue();
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
virtual QString getTitle() const { return m_settings.m_title; };
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
virtual bool getHidden() const { return m_settings.m_hidden; }
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
virtual int getStreamIndex() const { return -1; }
virtual void setStreamIndex(int streamIndex) { (void) streamIndex; }
void resetToDefaults() final;
QByteArray serialize() const final;
bool deserialize(const QByteArray& data) final;
MessageQueue* getInputMessageQueue() final;
void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; };
int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; };
void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; };
QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; };
QString getTitle() const final { return m_settings.m_title; };
QColor getTitleColor() const final { return m_settings.m_rgbColor; };
void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; }
bool getHidden() const final { return m_settings.m_hidden; }
ChannelMarker& getChannelMarker() final { return m_channelMarker; }
int getStreamIndex() const final { return -1; }
void setStreamIndex(int streamIndex) final { (void) streamIndex; }
private:
Ui::DOA2GUI* ui;
@ -82,7 +81,7 @@ private:
double m_hwl; //!< Half wavelength at center frequency
explicit DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr);
virtual ~DOA2GUI();
~DOA2GUI() final;
void blockApplySettings(bool block);
void applySettings(bool force = false);
@ -93,13 +92,13 @@ private:
void setFFTAveragingTooltip();
static void setNumberStr(float v, int decimalPlaces, QString& s);
bool handleMessage(const Message& message);
void makeUIConnections();
void makeUIConnections() const;
void updateAbsoluteCenterFrequency();
void updateScopeFScale();
void updateDOA();
void leaveEvent(QEvent*);
void enterEvent(EnterEventType*);
void leaveEvent(QEvent*) final;
void enterEvent(EnterEventType*) final;
private slots:
void handleSourceMessages();
@ -112,7 +111,7 @@ private slots:
void on_squelch_valueChanged(int value);
void on_fftAveraging_currentIndexChanged(int index);
void on_centerPosition_clicked();
void onWidgetRolled(QWidget* widget, bool rollDown);
void onWidgetRolled(const QWidget* widget, bool rollDown);
void onMenuDialogCalled(const QPoint& p);
void tick();
};

View File

@ -83,7 +83,7 @@ Interferometer::Interferometer(DeviceAPI *deviceAPI) :
&Interferometer::updateDeviceSetList
);
updateDeviceSetList();
startSinks();
Interferometer::startSinks();
}
Interferometer::~Interferometer()
@ -98,7 +98,7 @@ Interferometer::~Interferometer()
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeMIMOChannel(this);
stopSinks();
Interferometer::stopSinks();
}
void Interferometer::setDeviceAPI(DeviceAPI *deviceAPI)
@ -229,7 +229,7 @@ void Interferometer::applySettings(const InterferometerSettings& settings, const
QList<ObjectPipe*> pipes;
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
if (pipes.size() > 0) {
if (!pipes.empty()) {
sendChannelSettings(pipes, settingsKeys, settings, force);
}
@ -254,7 +254,7 @@ void Interferometer::handleInputMessages()
{
Message* message;
while ((message = m_inputMessageQueue.pop()) != 0)
while ((message = m_inputMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message))
{
@ -267,14 +267,14 @@ bool Interferometer::handleMessage(const Message& cmd)
{
if (MsgConfigureInterferometer::match(cmd))
{
MsgConfigureInterferometer& cfg = (MsgConfigureInterferometer&) cmd;
auto& cfg = (const MsgConfigureInterferometer&) cmd;
qDebug() << "Interferometer::handleMessage: MsgConfigureInterferometer";
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
return true;
}
else if (DSPMIMOSignalNotification::match(cmd))
{
DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd;
auto& notif = (const DSPMIMOSignalNotification&) cmd;
qDebug() << "Interferometer::handleMessage: DSPMIMOSignalNotification:"
<< " inputSampleRate: " << notif.getSampleRate()
@ -355,7 +355,7 @@ void Interferometer::validateFilterChainHash(InterferometerSettings& settings)
void Interferometer::calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash)
{
double shiftFactor = HBFilterChainConverter::getShiftFactor(log2Decim, filterChainHash);
m_frequencyOffset = m_deviceSampleRate * shiftFactor;
m_frequencyOffset = (int64_t) (m_deviceSampleRate * shiftFactor);
}
void Interferometer::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash)
@ -383,7 +383,7 @@ void Interferometer::updateDeviceSetList()
if (deviceSourceEngine)
{
DeviceSampleSource *deviceSource = deviceSourceEngine->getSource();
const DeviceSampleSource *deviceSource = deviceSourceEngine->getSource();
if (deviceSource->getDeviceDescription() == "LocalInput") {
m_localInputDeviceIndexes.append(deviceSetIndex);
@ -401,7 +401,7 @@ void Interferometer::updateDeviceSetList()
InterferometerSettings settings = m_settings;
int newIndexInList;
if (m_localInputDeviceIndexes.size() != 0) // there are some local input devices
if (!m_localInputDeviceIndexes.empty()) // there are some local input devices
{
if (m_settings.m_localDeviceIndex < 0) { // not set before
newIndexInList = 0; // set to first device in list
@ -574,13 +574,13 @@ void Interferometer::webapiUpdateChannelSettings(
settings.m_reverseAPIAddress = *response.getInterferometerSettings()->getReverseApiAddress();
}
if (channelSettingsKeys.contains("reverseAPIPort")) {
settings.m_reverseAPIPort = response.getInterferometerSettings()->getReverseApiPort();
settings.m_reverseAPIPort = (uint16_t) response.getInterferometerSettings()->getReverseApiPort();
}
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
settings.m_reverseAPIDeviceIndex = response.getInterferometerSettings()->getReverseApiDeviceIndex();
settings.m_reverseAPIDeviceIndex = (uint16_t) response.getInterferometerSettings()->getReverseApiDeviceIndex();
}
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getInterferometerSettings()->getReverseApiChannelIndex();
settings.m_reverseAPIChannelIndex = (uint16_t) response.getInterferometerSettings()->getReverseApiChannelIndex();
}
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getSpectrumConfig());
@ -632,7 +632,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
}
else
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
auto *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
response.getInterferometerSettings()->setSpectrumConfig(swgGLSpectrum);
}
@ -646,7 +646,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
}
else
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
auto *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
response.getInterferometerSettings()->setScopeConfig(swgGLScope);
}
@ -660,7 +660,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getInterferometerSettings()->setChannelMarker(swgChannelMarker);
}
@ -674,7 +674,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getInterferometerSettings()->setRollupState(swgRollupState);
}
@ -683,7 +683,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
void Interferometer::webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const InterferometerSettings& settings, bool force)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
@ -694,8 +694,8 @@ void Interferometer::webapiReverseSendSettings(const QList<QString>& channelSett
m_networkRequest.setUrl(QUrl(channelSettingsURL));
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QBuffer *buffer = new QBuffer();
buffer->open((QBuffer::ReadWrite));
auto *buffer = new QBuffer();
buffer->open(QBuffer::ReadWrite);
buffer->write(swgChannelSettings->asJson().toUtf8());
buffer->seek(0);
@ -710,7 +710,7 @@ void Interferometer::sendChannelSettings(
const QList<ObjectPipe*>& pipes,
const QList<QString>& channelSettingsKeys,
const InterferometerSettings& settings,
bool force)
bool force) const
{
for (const auto& pipe : pipes)
{
@ -718,7 +718,7 @@ void Interferometer::sendChannelSettings(
if (messageQueue)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
this,
@ -736,7 +736,7 @@ void Interferometer::webapiFormatChannelSettings(
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const InterferometerSettings& settings,
bool force
)
) const
{
swgChannelSettings->setDirection(2); // MIMO sink
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
@ -774,34 +774,34 @@ void Interferometer::webapiFormatChannelSettings(
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrumConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
auto *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgInterferometerSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
auto *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
swgInterferometerSettings->setScopeConfig(swgGLScope);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgInterferometerSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgInterferometerSettings->setRollupState(swgRollupState);
}
}
void Interferometer::networkManagerFinished(QNetworkReply *reply)
void Interferometer::networkManagerFinished(QNetworkReply *reply) const
{
QNetworkReply::NetworkError replyError = reply->error();

View File

@ -108,72 +108,69 @@ public:
{ }
};
Interferometer(DeviceAPI *deviceAPI);
virtual ~Interferometer();
virtual void destroy() { delete this; }
virtual void setDeviceAPI(DeviceAPI *deviceAPI);
virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; }
explicit Interferometer(DeviceAPI *deviceAPI);
~Interferometer() final;
void destroy() final { delete this; }
void setDeviceAPI(DeviceAPI *deviceAPI) final;
DeviceAPI *getDeviceAPI() final { return m_deviceAPI; }
virtual void startSinks(); //!< thread start()
virtual void stopSinks(); //!< thread exit() and wait()
virtual void startSources() {}
virtual void stopSources() {}
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex);
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex);
virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); }
virtual QString getMIMOName() { return objectName(); }
void startSinks() final; //!< thread start()
void stopSinks() final; //!< thread exit() and wait()
void startSources() final { /* not for MIMMO*/ }
void stopSources() final { /* not for MIMMO*/ }
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final;
void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final;
void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); }
QString getMIMOName() final { return objectName(); }
virtual void getIdentifier(QString& id) { id = objectName(); }
virtual QString getIdentifier() const { return objectName(); }
virtual void getTitle(QString& title) { title = "Interferometer"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }
virtual void setCenterFrequency(qint64) {}
void getIdentifier(QString& id) final { id = objectName(); }
QString getIdentifier() const final { return objectName(); }
void getTitle(QString& title) final { title = "Interferometer"; }
qint64 getCenterFrequency() const final { return m_frequencyOffset; }
void setCenterFrequency(qint64) final { /* not for MIMMO*/ }
uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; }
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
QByteArray serialize() const final;
bool deserialize(const QByteArray& data) final;
virtual int getNbSinkStreams() const { return 2; }
virtual int getNbSourceStreams() const { return 0; }
virtual int getStreamIndex() const { return -1; }
int getNbSinkStreams() const final { return 2; }
int getNbSourceStreams() const final { return 0; }
int getStreamIndex() const final { return -1; }
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const final
{
(void) streamIndex;
(void) sinkElseSource;
return m_frequencyOffset;
}
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
ScopeVis *getScopeVis() { return &m_scopeSink; }
void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash);
const QList<int>& getDeviceSetList() { return m_localInputDeviceIndexes; }
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage) final;
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage) final;
virtual int webapiWorkspaceGet(
SWGSDRangel::SWGWorkspaceInfo& query,
QString& errorMessage);
int webapiWorkspaceGet(
SWGSDRangel::SWGWorkspaceInfo& query,
QString& errorMessage) final;
static void webapiFormatChannelSettings(
SWGSDRangel::SWGChannelSettings& response,
const InterferometerSettings& settings);
static void webapiUpdateChannelSettings(
InterferometerSettings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
InterferometerSettings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
static const char* const m_channelIdURI;
static const char* const m_channelId;
@ -196,11 +193,12 @@ private:
uint64_t m_centerFrequency;
int64_t m_frequencyOffset;
uint32_t m_deviceSampleRate;
int m_count0, m_count1;
int m_count0;
int m_count1;
QList<int> m_localInputDeviceIndexes;
virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed
bool handleMessage(const Message& cmd) final; //!< Processing of a message. Returns true if message has actually been processed
void applySettings(const InterferometerSettings& settings, const QList<QString>& settingsKeys, bool force = false);
static void validateFilterChainHash(InterferometerSettings& settings);
void calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash);
@ -213,17 +211,17 @@ private:
const QList<QString>& channelSettingsKeys,
const InterferometerSettings& settings,
bool force
);
) const;
void webapiFormatChannelSettings(
const QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const InterferometerSettings& settings,
bool force
);
) const;
private slots:
void handleInputMessages();
void networkManagerFinished(QNetworkReply *reply);
void networkManagerFinished(QNetworkReply *reply) const;
};
#endif // INCLUDE_INTERFEROMETER_H

View File

@ -32,15 +32,10 @@
InterferometerGUI* InterferometerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *channelMIMO)
{
InterferometerGUI* gui = new InterferometerGUI(pluginAPI, deviceUISet, channelMIMO);
auto* gui = new InterferometerGUI(pluginAPI, deviceUISet, channelMIMO);
return gui;
}
void InterferometerGUI::destroy()
{
delete this;
}
void InterferometerGUI::resetToDefaults()
{
m_settings.resetToDefaults();
@ -77,7 +72,7 @@ bool InterferometerGUI::handleMessage(const Message& message)
{
if (Interferometer::MsgBasebandNotification::match(message))
{
Interferometer::MsgBasebandNotification& notif = (Interferometer::MsgBasebandNotification&) message;
auto& notif = (const Interferometer::MsgBasebandNotification&) message;
m_sampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
displayRateAndShift();
@ -86,7 +81,7 @@ bool InterferometerGUI::handleMessage(const Message& message)
}
else if (Interferometer::MsgConfigureInterferometer::match(message))
{
const Interferometer::MsgConfigureInterferometer& cfg = (const Interferometer::MsgConfigureInterferometer&) message;
auto& cfg = (const Interferometer::MsgConfigureInterferometer&) message;
if (cfg.getForce()) {
m_settings = cfg.getSettings();
@ -102,7 +97,8 @@ bool InterferometerGUI::handleMessage(const Message& message)
}
else if (Interferometer::MsgReportDevices::match(message))
{
Interferometer::MsgReportDevices& report = (Interferometer::MsgReportDevices&) message;
auto& msg = const_cast<Message&>(message);
auto& report = (Interferometer::MsgReportDevices&) msg;
updateDeviceSetList(report.getDeviceSetIndexes());
return true;
}
@ -135,7 +131,7 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_spectrumVis->setGLSpectrum(ui->glSpectrum);
m_scopeVis = m_interferometer->getScopeVis();
m_scopeVis->setGLScope(ui->glScope);
m_interferometer->setMessageQueueToGUI(getInputMessageQueue());
m_interferometer->setMessageQueueToGUI(InterferometerGUI::getInputMessageQueue());
m_sampleRate = m_interferometer->getDeviceSampleRate();
ui->spectrumGUI->setBuddies(m_spectrumVis, ui->glSpectrum);
@ -175,7 +171,7 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_scopeVis->setTraceChunkSize(Interferometer::m_fftSize); // Set scope trace length unit to FFT size
ui->scopeGUI->traceLengthChange();
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
connect(InterferometerGUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
updateDeviceSetList(m_interferometer->getDeviceSetList());
displaySettings();
@ -243,15 +239,15 @@ void InterferometerGUI::displaySettings()
void InterferometerGUI::displayRateAndShift()
{
int shift = m_shiftFrequencyFactor * m_sampleRate;
auto shift = (int) (m_shiftFrequencyFactor * m_sampleRate);
double channelSampleRate = ((double) m_sampleRate) / (1<<m_settings.m_log2Decim);
QLocale loc;
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
m_channelMarker.setCenterFrequency(shift);
m_channelMarker.setBandwidth(channelSampleRate);
ui->glSpectrum->setSampleRate(channelSampleRate);
m_scopeVis->setLiveRate(channelSampleRate);
m_channelMarker.setBandwidth((int) channelSampleRate);
ui->glSpectrum->setSampleRate((int) channelSampleRate);
m_scopeVis->setLiveRate((int) channelSampleRate);
}
void InterferometerGUI::leaveEvent(QEvent*)
@ -268,7 +264,7 @@ void InterferometerGUI::handleSourceMessages()
{
Message* message;
while ((message = getInputMessageQueue()->pop()) != 0)
while ((message = getInputMessageQueue()->pop()) != nullptr)
{
if (handleMessage(*message))
{
@ -277,7 +273,7 @@ void InterferometerGUI::handleSourceMessages()
}
}
void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void InterferometerGUI::onWidgetRolled(const QWidget* widget, bool rollDown)
{
(void) widget;
(void) rollDown;
@ -288,7 +284,7 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void InterferometerGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
@ -330,7 +326,7 @@ void InterferometerGUI::onMenuDialogCalled(const QPoint &p)
void InterferometerGUI::updateDeviceSetList(const QList<int>& deviceSetIndexes)
{
QList<int>::const_iterator it = deviceSetIndexes.begin();
auto it = deviceSetIndexes.begin();
ui->localDevice->blockSignals(true);
@ -343,7 +339,7 @@ void InterferometerGUI::updateDeviceSetList(const QList<int>& deviceSetIndexes)
ui->localDevice->blockSignals(false);
}
int InterferometerGUI::getLocalDeviceIndexInCombo(int localDeviceIndex)
int InterferometerGUI::getLocalDeviceIndexInCombo(int localDeviceIndex) const
{
int index = 0;
@ -457,7 +453,7 @@ void InterferometerGUI::tick()
}
}
void InterferometerGUI::makeUIConnections()
void InterferometerGUI::makeUIConnections() const
{
QObject::connect(ui->decimationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &InterferometerGUI::on_decimationFactor_currentIndexChanged);
QObject::connect(ui->position, &QSlider::valueChanged, this, &InterferometerGUI::on_position_valueChanged);
@ -472,5 +468,5 @@ void InterferometerGUI::makeUIConnections()
void InterferometerGUI::updateAbsoluteCenterFrequency()
{
setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate);
setStatusFrequency((qint64) ((double) m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate));
}

View File

@ -46,22 +46,21 @@ class InterferometerGUI : public ChannelGUI {
public:
static InterferometerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
virtual void destroy();
virtual void resetToDefaults();
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue* getInputMessageQueue();
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
virtual QString getTitle() const { return m_settings.m_title; };
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
virtual bool getHidden() const { return m_settings.m_hidden; }
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
virtual int getStreamIndex() const { return -1; }
virtual void setStreamIndex(int streamIndex) { (void) streamIndex; }
void resetToDefaults() final;
QByteArray serialize() const final;
bool deserialize(const QByteArray& data) final;
MessageQueue* getInputMessageQueue() final;
void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; };
int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; };
void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; };
QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; };
QString getTitle() const final { return m_settings.m_title; };
QColor getTitleColor() const final { return m_settings.m_rgbColor; };
void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; }
bool getHidden() const final { return m_settings.m_hidden; }
ChannelMarker& getChannelMarker() final { return m_channelMarker; }
int getStreamIndex() const final { return -1; }
void setStreamIndex(int streamIndex) final { (void) streamIndex; }
private:
Ui::InterferometerGUI* ui;
@ -83,7 +82,7 @@ private:
uint32_t m_tickCount;
explicit InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr);
virtual ~InterferometerGUI();
~InterferometerGUI() final;
void blockApplySettings(bool block);
void applySettings(bool force = false);
@ -92,13 +91,13 @@ private:
void displaySettings();
void displayRateAndShift();
bool handleMessage(const Message& message);
void makeUIConnections();
void makeUIConnections() const;
void updateAbsoluteCenterFrequency();
void updateDeviceSetList(const QList<int>& deviceSetIndexes);
int getLocalDeviceIndexInCombo(int localDeviceIndex);
int getLocalDeviceIndexInCombo(int localDeviceIndex) const;
void leaveEvent(QEvent*);
void enterEvent(EnterEventType*);
void leaveEvent(QEvent*) final;
void enterEvent(EnterEventType*) final;
private slots:
void handleSourceMessages();
@ -111,7 +110,7 @@ private slots:
void on_correlationType_currentIndexChanged(int index);
void on_localDevice_currentIndexChanged(int index);
void on_localDevicePlay_toggled(bool checked);
void onWidgetRolled(QWidget* widget, bool rollDown);
void onWidgetRolled(const QWidget* widget, bool rollDown);
void onMenuDialogCalled(const QPoint& p);
void tick();
};

View File

@ -474,7 +474,7 @@ void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ChannelAnalyzerGUI::onMenuDialogCalled(const QPoint& p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -138,11 +138,6 @@ public:
m_basebandSink->resetMagLevels();
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;
static const char * const m_channelIdURI;

View File

@ -200,7 +200,7 @@ void ChannelPowerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ChannelPowerGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -152,7 +152,7 @@ public:
SWGSDRangel::SWGChannelSettings& response);
void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); }
void setMessageQueueToGUI(MessageQueue* queue) override {
void setMessageQueueToGUI(MessageQueue* queue) final {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}

View File

@ -3904,7 +3904,7 @@ void ADSBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ADSBDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -163,10 +163,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -667,7 +667,7 @@ void AISDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void AISDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -394,7 +394,7 @@ void AMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void AMDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -556,7 +556,7 @@ void APTDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void APTDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -207,7 +207,7 @@ void ATVDemodGUI::handleSourceMessages()
void ATVDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -332,7 +332,7 @@ void BFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -349,7 +349,7 @@ void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ChirpChatDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -392,10 +392,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;
int getAudioSampleRate() const { return m_basebandSink->getAudioSampleRate(); }

View File

@ -451,7 +451,7 @@ void DABDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DABDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -169,7 +169,7 @@ void DATVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DATVDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -163,10 +163,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -493,7 +493,7 @@ void DSCDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DSCDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -297,7 +297,7 @@ void DSDDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -137,10 +137,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -373,7 +373,7 @@ void EndOfTrainDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void EndOfTrainDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -201,7 +201,7 @@ void FreeDVDemodGUI::on_spanLog2_valueChanged(int value)
void FreeDVDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -102,7 +102,7 @@ public:
}
void setDeviceCenterFrequency(qint64 centerFrequency, int index);
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }

View File

@ -542,7 +542,7 @@ void FT8DemodGUI::on_settings_clicked()
void FT8DemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -179,10 +179,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -946,7 +946,7 @@ void ILSDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ILSDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -349,7 +349,7 @@ void M17DemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void M17DemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -183,10 +183,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -450,7 +450,7 @@ void NavtexDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void NavtexDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -135,7 +135,6 @@ public:
}
}
void setMessageQueueToGUI(MessageQueue* queue) override { ChannelAPI::setMessageQueueToGUI(queue); }
int getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
uint32_t getNumberOfDeviceStreams() const;

View File

@ -318,7 +318,7 @@ void NFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void NFMDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -134,10 +134,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -372,7 +372,7 @@ void PacketDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void PacketDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -190,10 +190,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -424,7 +424,7 @@ void PagerDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void PagerDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -501,7 +501,7 @@ void RadiosondeDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RadiosondeDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -177,10 +177,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -358,7 +358,7 @@ void RttyDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RttyDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -101,7 +101,7 @@ public:
return m_settings.m_inputFrequencyOffset;
}
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
uint32_t getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }

View File

@ -299,7 +299,7 @@ void SSBDemodGUI::on_filterIndex_valueChanged(int value)
void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -238,7 +238,7 @@ void VORDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void VORDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -125,7 +125,7 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
void setMessageQueueToGUI(MessageQueue* queue) override {
void setMessageQueueToGUI(MessageQueue* queue) final {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}

View File

@ -1111,7 +1111,7 @@ void VORDemodMCGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void VORDemodMCGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -180,7 +180,7 @@ void WFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void WFMDemodGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -148,7 +148,7 @@ public:
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
void getLocalDevices(std::vector<uint32_t>& indexes);
uint32_t getNumberOfDeviceStreams() const;
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }

View File

@ -363,7 +363,7 @@ void FileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void FileSinkGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -355,7 +355,7 @@ public:
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
void setMessageQueueToGUI(MessageQueue* queue) override {
void setMessageQueueToGUI(MessageQueue* queue) final {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}

View File

@ -377,7 +377,7 @@ void FreqScannerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void FreqScannerGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -264,7 +264,7 @@ void FreqTrackerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void FreqTrackerGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -143,11 +143,6 @@ public:
m_basebandSink->resetMagLevels();
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;
static const char * const m_channelIdURI;

View File

@ -483,7 +483,7 @@ void HeatMapGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void HeatMapGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -333,7 +333,7 @@ void LocalSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void LocalSinkGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -540,7 +540,7 @@ void NoiseFigureGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void NoiseFigureGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -442,10 +442,6 @@ public:
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
}
/* void setMessageQueueToGUI(MessageQueue* queue) override {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}*/
uint32_t getNumberOfDeviceStreams() const;

View File

@ -1940,7 +1940,7 @@ void RadioAstronomyGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RadioAstronomyGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -282,7 +282,7 @@ void RadioClockGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RadioClockGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -233,7 +233,7 @@ void RemoteSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RemoteSinkGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -164,7 +164,7 @@ public:
uint32_t getNumberOfDeviceStreams() const;
int getBasebandSampleRate() const { return m_basebandSampleRate; }
void setMessageQueueToGUI(MessageQueue* queue) override {
void setMessageQueueToGUI(MessageQueue* queue) final {
ChannelAPI::setMessageQueueToGUI(queue);
m_basebandSink->setMessageQueueToGUI(queue);
}

View File

@ -318,7 +318,7 @@ void RemoteTCPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RemoteTCPSinkGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -148,7 +148,7 @@ public:
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
void getLocalDevices(std::vector<uint32_t>& indexes);
uint32_t getNumberOfDeviceStreams() const;
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }

View File

@ -357,7 +357,7 @@ void SigMFFileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void SigMFFileSinkGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -615,7 +615,7 @@ void UDPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void UDPSinkGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -101,7 +101,7 @@ public:
return m_settings.m_inputFrequencyOffset;
}
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
uint32_t getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }

View File

@ -434,7 +434,7 @@ void WDSPRxGUI::on_demod_currentIndexChanged(int index)
void WDSPRxGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -219,7 +219,7 @@ public:
double getMagSq() const;
void getMagSqLevels(double& avg, double& peak, int& nbSamples) const;
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
uint32_t getNumberOfDeviceStreams() const;
static const char* const m_channelIdURI;

View File

@ -369,7 +369,7 @@ void FileSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void FileSourceGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -237,7 +237,7 @@ void LocalSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void LocalSourceGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -331,7 +331,7 @@ void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void IEEE_802_15_4_ModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -353,7 +353,7 @@ void AISModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void AISModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -296,7 +296,7 @@ void AMModGUI::onWidgetRolled(const QWidget* widget, bool rollDown)
void AMModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -309,7 +309,7 @@ public:
void setLevelMeter(QObject *levelMeter);
int getEffectiveSampleRate() const;
void getCameraNumbers(std::vector<int>& numbers);
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
static const char* const m_channelIdURI;
static const char* const m_channelId;

View File

@ -702,7 +702,7 @@ void ATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ATVModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -370,7 +370,7 @@ void ChirpChatModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void ChirpChatModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -262,7 +262,7 @@ public:
uint32_t getNumberOfDeviceStreams() const;
double getMagSq() const;
int getEffectiveSampleRate() const;
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
static const char* const m_channelIdURI;
static const char* const m_channelId;

View File

@ -497,7 +497,7 @@ void DATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void DATVModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -306,7 +306,7 @@ void FreeDVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void FreeDVModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -402,7 +402,7 @@ void M17ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void M17ModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -384,7 +384,7 @@ void NFMModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void NFMModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -399,7 +399,7 @@ void PacketModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void PacketModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -194,7 +194,7 @@ public:
void setLevelMeter(QObject *levelMeter);
uint32_t getNumberOfDeviceStreams() const;
int getSourceChannelSampleRate() const;
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
static const char* const m_channelIdURI;
static const char* const m_channelId;

View File

@ -283,7 +283,7 @@ void PSK31GUI::onWidgetRolled(QWidget* widget, bool rollDown)
void PSK31GUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -194,7 +194,7 @@ public:
void setLevelMeter(QObject *levelMeter);
uint32_t getNumberOfDeviceStreams() const;
int getSourceChannelSampleRate() const;
void setMessageQueueToGUI(MessageQueue* queue) override;
void setMessageQueueToGUI(MessageQueue* queue) final;
static const char* const m_channelIdURI;
static const char* const m_channelId;

View File

@ -362,7 +362,7 @@ void RttyModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RttyModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -371,7 +371,7 @@ void SSBModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void SSBModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -300,7 +300,7 @@ void WFMModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void WFMModGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -310,7 +310,7 @@ void RemoteSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -495,7 +495,7 @@ void UDPSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
void UDPSourceGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);

View File

@ -278,7 +278,7 @@ void AFCGUI::updateDeviceSetLists(const AFC::MsgDeviceSetListsReport& report)
void AFCGUI::onMenuDialogCalled(const QPoint &p)
{
if (m_contextMenuType == ContextMenuChannelSettings)
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
{
BasicFeatureSettingsDialog dialog(this);
dialog.setTitle(m_settings.m_title);

Some files were not shown because too many files have changed in this diff Show More