mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Compare commits
5 Commits
42cabeb96d
...
4c62d486dc
Author | SHA1 | Date | |
---|---|---|---|
|
4c62d486dc | ||
|
b3215ce3d6 | ||
|
a014491e61 | ||
|
6b2573d955 | ||
|
72683aea57 |
@ -46,7 +46,6 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) :
|
|||||||
m_thread(nullptr),
|
m_thread(nullptr),
|
||||||
m_basebandSource(nullptr),
|
m_basebandSource(nullptr),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_guiMessageQueue(nullptr),
|
|
||||||
m_frequencyOffset(0),
|
m_frequencyOffset(0),
|
||||||
m_basebandSampleRate(48000)
|
m_basebandSampleRate(48000)
|
||||||
{
|
{
|
||||||
@ -62,7 +61,7 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) :
|
|||||||
this,
|
this,
|
||||||
&BeamSteeringCWMod::networkManagerFinished
|
&BeamSteeringCWMod::networkManagerFinished
|
||||||
);
|
);
|
||||||
startSources();
|
BeamSteeringCWMod::startSources();
|
||||||
}
|
}
|
||||||
|
|
||||||
BeamSteeringCWMod::~BeamSteeringCWMod()
|
BeamSteeringCWMod::~BeamSteeringCWMod()
|
||||||
@ -77,7 +76,7 @@ BeamSteeringCWMod::~BeamSteeringCWMod()
|
|||||||
|
|
||||||
m_deviceAPI->removeChannelSinkAPI(this);
|
m_deviceAPI->removeChannelSinkAPI(this);
|
||||||
m_deviceAPI->removeMIMOChannel(this);
|
m_deviceAPI->removeMIMOChannel(this);
|
||||||
stopSources();
|
BeamSteeringCWMod::stopSources();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BeamSteeringCWMod::setDeviceAPI(DeviceAPI *deviceAPI)
|
void BeamSteeringCWMod::setDeviceAPI(DeviceAPI *deviceAPI)
|
||||||
@ -194,7 +193,7 @@ void BeamSteeringCWMod::applySettings(const BeamSteeringCWModSettings& settings,
|
|||||||
QList<ObjectPipe*> pipes;
|
QList<ObjectPipe*> pipes;
|
||||||
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
||||||
|
|
||||||
if (pipes.size() > 0) {
|
if (!pipes.empty()) {
|
||||||
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
|
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +204,7 @@ void BeamSteeringCWMod::handleInputMessages()
|
|||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
while ((message = m_inputMessageQueue.pop()) != nullptr)
|
||||||
{
|
{
|
||||||
if (handleMessage(*message))
|
if (handleMessage(*message))
|
||||||
{
|
{
|
||||||
@ -218,14 +217,14 @@ bool BeamSteeringCWMod::handleMessage(const Message& cmd)
|
|||||||
{
|
{
|
||||||
if (MsgConfigureBeamSteeringCWMod::match(cmd))
|
if (MsgConfigureBeamSteeringCWMod::match(cmd))
|
||||||
{
|
{
|
||||||
MsgConfigureBeamSteeringCWMod& cfg = (MsgConfigureBeamSteeringCWMod&) cmd;
|
auto& cfg = (const MsgConfigureBeamSteeringCWMod&) cmd;
|
||||||
qDebug() << "BeamSteeringCWMod::handleMessage: MsgConfigureBeamSteeringCWMod";
|
qDebug() << "BeamSteeringCWMod::handleMessage: MsgConfigureBeamSteeringCWMod";
|
||||||
applySettings(cfg.getSettings(), cfg.getForce());
|
applySettings(cfg.getSettings(), cfg.getForce());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DSPMIMOSignalNotification::match(cmd))
|
else if (DSPMIMOSignalNotification::match(cmd))
|
||||||
{
|
{
|
||||||
DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd;
|
auto& notif = (const DSPMIMOSignalNotification&) cmd;
|
||||||
|
|
||||||
qDebug() << "BeamSteeringCWMod::handleMessage: DSPMIMOSignalNotification:"
|
qDebug() << "BeamSteeringCWMod::handleMessage: DSPMIMOSignalNotification:"
|
||||||
<< " basebandSampleRate: " << notif.getSampleRate()
|
<< " basebandSampleRate: " << notif.getSampleRate()
|
||||||
@ -301,7 +300,7 @@ void BeamSteeringCWMod::validateFilterChainHash(BeamSteeringCWModSettings& setti
|
|||||||
void BeamSteeringCWMod::calculateFrequencyOffset()
|
void BeamSteeringCWMod::calculateFrequencyOffset()
|
||||||
{
|
{
|
||||||
double shiftFactor = HBFilterChainConverter::getShiftFactor(m_settings.m_log2Interp, m_settings.m_filterChainHash);
|
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(
|
int BeamSteeringCWMod::webapiSettingsGet(
|
||||||
@ -380,13 +379,13 @@ void BeamSteeringCWMod::webapiUpdateChannelSettings(
|
|||||||
settings.m_reverseAPIAddress = *response.getBeamSteeringCwModSettings()->getReverseApiAddress();
|
settings.m_reverseAPIAddress = *response.getBeamSteeringCwModSettings()->getReverseApiAddress();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
||||||
settings.m_reverseAPIPort = response.getBeamSteeringCwModSettings()->getReverseApiPort();
|
settings.m_reverseAPIPort = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiPort();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||||
settings.m_reverseAPIDeviceIndex = response.getBeamSteeringCwModSettings()->getReverseApiDeviceIndex();
|
settings.m_reverseAPIDeviceIndex = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiDeviceIndex();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
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")) {
|
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
|
||||||
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getChannelMarker());
|
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getChannelMarker());
|
||||||
@ -429,7 +428,7 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||||
response.getBeamSteeringCwModSettings()->setChannelMarker(swgChannelMarker);
|
response.getBeamSteeringCwModSettings()->setChannelMarker(swgChannelMarker);
|
||||||
}
|
}
|
||||||
@ -443,16 +442,16 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||||
settings.m_rollupState->formatTo(swgRollupState);
|
settings.m_rollupState->formatTo(swgRollupState);
|
||||||
response.getBeamSteeringCwModSettings()->setRollupState(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);
|
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||||
|
|
||||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
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.setUrl(QUrl(channelSettingsURL));
|
||||||
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
|
|
||||||
QBuffer *buffer = new QBuffer();
|
auto *buffer = new QBuffer();
|
||||||
buffer->open((QBuffer::ReadWrite));
|
buffer->open(QBuffer::ReadWrite);
|
||||||
buffer->write(swgChannelSettings->asJson().toUtf8());
|
buffer->write(swgChannelSettings->asJson().toUtf8());
|
||||||
buffer->seek(0);
|
buffer->seek(0);
|
||||||
|
|
||||||
@ -477,9 +476,9 @@ void BeamSteeringCWMod::webapiReverseSendSettings(QList<QString>& channelSetting
|
|||||||
|
|
||||||
void BeamSteeringCWMod::sendChannelSettings(
|
void BeamSteeringCWMod::sendChannelSettings(
|
||||||
const QList<ObjectPipe*>& pipes,
|
const QList<ObjectPipe*>& pipes,
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
const BeamSteeringCWModSettings& settings,
|
const BeamSteeringCWModSettings& settings,
|
||||||
bool force)
|
bool force) const
|
||||||
{
|
{
|
||||||
for (const auto& pipe : pipes)
|
for (const auto& pipe : pipes)
|
||||||
{
|
{
|
||||||
@ -487,7 +486,7 @@ void BeamSteeringCWMod::sendChannelSettings(
|
|||||||
|
|
||||||
if (messageQueue)
|
if (messageQueue)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||||
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||||
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
|
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
|
||||||
this,
|
this,
|
||||||
@ -501,11 +500,11 @@ void BeamSteeringCWMod::sendChannelSettings(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BeamSteeringCWMod::webapiFormatChannelSettings(
|
void BeamSteeringCWMod::webapiFormatChannelSettings(
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||||
const BeamSteeringCWModSettings& settings,
|
const BeamSteeringCWModSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
swgChannelSettings->setDirection(2); // MIMO sink
|
swgChannelSettings->setDirection(2); // MIMO sink
|
||||||
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
||||||
@ -534,20 +533,20 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(
|
|||||||
|
|
||||||
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||||
swgBeamSteeringCWSettings->setChannelMarker(swgChannelMarker);
|
swgBeamSteeringCWSettings->setChannelMarker(swgChannelMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
|
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||||
settings.m_rollupState->formatTo(swgRollupState);
|
settings.m_rollupState->formatTo(swgRollupState);
|
||||||
swgBeamSteeringCWSettings->setRollupState(swgRollupState);
|
swgBeamSteeringCWSettings->setRollupState(swgRollupState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply)
|
void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply) const
|
||||||
{
|
{
|
||||||
QNetworkReply::NetworkError replyError = reply->error();
|
QNetworkReply::NetworkError replyError = reply->error();
|
||||||
|
|
||||||
|
@ -86,58 +86,55 @@ public:
|
|||||||
qint64 m_centerFrequency;
|
qint64 m_centerFrequency;
|
||||||
};
|
};
|
||||||
|
|
||||||
BeamSteeringCWMod(DeviceAPI *deviceAPI);
|
explicit BeamSteeringCWMod(DeviceAPI *deviceAPI);
|
||||||
virtual ~BeamSteeringCWMod();
|
~BeamSteeringCWMod() final;
|
||||||
virtual void destroy() { delete this; }
|
void destroy() final { delete this; }
|
||||||
virtual void setDeviceAPI(DeviceAPI *deviceAPI);
|
void setDeviceAPI(DeviceAPI *deviceAPI) final;
|
||||||
virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; }
|
DeviceAPI *getDeviceAPI() final { return m_deviceAPI; }
|
||||||
|
|
||||||
virtual void startSinks() {}
|
void startSinks() final { /* Not used for MIMO */ }
|
||||||
virtual void stopSinks() {}
|
void stopSinks() final { /* Not used for MIMO */ }
|
||||||
virtual void startSources(); //!< thread start()
|
void startSources( /* Not used for MIMO */ ) final; //!< thread start()
|
||||||
virtual void stopSources(); //!< thread exit() and wait()
|
void stopSources( /* Not used for MIMO */ ) final; //!< thread exit() and wait()
|
||||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex);
|
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final;
|
||||||
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex);
|
void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final;
|
||||||
virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); }
|
void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); }
|
||||||
virtual QString getMIMOName() { return objectName(); }
|
QString getMIMOName() final { return objectName(); }
|
||||||
|
|
||||||
virtual void getIdentifier(QString& id) { id = objectName(); }
|
void getIdentifier(QString& id) final { id = objectName(); }
|
||||||
virtual QString getIdentifier() const { return objectName(); }
|
QString getIdentifier() const final { return objectName(); }
|
||||||
virtual void getTitle(QString& title) { title = "BeamSteeringCWMod"; }
|
void getTitle(QString& title) final { title = "BeamSteeringCWMod"; }
|
||||||
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }
|
qint64 getCenterFrequency() const final { return m_frequencyOffset; }
|
||||||
virtual void setCenterFrequency(qint64) {}
|
void setCenterFrequency(qint64) final { /* Not used for MIMO */ }
|
||||||
uint32_t getBasebandSampleRate() const { return m_basebandSampleRate; }
|
uint32_t getBasebandSampleRate() const { return m_basebandSampleRate; }
|
||||||
|
|
||||||
virtual QByteArray serialize() const;
|
QByteArray serialize() const final;
|
||||||
virtual bool deserialize(const QByteArray& data);
|
bool deserialize(const QByteArray& data) final;
|
||||||
|
|
||||||
virtual int getNbSinkStreams() const { return 0; }
|
int getNbSinkStreams() const final { return 0; }
|
||||||
virtual int getNbSourceStreams() const { return 2; }
|
int getNbSourceStreams() const final { return 2; }
|
||||||
virtual int getStreamIndex() const { return -1; }
|
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) streamIndex;
|
||||||
(void) sinkElseSource;
|
(void) sinkElseSource;
|
||||||
return m_frequencyOffset;
|
return m_frequencyOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
|
int webapiSettingsGet(
|
||||||
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
|
|
||||||
|
|
||||||
virtual int webapiSettingsGet(
|
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiSettingsPutPatch(
|
int webapiSettingsPutPatch(
|
||||||
bool force,
|
bool force,
|
||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiWorkspaceGet(
|
int webapiWorkspaceGet(
|
||||||
SWGSDRangel::SWGWorkspaceInfo& query,
|
SWGSDRangel::SWGWorkspaceInfo& query,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
static void webapiFormatChannelSettings(
|
static void webapiFormatChannelSettings(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
@ -161,36 +158,36 @@ private:
|
|||||||
BasebandSampleSink* m_spectrumSink;
|
BasebandSampleSink* m_spectrumSink;
|
||||||
BasebandSampleSink* m_scopeSink;
|
BasebandSampleSink* m_scopeSink;
|
||||||
BeamSteeringCWModSettings m_settings;
|
BeamSteeringCWModSettings m_settings;
|
||||||
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI
|
|
||||||
|
|
||||||
QNetworkAccessManager *m_networkManager;
|
QNetworkAccessManager *m_networkManager;
|
||||||
QNetworkRequest m_networkRequest;
|
QNetworkRequest m_networkRequest;
|
||||||
|
|
||||||
int64_t m_frequencyOffset;
|
int64_t m_frequencyOffset;
|
||||||
uint32_t m_basebandSampleRate;
|
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);
|
void applySettings(const BeamSteeringCWModSettings& settings, bool force = false);
|
||||||
static void validateFilterChainHash(BeamSteeringCWModSettings& settings);
|
static void validateFilterChainHash(BeamSteeringCWModSettings& settings);
|
||||||
void calculateFrequencyOffset();
|
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(
|
void sendChannelSettings(
|
||||||
const QList<ObjectPipe*>& pipes,
|
const QList<ObjectPipe*>& pipes,
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
const BeamSteeringCWModSettings& settings,
|
const BeamSteeringCWModSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
) const;
|
||||||
void webapiFormatChannelSettings(
|
void webapiFormatChannelSettings(
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||||
const BeamSteeringCWModSettings& settings,
|
const BeamSteeringCWModSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
) const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_BEAMSTEERINGCWSOURCE_H
|
#endif // INCLUDE_BEAMSTEERINGCWSOURCE_H
|
||||||
|
@ -30,15 +30,10 @@
|
|||||||
|
|
||||||
BeamSteeringCWModGUI* BeamSteeringCWModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel)
|
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;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BeamSteeringCWModGUI::destroy()
|
|
||||||
{
|
|
||||||
delete this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BeamSteeringCWModGUI::resetToDefaults()
|
void BeamSteeringCWModGUI::resetToDefaults()
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
@ -67,7 +62,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
if (BeamSteeringCWMod::MsgBasebandNotification::match(message))
|
if (BeamSteeringCWMod::MsgBasebandNotification::match(message))
|
||||||
{
|
{
|
||||||
BeamSteeringCWMod::MsgBasebandNotification& notif = (BeamSteeringCWMod::MsgBasebandNotification&) message;
|
auto& notif = (const BeamSteeringCWMod::MsgBasebandNotification&) message;
|
||||||
m_basebandSampleRate = notif.getSampleRate();
|
m_basebandSampleRate = notif.getSampleRate();
|
||||||
m_centerFrequency = notif.getCenterFrequency();
|
m_centerFrequency = notif.getCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
@ -76,7 +71,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod::match(message))
|
else if (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod::match(message))
|
||||||
{
|
{
|
||||||
const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod& cfg = (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message;
|
auto& cfg = (const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message;
|
||||||
m_settings = cfg.getSettings();
|
m_settings = cfg.getSettings();
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
|
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 &)));
|
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||||
|
|
||||||
m_bsCWSource = (BeamSteeringCWMod*) mimoChannel;
|
m_bsCWSource = (BeamSteeringCWMod*) mimoChannel;
|
||||||
m_bsCWSource->setMessageQueueToGUI(getInputMessageQueue());
|
m_bsCWSource->setMessageQueueToGUI(BeamSteeringCWModGUI::getInputMessageQueue());
|
||||||
m_basebandSampleRate = m_bsCWSource->getBasebandSampleRate();
|
m_basebandSampleRate = m_bsCWSource->getBasebandSampleRate();
|
||||||
|
|
||||||
connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
@ -128,7 +123,7 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de
|
|||||||
|
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
|
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(BeamSteeringCWModGUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
makeUIConnections();
|
makeUIConnections();
|
||||||
@ -183,13 +178,13 @@ void BeamSteeringCWModGUI::displaySettings()
|
|||||||
|
|
||||||
void BeamSteeringCWModGUI::displayRateAndShift()
|
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);
|
double channelSampleRate = ((double) m_basebandSampleRate) / (1<<m_settings.m_log2Interp);
|
||||||
QLocale loc;
|
QLocale loc;
|
||||||
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
|
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
|
||||||
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
|
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
|
||||||
m_channelMarker.setCenterFrequency(shift);
|
m_channelMarker.setCenterFrequency(shift);
|
||||||
m_channelMarker.setBandwidth(channelSampleRate);
|
m_channelMarker.setBandwidth((int) channelSampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BeamSteeringCWModGUI::leaveEvent(QEvent*)
|
void BeamSteeringCWModGUI::leaveEvent(QEvent*)
|
||||||
@ -206,7 +201,7 @@ void BeamSteeringCWModGUI::handleSourceMessages()
|
|||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
while ((message = getInputMessageQueue()->pop()) != 0)
|
while ((message = getInputMessageQueue()->pop()) != nullptr)
|
||||||
{
|
{
|
||||||
if (handleMessage(*message))
|
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) widget;
|
||||||
(void) rollDown;
|
(void) rollDown;
|
||||||
@ -226,7 +221,7 @@ void BeamSteeringCWModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void BeamSteeringCWModGUI::onMenuDialogCalled(const QPoint &p)
|
void BeamSteeringCWModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
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->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);
|
QObject::connect(ui->interpolationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BeamSteeringCWModGUI::on_interpolationFactor_currentIndexChanged);
|
||||||
@ -326,5 +321,5 @@ void BeamSteeringCWModGUI::makeUIConnections()
|
|||||||
|
|
||||||
void BeamSteeringCWModGUI::updateAbsoluteCenterFrequency()
|
void BeamSteeringCWModGUI::updateAbsoluteCenterFrequency()
|
||||||
{
|
{
|
||||||
setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_basebandSampleRate);
|
setStatusFrequency(m_centerFrequency + (qint64) (m_shiftFrequencyFactor * m_basebandSampleRate));
|
||||||
}
|
}
|
||||||
|
@ -47,22 +47,21 @@ class BeamSteeringCWModGUI : public ChannelGUI {
|
|||||||
public:
|
public:
|
||||||
static BeamSteeringCWModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
|
static BeamSteeringCWModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
|
||||||
|
|
||||||
virtual void destroy();
|
void resetToDefaults() final;
|
||||||
virtual void resetToDefaults();
|
QByteArray serialize() const final;
|
||||||
QByteArray serialize() const;
|
bool deserialize(const QByteArray& data) final;
|
||||||
bool deserialize(const QByteArray& data);
|
MessageQueue *getInputMessageQueue() final { return &m_inputMessageQueue; }
|
||||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; };
|
||||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
|
int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; };
|
||||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
|
void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; };
|
||||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
|
QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; };
|
||||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
|
QString getTitle() const final { return m_settings.m_title; };
|
||||||
virtual QString getTitle() const { return m_settings.m_title; };
|
QColor getTitleColor() const final { return m_settings.m_rgbColor; };
|
||||||
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
|
void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; }
|
||||||
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
|
bool getHidden() const final { return m_settings.m_hidden; }
|
||||||
virtual bool getHidden() const { return m_settings.m_hidden; }
|
ChannelMarker& getChannelMarker() final { return m_channelMarker; }
|
||||||
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
|
int getStreamIndex() const final { return -1; }
|
||||||
virtual int getStreamIndex() const { return -1; }
|
void setStreamIndex(int streamIndex) final { (void) streamIndex; }
|
||||||
virtual void setStreamIndex(int streamIndex) { (void) streamIndex; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::BeamSteeringCWModGUI* ui;
|
Ui::BeamSteeringCWModGUI* ui;
|
||||||
@ -82,18 +81,18 @@ private:
|
|||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel, QWidget* parent = nullptr);
|
explicit BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel, QWidget* parent = nullptr);
|
||||||
virtual ~BeamSteeringCWModGUI();
|
~BeamSteeringCWModGUI() final;
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
void applySettings(bool force = false);
|
void applySettings(bool force = false);
|
||||||
void displaySettings();
|
void displaySettings();
|
||||||
void displayRateAndShift();
|
void displayRateAndShift();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections() const;
|
||||||
void updateAbsoluteCenterFrequency();
|
void updateAbsoluteCenterFrequency();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*) final;
|
||||||
void enterEvent(EnterEventType*);
|
void enterEvent(EnterEventType*) final;
|
||||||
|
|
||||||
void applyInterpolation();
|
void applyInterpolation();
|
||||||
void applyPosition();
|
void applyPosition();
|
||||||
@ -104,7 +103,7 @@ private slots:
|
|||||||
void on_interpolationFactor_currentIndexChanged(int index);
|
void on_interpolationFactor_currentIndexChanged(int index);
|
||||||
void on_position_valueChanged(int value);
|
void on_position_valueChanged(int value);
|
||||||
void on_steeringDegrees_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 onMenuDialogCalled(const QPoint& p);
|
||||||
void tick();
|
void tick();
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,6 @@ DOA2::DOA2(DeviceAPI *deviceAPI) :
|
|||||||
m_thread(nullptr),
|
m_thread(nullptr),
|
||||||
m_basebandSink(nullptr),
|
m_basebandSink(nullptr),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_guiMessageQueue(nullptr),
|
|
||||||
m_frequencyOffset(0),
|
m_frequencyOffset(0),
|
||||||
m_deviceSampleRate(48000),
|
m_deviceSampleRate(48000),
|
||||||
m_deviceCenterFrequency(435000000)
|
m_deviceCenterFrequency(435000000)
|
||||||
@ -65,7 +64,7 @@ DOA2::DOA2(DeviceAPI *deviceAPI) :
|
|||||||
this,
|
this,
|
||||||
&DOA2::networkManagerFinished
|
&DOA2::networkManagerFinished
|
||||||
);
|
);
|
||||||
startSinks();
|
DOA2::startSinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
DOA2::~DOA2()
|
DOA2::~DOA2()
|
||||||
@ -80,7 +79,7 @@ DOA2::~DOA2()
|
|||||||
|
|
||||||
m_deviceAPI->removeChannelSinkAPI(this);
|
m_deviceAPI->removeChannelSinkAPI(this);
|
||||||
m_deviceAPI->removeMIMOChannel(this);
|
m_deviceAPI->removeMIMOChannel(this);
|
||||||
stopSinks();
|
DOA2::stopSinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DOA2::setDeviceAPI(DeviceAPI *deviceAPI)
|
void DOA2::setDeviceAPI(DeviceAPI *deviceAPI)
|
||||||
@ -203,7 +202,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force)
|
|||||||
reverseAPIKeys.append("squelchdB");
|
reverseAPIKeys.append("squelchdB");
|
||||||
|
|
||||||
if (m_running) {
|
if (m_running) {
|
||||||
m_basebandSink->setMagThreshold(CalcDb::powerFromdB(settings.m_squelchdB));
|
m_basebandSink->setMagThreshold((float) CalcDb::powerFromdB(settings.m_squelchdB));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +237,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force)
|
|||||||
QList<ObjectPipe*> pipes;
|
QList<ObjectPipe*> pipes;
|
||||||
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
||||||
|
|
||||||
if (pipes.size() > 0) {
|
if (!pipes.empty()) {
|
||||||
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
|
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +248,7 @@ void DOA2::handleInputMessages()
|
|||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
while ((message = m_inputMessageQueue.pop()) != nullptr)
|
||||||
{
|
{
|
||||||
if (handleMessage(*message))
|
if (handleMessage(*message))
|
||||||
{
|
{
|
||||||
@ -262,14 +261,14 @@ bool DOA2::handleMessage(const Message& cmd)
|
|||||||
{
|
{
|
||||||
if (MsgConfigureDOA2::match(cmd))
|
if (MsgConfigureDOA2::match(cmd))
|
||||||
{
|
{
|
||||||
MsgConfigureDOA2& cfg = (MsgConfigureDOA2&) cmd;
|
auto& cfg = (const MsgConfigureDOA2&) cmd;
|
||||||
qDebug() << "DOA2::handleMessage: MsgConfigureDOA2";
|
qDebug() << "DOA2::handleMessage: MsgConfigureDOA2";
|
||||||
applySettings(cfg.getSettings(), cfg.getForce());
|
applySettings(cfg.getSettings(), cfg.getForce());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DSPMIMOSignalNotification::match(cmd))
|
else if (DSPMIMOSignalNotification::match(cmd))
|
||||||
{
|
{
|
||||||
DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd;
|
auto& notif = (const DSPMIMOSignalNotification&) cmd;
|
||||||
|
|
||||||
qDebug() << "DOA2::handleMessage: DSPMIMOSignalNotification:"
|
qDebug() << "DOA2::handleMessage: DSPMIMOSignalNotification:"
|
||||||
<< " inputSampleRate: " << notif.getSampleRate()
|
<< " inputSampleRate: " << notif.getSampleRate()
|
||||||
@ -347,7 +346,7 @@ void DOA2::validateFilterChainHash(DOA2Settings& settings)
|
|||||||
void DOA2::calculateFrequencyOffset()
|
void DOA2::calculateFrequencyOffset()
|
||||||
{
|
{
|
||||||
double shiftFactor = HBFilterChainConverter::getShiftFactor(m_settings.m_log2Decim, m_settings.m_filterChainHash);
|
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)
|
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);
|
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);
|
return std::acos(getPhi()/M_PI)*(180/M_PI);
|
||||||
}
|
}
|
||||||
@ -469,13 +468,13 @@ void DOA2::webapiUpdateChannelSettings(
|
|||||||
settings.m_reverseAPIAddress = *response.getDoa2Settings()->getReverseApiAddress();
|
settings.m_reverseAPIAddress = *response.getDoa2Settings()->getReverseApiAddress();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
||||||
settings.m_reverseAPIPort = response.getDoa2Settings()->getReverseApiPort();
|
settings.m_reverseAPIPort = (uint16_t) response.getDoa2Settings()->getReverseApiPort();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||||
settings.m_reverseAPIDeviceIndex = response.getDoa2Settings()->getReverseApiDeviceIndex();
|
settings.m_reverseAPIDeviceIndex = (uint16_t) response.getDoa2Settings()->getReverseApiDeviceIndex();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
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")) {
|
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
|
||||||
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getDoa2Settings()->getScopeConfig());
|
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getDoa2Settings()->getScopeConfig());
|
||||||
@ -525,7 +524,7 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
|
auto *swgGLScope = new SWGSDRangel::SWGGLScope();
|
||||||
settings.m_scopeGUI->formatTo(swgGLScope);
|
settings.m_scopeGUI->formatTo(swgGLScope);
|
||||||
response.getDoa2Settings()->setScopeConfig(swgGLScope);
|
response.getDoa2Settings()->setScopeConfig(swgGLScope);
|
||||||
}
|
}
|
||||||
@ -539,7 +538,7 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||||
response.getDoa2Settings()->setChannelMarker(swgChannelMarker);
|
response.getDoa2Settings()->setChannelMarker(swgChannelMarker);
|
||||||
}
|
}
|
||||||
@ -553,39 +552,39 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||||
settings.m_rollupState->formatTo(swgRollupState);
|
settings.m_rollupState->formatTo(swgRollupState);
|
||||||
response.getDoa2Settings()->setRollupState(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);
|
double phi = normalizeAngle(getPhi() * (180.0/M_PI), 180.0);
|
||||||
response.getDoa2Report()->setPhi(phi);
|
response.getDoa2Report()->setPhi((qint32) phi);
|
||||||
|
|
||||||
float hwl = 1.5e8 / (m_deviceCenterFrequency + m_frequencyOffset);
|
double hwl = 1.5e8 / (double) (m_deviceCenterFrequency + m_frequencyOffset);
|
||||||
float cosTheta = (getPhi()/M_PI) * ((hwl * 1000.0) / m_settings.m_basebandDistance);
|
double cosTheta = (getPhi()/M_PI) * ((hwl * 1000.0) / m_settings.m_basebandDistance);
|
||||||
float blindAngle = (m_settings.m_basebandDistance > hwl * 1000.0) ?
|
double blindAngle = (m_settings.m_basebandDistance > hwl * 1000.0) ?
|
||||||
std::acos((hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) :
|
std::acos((hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) :
|
||||||
0;
|
0;
|
||||||
response.getDoa2Report()->setBlindAngle((int) blindAngle);
|
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);
|
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
|
double posAngle = normalizeAngle(m_settings.m_antennaAz - doaAngle, 360.0); // DOA angles are trigonometric but displayed angles are clockwise
|
||||||
float negAngle = normalizeAngle(m_settings.m_antennaAz + doaAngle, 360.0f);
|
double negAngle = normalizeAngle(m_settings.m_antennaAz + doaAngle, 360.0);
|
||||||
response.getDoa2Report()->setPosAz(posAngle);
|
response.getDoa2Report()->setPosAz((qint32) posAngle);
|
||||||
response.getDoa2Report()->setNegAz(negAngle);
|
response.getDoa2Report()->setNegAz((qint32) negAngle);
|
||||||
|
|
||||||
response.getDoa2Report()->setFftSize(m_fftSize);
|
response.getDoa2Report()->setFftSize(m_fftSize);
|
||||||
int channelSampleRate = m_deviceSampleRate / (1<<m_settings.m_log2Decim);
|
int channelSampleRate = m_deviceSampleRate / (1<<m_settings.m_log2Decim);
|
||||||
response.getDoa2Report()->setChannelSampleRate(channelSampleRate);
|
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);
|
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||||
|
|
||||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
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.setUrl(QUrl(channelSettingsURL));
|
||||||
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
|
|
||||||
QBuffer *buffer = new QBuffer();
|
auto *buffer = new QBuffer();
|
||||||
buffer->open((QBuffer::ReadWrite));
|
buffer->open(QBuffer::ReadWrite);
|
||||||
buffer->write(swgChannelSettings->asJson().toUtf8());
|
buffer->write(swgChannelSettings->asJson().toUtf8());
|
||||||
buffer->seek(0);
|
buffer->seek(0);
|
||||||
|
|
||||||
@ -610,9 +609,9 @@ void DOA2::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const
|
|||||||
|
|
||||||
void DOA2::sendChannelSettings(
|
void DOA2::sendChannelSettings(
|
||||||
const QList<ObjectPipe*>& pipes,
|
const QList<ObjectPipe*>& pipes,
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
const DOA2Settings& settings,
|
const DOA2Settings& settings,
|
||||||
bool force)
|
bool force) const
|
||||||
{
|
{
|
||||||
for (const auto& pipe : pipes)
|
for (const auto& pipe : pipes)
|
||||||
{
|
{
|
||||||
@ -620,7 +619,7 @@ void DOA2::sendChannelSettings(
|
|||||||
|
|
||||||
if (messageQueue)
|
if (messageQueue)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||||
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||||
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
|
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
|
||||||
this,
|
this,
|
||||||
@ -634,11 +633,11 @@ void DOA2::sendChannelSettings(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DOA2::webapiFormatChannelSettings(
|
void DOA2::webapiFormatChannelSettings(
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||||
const DOA2Settings& settings,
|
const DOA2Settings& settings,
|
||||||
bool force
|
bool force
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
swgChannelSettings->setDirection(2); // MIMO sink
|
swgChannelSettings->setDirection(2); // MIMO sink
|
||||||
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
||||||
@ -677,29 +676,26 @@ void DOA2::webapiFormatChannelSettings(
|
|||||||
swgDOA2Settings->setFftAveragingValue(DOA2Settings::getAveragingValue(settings.m_fftAveragingIndex));
|
swgDOA2Settings->setFftAveragingValue(DOA2Settings::getAveragingValue(settings.m_fftAveragingIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.m_scopeGUI)
|
if ((settings.m_scopeGUI) && (channelSettingsKeys.contains("scopeConfig") || force)) {
|
||||||
{
|
|
||||||
if (channelSettingsKeys.contains("scopeConfig") || force) {
|
|
||||||
settings.m_scopeGUI->formatTo(swgDOA2Settings->getScopeConfig());
|
settings.m_scopeGUI->formatTo(swgDOA2Settings->getScopeConfig());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||||
swgDOA2Settings->setChannelMarker(swgChannelMarker);
|
swgDOA2Settings->setChannelMarker(swgChannelMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
|
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||||
settings.m_rollupState->formatTo(swgRollupState);
|
settings.m_rollupState->formatTo(swgRollupState);
|
||||||
swgDOA2Settings->setRollupState(swgRollupState);
|
swgDOA2Settings->setRollupState(swgRollupState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DOA2::networkManagerFinished(QNetworkReply *reply)
|
void DOA2::networkManagerFinished(QNetworkReply *reply) const
|
||||||
{
|
{
|
||||||
QNetworkReply::NetworkError replyError = reply->error();
|
QNetworkReply::NetworkError replyError = reply->error();
|
||||||
|
|
||||||
@ -720,7 +716,7 @@ void DOA2::networkManagerFinished(QNetworkReply *reply)
|
|||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
float DOA2::normalizeAngle(float angle, float max)
|
double DOA2::normalizeAngle(double angle, double max)
|
||||||
{
|
{
|
||||||
if (angle < 0) { return max + angle; }
|
if (angle < 0) { return max + angle; }
|
||||||
if (angle > max) { return angle - max; }
|
if (angle > max) { return angle - max; }
|
||||||
|
@ -86,67 +86,64 @@ public:
|
|||||||
qint64 m_centerFrequency;
|
qint64 m_centerFrequency;
|
||||||
};
|
};
|
||||||
|
|
||||||
DOA2(DeviceAPI *deviceAPI);
|
explicit DOA2(DeviceAPI *deviceAPI);
|
||||||
virtual ~DOA2();
|
~DOA2() final;
|
||||||
virtual void destroy() { delete this; }
|
void destroy() final { delete this; }
|
||||||
virtual void setDeviceAPI(DeviceAPI *deviceAPI);
|
void setDeviceAPI(DeviceAPI *deviceAPI) final;
|
||||||
virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; }
|
DeviceAPI *getDeviceAPI() final { return m_deviceAPI; }
|
||||||
|
|
||||||
virtual void startSinks(); //!< thread start()
|
void startSinks() final; //!< thread start()
|
||||||
virtual void stopSinks(); //!< thread exit() and wait()
|
void stopSinks() final; //!< thread exit() and wait()
|
||||||
virtual void startSources() {}
|
void startSources() final { /* Not for MIMO */ }
|
||||||
virtual void stopSources() {}
|
void stopSources() final { /* Not for MIMO */ }
|
||||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex);
|
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final;
|
||||||
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex);
|
void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final;
|
||||||
virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); }
|
void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); }
|
||||||
virtual QString getMIMOName() { return objectName(); }
|
QString getMIMOName() final { return objectName(); }
|
||||||
|
|
||||||
virtual void getIdentifier(QString& id) { id = objectName(); }
|
void getIdentifier(QString& id) final { id = objectName(); }
|
||||||
virtual QString getIdentifier() const { return objectName(); }
|
QString getIdentifier() const final { return objectName(); }
|
||||||
virtual void getTitle(QString& title) { title = "DOA 2 sources"; }
|
void getTitle(QString& title) final { title = "DOA 2 sources"; }
|
||||||
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }
|
qint64 getCenterFrequency() const final { return m_frequencyOffset; }
|
||||||
virtual void setCenterFrequency(qint64) {}
|
void setCenterFrequency(qint64) final { /* Not for MIMO */ }
|
||||||
uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; }
|
uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; }
|
||||||
|
|
||||||
virtual QByteArray serialize() const;
|
QByteArray serialize() const final;
|
||||||
virtual bool deserialize(const QByteArray& data);
|
bool deserialize(const QByteArray& data) final;
|
||||||
|
|
||||||
virtual int getNbSinkStreams() const { return 2; }
|
int getNbSinkStreams() const final { return 2; }
|
||||||
virtual int getNbSourceStreams() const { return 0; }
|
int getNbSourceStreams() const final { return 0; }
|
||||||
virtual int getStreamIndex() const { return -1; }
|
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) streamIndex;
|
||||||
(void) sinkElseSource;
|
(void) sinkElseSource;
|
||||||
return m_frequencyOffset;
|
return m_frequencyOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
|
|
||||||
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
|
|
||||||
|
|
||||||
ScopeVis *getScopeVis() { return &m_scopeSink; }
|
ScopeVis *getScopeVis() { return &m_scopeSink; }
|
||||||
void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash);
|
void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash);
|
||||||
float getPhi() const;
|
double getPhi() const;
|
||||||
float getPositiveDOA() const;
|
double getPositiveDOA() const;
|
||||||
|
|
||||||
virtual int webapiSettingsGet(
|
int webapiSettingsGet(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiSettingsPutPatch(
|
int webapiSettingsPutPatch(
|
||||||
bool force,
|
bool force,
|
||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiReportGet(
|
int webapiReportGet(
|
||||||
SWGSDRangel::SWGChannelReport& response,
|
SWGSDRangel::SWGChannelReport& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiWorkspaceGet(
|
int webapiWorkspaceGet(
|
||||||
SWGSDRangel::SWGWorkspaceInfo& query,
|
SWGSDRangel::SWGWorkspaceInfo& query,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
static void webapiFormatChannelSettings(
|
static void webapiFormatChannelSettings(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
@ -169,7 +166,6 @@ private:
|
|||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
DOA2Settings m_settings;
|
DOA2Settings m_settings;
|
||||||
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI
|
|
||||||
|
|
||||||
QNetworkAccessManager *m_networkManager;
|
QNetworkAccessManager *m_networkManager;
|
||||||
QNetworkRequest m_networkRequest;
|
QNetworkRequest m_networkRequest;
|
||||||
@ -177,31 +173,32 @@ private:
|
|||||||
int64_t m_frequencyOffset;
|
int64_t m_frequencyOffset;
|
||||||
uint32_t m_deviceSampleRate;
|
uint32_t m_deviceSampleRate;
|
||||||
qint64 m_deviceCenterFrequency;
|
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);
|
void applySettings(const DOA2Settings& settings, bool force = false);
|
||||||
static void validateFilterChainHash(DOA2Settings& settings);
|
static void validateFilterChainHash(DOA2Settings& settings);
|
||||||
void calculateFrequencyOffset();
|
void calculateFrequencyOffset();
|
||||||
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
|
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) const;
|
||||||
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DOA2Settings& settings, bool force);
|
void webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const DOA2Settings& settings, bool force);
|
||||||
void sendChannelSettings(
|
void sendChannelSettings(
|
||||||
const QList<ObjectPipe*>& pipes,
|
const QList<ObjectPipe*>& pipes,
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
const DOA2Settings& settings,
|
const DOA2Settings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
) const;
|
||||||
void webapiFormatChannelSettings(
|
void webapiFormatChannelSettings(
|
||||||
QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||||
const DOA2Settings& settings,
|
const DOA2Settings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
) const;
|
||||||
static float normalizeAngle(float angle, float max);
|
static double normalizeAngle(double angle, double max);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_DOA2_H
|
#endif // INCLUDE_DOA2_H
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
DOA2Settings::CorrelationType m_correlationType;
|
DOA2Settings::CorrelationType m_correlationType;
|
||||||
|
|
||||||
MsgConfigureCorrelation(DOA2Settings::CorrelationType correlationType) :
|
explicit MsgConfigureCorrelation(DOA2Settings::CorrelationType correlationType) :
|
||||||
Message(),
|
Message(),
|
||||||
m_correlationType(correlationType)
|
m_correlationType(correlationType)
|
||||||
{}
|
{}
|
||||||
@ -103,8 +103,8 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
DOA2Baseband(int fftSize);
|
explicit DOA2Baseband(int fftSize);
|
||||||
~DOA2Baseband();
|
~DOA2Baseband() final;
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication
|
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 feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int streamIndex);
|
||||||
void setBasebandSampleRate(unsigned int sampleRate);
|
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 setMagThreshold(float threshold) { m_magThreshold = threshold * SDR_RX_SCALED * SDR_RX_SCALED; }
|
||||||
void setFFTAveraging(int nbFFT);
|
void setFFTAveraging(int nbFFT);
|
||||||
|
|
||||||
@ -128,9 +128,9 @@ private:
|
|||||||
DOA2Settings::CorrelationType m_correlationType;
|
DOA2Settings::CorrelationType m_correlationType;
|
||||||
int m_fftSize;
|
int m_fftSize;
|
||||||
int m_samplesCount; //!< Number of samples processed by DOA
|
int m_samplesCount; //!< Number of samples processed by DOA
|
||||||
float m_magSum; //!< Squared magnitudes accumulator
|
double m_magSum; //!< Squared magnitudes accumulator
|
||||||
float m_wphSum; //!< Phase difference accumulator (averaging weighted by squared magnitude)
|
double m_wphSum; //!< Phase difference accumulator (averaging weighted by squared magnitude)
|
||||||
float m_phi; //!< Resulting calculated phase difference
|
double m_phi; //!< Resulting calculated phase difference
|
||||||
double m_magThreshold; //!< Squared magnitude scaled threshold
|
double m_magThreshold; //!< Squared magnitude scaled threshold
|
||||||
int m_fftAvg; //!< Average over a certain number of FFTs
|
int m_fftAvg; //!< Average over a certain number of FFTs
|
||||||
int m_fftAvgCount; //!< FFT averaging counter
|
int m_fftAvgCount; //!< FFT averaging counter
|
||||||
|
@ -33,15 +33,10 @@
|
|||||||
|
|
||||||
DOA2GUI* DOA2GUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *channelMIMO)
|
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;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DOA2GUI::destroy()
|
|
||||||
{
|
|
||||||
delete this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DOA2GUI::resetToDefaults()
|
void DOA2GUI::resetToDefaults()
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
@ -78,7 +73,7 @@ bool DOA2GUI::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
if (DOA2::MsgBasebandNotification::match(message))
|
if (DOA2::MsgBasebandNotification::match(message))
|
||||||
{
|
{
|
||||||
DOA2::MsgBasebandNotification& notif = (DOA2::MsgBasebandNotification&) message;
|
auto& notif = (const DOA2::MsgBasebandNotification&) message;
|
||||||
m_sampleRate = notif.getSampleRate();
|
m_sampleRate = notif.getSampleRate();
|
||||||
m_centerFrequency = notif.getCenterFrequency();
|
m_centerFrequency = notif.getCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
@ -88,7 +83,7 @@ bool DOA2GUI::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (DOA2::MsgConfigureDOA2::match(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();
|
m_settings = notif.getSettings();
|
||||||
ui->scopeGUI->updateSettings();
|
ui->scopeGUI->updateSettings();
|
||||||
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
|
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_doa2 = (DOA2*) channelMIMO;
|
||||||
m_scopeVis = m_doa2->getScopeVis();
|
m_scopeVis = m_doa2->getScopeVis();
|
||||||
m_scopeVis->setGLScope(ui->glScope);
|
m_scopeVis->setGLScope(ui->glScope);
|
||||||
m_doa2->setMessageQueueToGUI(getInputMessageQueue());
|
m_doa2->setMessageQueueToGUI(DOA2GUI::getInputMessageQueue());
|
||||||
m_sampleRate = m_doa2->getDeviceSampleRate();
|
m_sampleRate = m_doa2->getDeviceSampleRate();
|
||||||
|
|
||||||
ui->glScope->setTraceModulo(DOA2::m_fftSize);
|
ui->glScope->setTraceModulo(DOA2::m_fftSize);
|
||||||
@ -150,7 +145,7 @@ DOA2GUI::DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *ch
|
|||||||
ui->scopeGUI->traceLengthChange();
|
ui->scopeGUI->traceLengthChange();
|
||||||
ui->compass->setBlindAngleBorder(true);
|
ui->compass->setBlindAngleBorder(true);
|
||||||
|
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(DOA2GUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
makeUIConnections();
|
makeUIConnections();
|
||||||
@ -221,20 +216,20 @@ void DOA2GUI::displaySettings()
|
|||||||
|
|
||||||
void DOA2GUI::displayRateAndShift()
|
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);
|
double channelSampleRate = ((double) m_sampleRate) / (1<<m_settings.m_log2Decim);
|
||||||
QLocale loc;
|
QLocale loc;
|
||||||
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
|
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
|
||||||
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
|
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
|
||||||
m_channelMarker.setCenterFrequency(shift);
|
m_channelMarker.setCenterFrequency(shift);
|
||||||
m_channelMarker.setBandwidth(channelSampleRate);
|
m_channelMarker.setBandwidth((int) channelSampleRate);
|
||||||
m_scopeVis->setLiveRate(channelSampleRate);
|
m_scopeVis->setLiveRate((int) channelSampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DOA2GUI::setFFTAveragingTooltip()
|
void DOA2GUI::setFFTAveragingTooltip()
|
||||||
{
|
{
|
||||||
float channelSampleRate = ((float) m_sampleRate) / (1<<m_settings.m_log2Decim);
|
float channelSampleRate = ((float) m_sampleRate) / ((float) (1<<m_settings.m_log2Decim));
|
||||||
float averagingTime = (DOA2::m_fftSize * DOA2Settings::getAveragingValue(m_settings.m_fftAveragingIndex)) /
|
float averagingTime = ((float) DOA2::m_fftSize * (float) DOA2Settings::getAveragingValue(m_settings.m_fftAveragingIndex)) /
|
||||||
channelSampleRate;
|
channelSampleRate;
|
||||||
QString s;
|
QString s;
|
||||||
setNumberStr(averagingTime, 2, s);
|
setNumberStr(averagingTime, 2, s);
|
||||||
@ -274,7 +269,7 @@ void DOA2GUI::handleSourceMessages()
|
|||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
while ((message = getInputMessageQueue()->pop()) != 0)
|
while ((message = getInputMessageQueue()->pop()) != nullptr)
|
||||||
{
|
{
|
||||||
if (handleMessage(*message))
|
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) widget;
|
||||||
(void) rollDown;
|
(void) rollDown;
|
||||||
@ -294,7 +289,7 @@ void DOA2GUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void DOA2GUI::onMenuDialogCalled(const QPoint &p)
|
void DOA2GUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
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->decimationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DOA2GUI::on_decimationFactor_currentIndexChanged);
|
||||||
QObject::connect(ui->position, &QSlider::valueChanged, this, &DOA2GUI::on_position_valueChanged);
|
QObject::connect(ui->position, &QSlider::valueChanged, this, &DOA2GUI::on_position_valueChanged);
|
||||||
@ -449,9 +444,9 @@ void DOA2GUI::makeUIConnections()
|
|||||||
|
|
||||||
void DOA2GUI::updateAbsoluteCenterFrequency()
|
void DOA2GUI::updateAbsoluteCenterFrequency()
|
||||||
{
|
{
|
||||||
qint64 cf = m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate;
|
auto cf = (qint64) ((double) m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate);
|
||||||
setStatusFrequency(cf);
|
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));
|
ui->halfWLText->setText(tr("%1").arg(m_hwl*1000, 5, 'f', 0));
|
||||||
updateScopeFScale();
|
updateScopeFScale();
|
||||||
}
|
}
|
||||||
@ -470,14 +465,14 @@ void DOA2GUI::updateScopeFScale()
|
|||||||
|
|
||||||
void DOA2GUI::updateDOA()
|
void DOA2GUI::updateDOA()
|
||||||
{
|
{
|
||||||
float cosTheta = (m_doa2->getPhi()/M_PI) * ((m_hwl * 1000.0) / m_settings.m_basebandDistance);
|
double 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 blindAngle = (m_settings.m_basebandDistance > m_hwl * 1000.0) ?
|
||||||
std::acos((m_hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) :
|
std::acos((m_hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) :
|
||||||
0;
|
0;
|
||||||
ui->compass->setBlindAngle(blindAngle);
|
ui->compass->setBlindAngle(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/M_PI);
|
||||||
float posAngle = ui->antAz->value() - doaAngle; // DOA angles are trigonometric but displayed angles are clockwise
|
double posAngle = ui->antAz->value() - doaAngle; // DOA angles are trigonometric but displayed angles are clockwise
|
||||||
float negAngle = ui->antAz->value() + doaAngle;
|
double negAngle = ui->antAz->value() + doaAngle;
|
||||||
ui->compass->setAzPos(posAngle);
|
ui->compass->setAzPos(posAngle);
|
||||||
ui->compass->setAzNeg(negAngle);
|
ui->compass->setAzNeg(negAngle);
|
||||||
ui->posText->setText(tr("%1").arg(ui->compass->getAzPos(), 3, 'f', 0, QLatin1Char('0')));
|
ui->posText->setText(tr("%1").arg(ui->compass->getAzPos(), 3, 'f', 0, QLatin1Char('0')));
|
||||||
|
@ -46,22 +46,21 @@ class DOA2GUI : public ChannelGUI {
|
|||||||
public:
|
public:
|
||||||
static DOA2GUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
|
static DOA2GUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
|
||||||
|
|
||||||
virtual void destroy();
|
void resetToDefaults() final;
|
||||||
virtual void resetToDefaults();
|
QByteArray serialize() const final;
|
||||||
virtual QByteArray serialize() const;
|
bool deserialize(const QByteArray& data) final;
|
||||||
virtual bool deserialize(const QByteArray& data);
|
MessageQueue* getInputMessageQueue() final;
|
||||||
virtual MessageQueue* getInputMessageQueue();
|
void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; };
|
||||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
|
int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; };
|
||||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
|
void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; };
|
||||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
|
QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; };
|
||||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
|
QString getTitle() const final { return m_settings.m_title; };
|
||||||
virtual QString getTitle() const { return m_settings.m_title; };
|
QColor getTitleColor() const final { return m_settings.m_rgbColor; };
|
||||||
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
|
void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; }
|
||||||
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
|
bool getHidden() const final { return m_settings.m_hidden; }
|
||||||
virtual bool getHidden() const { return m_settings.m_hidden; }
|
ChannelMarker& getChannelMarker() final { return m_channelMarker; }
|
||||||
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
|
int getStreamIndex() const final { return -1; }
|
||||||
virtual int getStreamIndex() const { return -1; }
|
void setStreamIndex(int streamIndex) final { (void) streamIndex; }
|
||||||
virtual void setStreamIndex(int streamIndex) { (void) streamIndex; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DOA2GUI* ui;
|
Ui::DOA2GUI* ui;
|
||||||
@ -82,7 +81,7 @@ private:
|
|||||||
double m_hwl; //!< Half wavelength at center frequency
|
double m_hwl; //!< Half wavelength at center frequency
|
||||||
|
|
||||||
explicit DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr);
|
explicit DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr);
|
||||||
virtual ~DOA2GUI();
|
~DOA2GUI() final;
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
void applySettings(bool force = false);
|
void applySettings(bool force = false);
|
||||||
@ -93,13 +92,13 @@ private:
|
|||||||
void setFFTAveragingTooltip();
|
void setFFTAveragingTooltip();
|
||||||
static void setNumberStr(float v, int decimalPlaces, QString& s);
|
static void setNumberStr(float v, int decimalPlaces, QString& s);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections() const;
|
||||||
void updateAbsoluteCenterFrequency();
|
void updateAbsoluteCenterFrequency();
|
||||||
void updateScopeFScale();
|
void updateScopeFScale();
|
||||||
void updateDOA();
|
void updateDOA();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*) final;
|
||||||
void enterEvent(EnterEventType*);
|
void enterEvent(EnterEventType*) final;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleSourceMessages();
|
void handleSourceMessages();
|
||||||
@ -112,7 +111,7 @@ private slots:
|
|||||||
void on_squelch_valueChanged(int value);
|
void on_squelch_valueChanged(int value);
|
||||||
void on_fftAveraging_currentIndexChanged(int index);
|
void on_fftAveraging_currentIndexChanged(int index);
|
||||||
void on_centerPosition_clicked();
|
void on_centerPosition_clicked();
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(const QWidget* widget, bool rollDown);
|
||||||
void onMenuDialogCalled(const QPoint& p);
|
void onMenuDialogCalled(const QPoint& p);
|
||||||
void tick();
|
void tick();
|
||||||
};
|
};
|
||||||
|
@ -83,7 +83,7 @@ Interferometer::Interferometer(DeviceAPI *deviceAPI) :
|
|||||||
&Interferometer::updateDeviceSetList
|
&Interferometer::updateDeviceSetList
|
||||||
);
|
);
|
||||||
updateDeviceSetList();
|
updateDeviceSetList();
|
||||||
startSinks();
|
Interferometer::startSinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
Interferometer::~Interferometer()
|
Interferometer::~Interferometer()
|
||||||
@ -98,7 +98,7 @@ Interferometer::~Interferometer()
|
|||||||
|
|
||||||
m_deviceAPI->removeChannelSinkAPI(this);
|
m_deviceAPI->removeChannelSinkAPI(this);
|
||||||
m_deviceAPI->removeMIMOChannel(this);
|
m_deviceAPI->removeMIMOChannel(this);
|
||||||
stopSinks();
|
Interferometer::stopSinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interferometer::setDeviceAPI(DeviceAPI *deviceAPI)
|
void Interferometer::setDeviceAPI(DeviceAPI *deviceAPI)
|
||||||
@ -229,7 +229,7 @@ void Interferometer::applySettings(const InterferometerSettings& settings, const
|
|||||||
QList<ObjectPipe*> pipes;
|
QList<ObjectPipe*> pipes;
|
||||||
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
||||||
|
|
||||||
if (pipes.size() > 0) {
|
if (!pipes.empty()) {
|
||||||
sendChannelSettings(pipes, settingsKeys, settings, force);
|
sendChannelSettings(pipes, settingsKeys, settings, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ void Interferometer::handleInputMessages()
|
|||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
while ((message = m_inputMessageQueue.pop()) != nullptr)
|
||||||
{
|
{
|
||||||
if (handleMessage(*message))
|
if (handleMessage(*message))
|
||||||
{
|
{
|
||||||
@ -267,14 +267,14 @@ bool Interferometer::handleMessage(const Message& cmd)
|
|||||||
{
|
{
|
||||||
if (MsgConfigureInterferometer::match(cmd))
|
if (MsgConfigureInterferometer::match(cmd))
|
||||||
{
|
{
|
||||||
MsgConfigureInterferometer& cfg = (MsgConfigureInterferometer&) cmd;
|
auto& cfg = (const MsgConfigureInterferometer&) cmd;
|
||||||
qDebug() << "Interferometer::handleMessage: MsgConfigureInterferometer";
|
qDebug() << "Interferometer::handleMessage: MsgConfigureInterferometer";
|
||||||
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
|
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DSPMIMOSignalNotification::match(cmd))
|
else if (DSPMIMOSignalNotification::match(cmd))
|
||||||
{
|
{
|
||||||
DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd;
|
auto& notif = (const DSPMIMOSignalNotification&) cmd;
|
||||||
|
|
||||||
qDebug() << "Interferometer::handleMessage: DSPMIMOSignalNotification:"
|
qDebug() << "Interferometer::handleMessage: DSPMIMOSignalNotification:"
|
||||||
<< " inputSampleRate: " << notif.getSampleRate()
|
<< " inputSampleRate: " << notif.getSampleRate()
|
||||||
@ -355,7 +355,7 @@ void Interferometer::validateFilterChainHash(InterferometerSettings& settings)
|
|||||||
void Interferometer::calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash)
|
void Interferometer::calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash)
|
||||||
{
|
{
|
||||||
double shiftFactor = HBFilterChainConverter::getShiftFactor(log2Decim, 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)
|
void Interferometer::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash)
|
||||||
@ -383,7 +383,7 @@ void Interferometer::updateDeviceSetList()
|
|||||||
|
|
||||||
if (deviceSourceEngine)
|
if (deviceSourceEngine)
|
||||||
{
|
{
|
||||||
DeviceSampleSource *deviceSource = deviceSourceEngine->getSource();
|
const DeviceSampleSource *deviceSource = deviceSourceEngine->getSource();
|
||||||
|
|
||||||
if (deviceSource->getDeviceDescription() == "LocalInput") {
|
if (deviceSource->getDeviceDescription() == "LocalInput") {
|
||||||
m_localInputDeviceIndexes.append(deviceSetIndex);
|
m_localInputDeviceIndexes.append(deviceSetIndex);
|
||||||
@ -401,7 +401,7 @@ void Interferometer::updateDeviceSetList()
|
|||||||
InterferometerSettings settings = m_settings;
|
InterferometerSettings settings = m_settings;
|
||||||
int newIndexInList;
|
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
|
if (m_settings.m_localDeviceIndex < 0) { // not set before
|
||||||
newIndexInList = 0; // set to first device in list
|
newIndexInList = 0; // set to first device in list
|
||||||
@ -574,13 +574,13 @@ void Interferometer::webapiUpdateChannelSettings(
|
|||||||
settings.m_reverseAPIAddress = *response.getInterferometerSettings()->getReverseApiAddress();
|
settings.m_reverseAPIAddress = *response.getInterferometerSettings()->getReverseApiAddress();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
||||||
settings.m_reverseAPIPort = response.getInterferometerSettings()->getReverseApiPort();
|
settings.m_reverseAPIPort = (uint16_t) response.getInterferometerSettings()->getReverseApiPort();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||||
settings.m_reverseAPIDeviceIndex = response.getInterferometerSettings()->getReverseApiDeviceIndex();
|
settings.m_reverseAPIDeviceIndex = (uint16_t) response.getInterferometerSettings()->getReverseApiDeviceIndex();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
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")) {
|
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
|
||||||
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getSpectrumConfig());
|
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getSpectrumConfig());
|
||||||
@ -632,7 +632,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
|
auto *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
|
||||||
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
|
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
|
||||||
response.getInterferometerSettings()->setSpectrumConfig(swgGLSpectrum);
|
response.getInterferometerSettings()->setSpectrumConfig(swgGLSpectrum);
|
||||||
}
|
}
|
||||||
@ -646,7 +646,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
|
auto *swgGLScope = new SWGSDRangel::SWGGLScope();
|
||||||
settings.m_scopeGUI->formatTo(swgGLScope);
|
settings.m_scopeGUI->formatTo(swgGLScope);
|
||||||
response.getInterferometerSettings()->setScopeConfig(swgGLScope);
|
response.getInterferometerSettings()->setScopeConfig(swgGLScope);
|
||||||
}
|
}
|
||||||
@ -660,7 +660,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||||
response.getInterferometerSettings()->setChannelMarker(swgChannelMarker);
|
response.getInterferometerSettings()->setChannelMarker(swgChannelMarker);
|
||||||
}
|
}
|
||||||
@ -674,7 +674,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||||
settings.m_rollupState->formatTo(swgRollupState);
|
settings.m_rollupState->formatTo(swgRollupState);
|
||||||
response.getInterferometerSettings()->setRollupState(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)
|
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);
|
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||||
|
|
||||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
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.setUrl(QUrl(channelSettingsURL));
|
||||||
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
|
|
||||||
QBuffer *buffer = new QBuffer();
|
auto *buffer = new QBuffer();
|
||||||
buffer->open((QBuffer::ReadWrite));
|
buffer->open(QBuffer::ReadWrite);
|
||||||
buffer->write(swgChannelSettings->asJson().toUtf8());
|
buffer->write(swgChannelSettings->asJson().toUtf8());
|
||||||
buffer->seek(0);
|
buffer->seek(0);
|
||||||
|
|
||||||
@ -710,7 +710,7 @@ void Interferometer::sendChannelSettings(
|
|||||||
const QList<ObjectPipe*>& pipes,
|
const QList<ObjectPipe*>& pipes,
|
||||||
const QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
const InterferometerSettings& settings,
|
const InterferometerSettings& settings,
|
||||||
bool force)
|
bool force) const
|
||||||
{
|
{
|
||||||
for (const auto& pipe : pipes)
|
for (const auto& pipe : pipes)
|
||||||
{
|
{
|
||||||
@ -718,7 +718,7 @@ void Interferometer::sendChannelSettings(
|
|||||||
|
|
||||||
if (messageQueue)
|
if (messageQueue)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||||
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||||
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
|
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
|
||||||
this,
|
this,
|
||||||
@ -736,7 +736,7 @@ void Interferometer::webapiFormatChannelSettings(
|
|||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||||
const InterferometerSettings& settings,
|
const InterferometerSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
swgChannelSettings->setDirection(2); // MIMO sink
|
swgChannelSettings->setDirection(2); // MIMO sink
|
||||||
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
|
||||||
@ -774,34 +774,34 @@ void Interferometer::webapiFormatChannelSettings(
|
|||||||
|
|
||||||
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrumConfig") || force))
|
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrumConfig") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
|
auto *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
|
||||||
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
|
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
|
||||||
swgInterferometerSettings->setSpectrumConfig(swgGLSpectrum);
|
swgInterferometerSettings->setSpectrumConfig(swgGLSpectrum);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
|
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
|
auto *swgGLScope = new SWGSDRangel::SWGGLScope();
|
||||||
settings.m_scopeGUI->formatTo(swgGLScope);
|
settings.m_scopeGUI->formatTo(swgGLScope);
|
||||||
swgInterferometerSettings->setScopeConfig(swgGLScope);
|
swgInterferometerSettings->setScopeConfig(swgGLScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
|
||||||
settings.m_channelMarker->formatTo(swgChannelMarker);
|
settings.m_channelMarker->formatTo(swgChannelMarker);
|
||||||
swgInterferometerSettings->setChannelMarker(swgChannelMarker);
|
swgInterferometerSettings->setChannelMarker(swgChannelMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
|
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
|
auto *swgRollupState = new SWGSDRangel::SWGRollupState();
|
||||||
settings.m_rollupState->formatTo(swgRollupState);
|
settings.m_rollupState->formatTo(swgRollupState);
|
||||||
swgInterferometerSettings->setRollupState(swgRollupState);
|
swgInterferometerSettings->setRollupState(swgRollupState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interferometer::networkManagerFinished(QNetworkReply *reply)
|
void Interferometer::networkManagerFinished(QNetworkReply *reply) const
|
||||||
{
|
{
|
||||||
QNetworkReply::NetworkError replyError = reply->error();
|
QNetworkReply::NetworkError replyError = reply->error();
|
||||||
|
|
||||||
|
@ -108,63 +108,60 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
Interferometer(DeviceAPI *deviceAPI);
|
explicit Interferometer(DeviceAPI *deviceAPI);
|
||||||
virtual ~Interferometer();
|
~Interferometer() final;
|
||||||
virtual void destroy() { delete this; }
|
void destroy() final { delete this; }
|
||||||
virtual void setDeviceAPI(DeviceAPI *deviceAPI);
|
void setDeviceAPI(DeviceAPI *deviceAPI) final;
|
||||||
virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; }
|
DeviceAPI *getDeviceAPI() final { return m_deviceAPI; }
|
||||||
|
|
||||||
virtual void startSinks(); //!< thread start()
|
void startSinks() final; //!< thread start()
|
||||||
virtual void stopSinks(); //!< thread exit() and wait()
|
void stopSinks() final; //!< thread exit() and wait()
|
||||||
virtual void startSources() {}
|
void startSources() final { /* not for MIMMO*/ }
|
||||||
virtual void stopSources() {}
|
void stopSources() final { /* not for MIMMO*/ }
|
||||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex);
|
void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final;
|
||||||
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex);
|
void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final;
|
||||||
virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); }
|
void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); }
|
||||||
virtual QString getMIMOName() { return objectName(); }
|
QString getMIMOName() final { return objectName(); }
|
||||||
|
|
||||||
virtual void getIdentifier(QString& id) { id = objectName(); }
|
void getIdentifier(QString& id) final { id = objectName(); }
|
||||||
virtual QString getIdentifier() const { return objectName(); }
|
QString getIdentifier() const final { return objectName(); }
|
||||||
virtual void getTitle(QString& title) { title = "Interferometer"; }
|
void getTitle(QString& title) final { title = "Interferometer"; }
|
||||||
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }
|
qint64 getCenterFrequency() const final { return m_frequencyOffset; }
|
||||||
virtual void setCenterFrequency(qint64) {}
|
void setCenterFrequency(qint64) final { /* not for MIMMO*/ }
|
||||||
uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; }
|
uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; }
|
||||||
|
|
||||||
virtual QByteArray serialize() const;
|
QByteArray serialize() const final;
|
||||||
virtual bool deserialize(const QByteArray& data);
|
bool deserialize(const QByteArray& data) final;
|
||||||
|
|
||||||
virtual int getNbSinkStreams() const { return 2; }
|
int getNbSinkStreams() const final { return 2; }
|
||||||
virtual int getNbSourceStreams() const { return 0; }
|
int getNbSourceStreams() const final { return 0; }
|
||||||
virtual int getStreamIndex() const { return -1; }
|
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) streamIndex;
|
||||||
(void) sinkElseSource;
|
(void) sinkElseSource;
|
||||||
return m_frequencyOffset;
|
return m_frequencyOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
|
|
||||||
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
|
|
||||||
|
|
||||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||||
ScopeVis *getScopeVis() { return &m_scopeSink; }
|
ScopeVis *getScopeVis() { return &m_scopeSink; }
|
||||||
void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash);
|
void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash);
|
||||||
const QList<int>& getDeviceSetList() { return m_localInputDeviceIndexes; }
|
const QList<int>& getDeviceSetList() { return m_localInputDeviceIndexes; }
|
||||||
|
|
||||||
virtual int webapiSettingsGet(
|
int webapiSettingsGet(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiSettingsPutPatch(
|
int webapiSettingsPutPatch(
|
||||||
bool force,
|
bool force,
|
||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
virtual int webapiWorkspaceGet(
|
int webapiWorkspaceGet(
|
||||||
SWGSDRangel::SWGWorkspaceInfo& query,
|
SWGSDRangel::SWGWorkspaceInfo& query,
|
||||||
QString& errorMessage);
|
QString& errorMessage) final;
|
||||||
|
|
||||||
static void webapiFormatChannelSettings(
|
static void webapiFormatChannelSettings(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
@ -196,11 +193,12 @@ private:
|
|||||||
uint64_t m_centerFrequency;
|
uint64_t m_centerFrequency;
|
||||||
int64_t m_frequencyOffset;
|
int64_t m_frequencyOffset;
|
||||||
uint32_t m_deviceSampleRate;
|
uint32_t m_deviceSampleRate;
|
||||||
int m_count0, m_count1;
|
int m_count0;
|
||||||
|
int m_count1;
|
||||||
|
|
||||||
QList<int> m_localInputDeviceIndexes;
|
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);
|
void applySettings(const InterferometerSettings& settings, const QList<QString>& settingsKeys, bool force = false);
|
||||||
static void validateFilterChainHash(InterferometerSettings& settings);
|
static void validateFilterChainHash(InterferometerSettings& settings);
|
||||||
void calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash);
|
void calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash);
|
||||||
@ -213,17 +211,17 @@ private:
|
|||||||
const QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
const InterferometerSettings& settings,
|
const InterferometerSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
) const;
|
||||||
void webapiFormatChannelSettings(
|
void webapiFormatChannelSettings(
|
||||||
const QList<QString>& channelSettingsKeys,
|
const QList<QString>& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||||
const InterferometerSettings& settings,
|
const InterferometerSettings& settings,
|
||||||
bool force
|
bool force
|
||||||
);
|
) const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_INTERFEROMETER_H
|
#endif // INCLUDE_INTERFEROMETER_H
|
||||||
|
@ -32,15 +32,10 @@
|
|||||||
|
|
||||||
InterferometerGUI* InterferometerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *channelMIMO)
|
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;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterferometerGUI::destroy()
|
|
||||||
{
|
|
||||||
delete this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void InterferometerGUI::resetToDefaults()
|
void InterferometerGUI::resetToDefaults()
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
@ -77,7 +72,7 @@ bool InterferometerGUI::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
if (Interferometer::MsgBasebandNotification::match(message))
|
if (Interferometer::MsgBasebandNotification::match(message))
|
||||||
{
|
{
|
||||||
Interferometer::MsgBasebandNotification& notif = (Interferometer::MsgBasebandNotification&) message;
|
auto& notif = (const Interferometer::MsgBasebandNotification&) message;
|
||||||
m_sampleRate = notif.getSampleRate();
|
m_sampleRate = notif.getSampleRate();
|
||||||
m_centerFrequency = notif.getCenterFrequency();
|
m_centerFrequency = notif.getCenterFrequency();
|
||||||
displayRateAndShift();
|
displayRateAndShift();
|
||||||
@ -86,7 +81,7 @@ bool InterferometerGUI::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (Interferometer::MsgConfigureInterferometer::match(message))
|
else if (Interferometer::MsgConfigureInterferometer::match(message))
|
||||||
{
|
{
|
||||||
const Interferometer::MsgConfigureInterferometer& cfg = (const Interferometer::MsgConfigureInterferometer&) message;
|
auto& cfg = (const Interferometer::MsgConfigureInterferometer&) message;
|
||||||
|
|
||||||
if (cfg.getForce()) {
|
if (cfg.getForce()) {
|
||||||
m_settings = cfg.getSettings();
|
m_settings = cfg.getSettings();
|
||||||
@ -102,7 +97,8 @@ bool InterferometerGUI::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (Interferometer::MsgReportDevices::match(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());
|
updateDeviceSetList(report.getDeviceSetIndexes());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -135,7 +131,7 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
|
|||||||
m_spectrumVis->setGLSpectrum(ui->glSpectrum);
|
m_spectrumVis->setGLSpectrum(ui->glSpectrum);
|
||||||
m_scopeVis = m_interferometer->getScopeVis();
|
m_scopeVis = m_interferometer->getScopeVis();
|
||||||
m_scopeVis->setGLScope(ui->glScope);
|
m_scopeVis->setGLScope(ui->glScope);
|
||||||
m_interferometer->setMessageQueueToGUI(getInputMessageQueue());
|
m_interferometer->setMessageQueueToGUI(InterferometerGUI::getInputMessageQueue());
|
||||||
m_sampleRate = m_interferometer->getDeviceSampleRate();
|
m_sampleRate = m_interferometer->getDeviceSampleRate();
|
||||||
|
|
||||||
ui->spectrumGUI->setBuddies(m_spectrumVis, ui->glSpectrum);
|
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
|
m_scopeVis->setTraceChunkSize(Interferometer::m_fftSize); // Set scope trace length unit to FFT size
|
||||||
ui->scopeGUI->traceLengthChange();
|
ui->scopeGUI->traceLengthChange();
|
||||||
|
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(InterferometerGUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
|
|
||||||
updateDeviceSetList(m_interferometer->getDeviceSetList());
|
updateDeviceSetList(m_interferometer->getDeviceSetList());
|
||||||
displaySettings();
|
displaySettings();
|
||||||
@ -243,15 +239,15 @@ void InterferometerGUI::displaySettings()
|
|||||||
|
|
||||||
void InterferometerGUI::displayRateAndShift()
|
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);
|
double channelSampleRate = ((double) m_sampleRate) / (1<<m_settings.m_log2Decim);
|
||||||
QLocale loc;
|
QLocale loc;
|
||||||
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
|
ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
|
||||||
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
|
ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
|
||||||
m_channelMarker.setCenterFrequency(shift);
|
m_channelMarker.setCenterFrequency(shift);
|
||||||
m_channelMarker.setBandwidth(channelSampleRate);
|
m_channelMarker.setBandwidth((int) channelSampleRate);
|
||||||
ui->glSpectrum->setSampleRate(channelSampleRate);
|
ui->glSpectrum->setSampleRate((int) channelSampleRate);
|
||||||
m_scopeVis->setLiveRate(channelSampleRate);
|
m_scopeVis->setLiveRate((int) channelSampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterferometerGUI::leaveEvent(QEvent*)
|
void InterferometerGUI::leaveEvent(QEvent*)
|
||||||
@ -268,7 +264,7 @@ void InterferometerGUI::handleSourceMessages()
|
|||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
while ((message = getInputMessageQueue()->pop()) != 0)
|
while ((message = getInputMessageQueue()->pop()) != nullptr)
|
||||||
{
|
{
|
||||||
if (handleMessage(*message))
|
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) widget;
|
||||||
(void) rollDown;
|
(void) rollDown;
|
||||||
@ -288,7 +284,7 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void InterferometerGUI::onMenuDialogCalled(const QPoint &p)
|
void InterferometerGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
@ -330,7 +326,7 @@ void InterferometerGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
|
|
||||||
void InterferometerGUI::updateDeviceSetList(const QList<int>& deviceSetIndexes)
|
void InterferometerGUI::updateDeviceSetList(const QList<int>& deviceSetIndexes)
|
||||||
{
|
{
|
||||||
QList<int>::const_iterator it = deviceSetIndexes.begin();
|
auto it = deviceSetIndexes.begin();
|
||||||
|
|
||||||
ui->localDevice->blockSignals(true);
|
ui->localDevice->blockSignals(true);
|
||||||
|
|
||||||
@ -343,7 +339,7 @@ void InterferometerGUI::updateDeviceSetList(const QList<int>& deviceSetIndexes)
|
|||||||
ui->localDevice->blockSignals(false);
|
ui->localDevice->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int InterferometerGUI::getLocalDeviceIndexInCombo(int localDeviceIndex)
|
int InterferometerGUI::getLocalDeviceIndexInCombo(int localDeviceIndex) const
|
||||||
{
|
{
|
||||||
int index = 0;
|
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->decimationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &InterferometerGUI::on_decimationFactor_currentIndexChanged);
|
||||||
QObject::connect(ui->position, &QSlider::valueChanged, this, &InterferometerGUI::on_position_valueChanged);
|
QObject::connect(ui->position, &QSlider::valueChanged, this, &InterferometerGUI::on_position_valueChanged);
|
||||||
@ -472,5 +468,5 @@ void InterferometerGUI::makeUIConnections()
|
|||||||
|
|
||||||
void InterferometerGUI::updateAbsoluteCenterFrequency()
|
void InterferometerGUI::updateAbsoluteCenterFrequency()
|
||||||
{
|
{
|
||||||
setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate);
|
setStatusFrequency((qint64) ((double) m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate));
|
||||||
}
|
}
|
||||||
|
@ -46,22 +46,21 @@ class InterferometerGUI : public ChannelGUI {
|
|||||||
public:
|
public:
|
||||||
static InterferometerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
|
static InterferometerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel);
|
||||||
|
|
||||||
virtual void destroy();
|
void resetToDefaults() final;
|
||||||
virtual void resetToDefaults();
|
QByteArray serialize() const final;
|
||||||
virtual QByteArray serialize() const;
|
bool deserialize(const QByteArray& data) final;
|
||||||
virtual bool deserialize(const QByteArray& data);
|
MessageQueue* getInputMessageQueue() final;
|
||||||
virtual MessageQueue* getInputMessageQueue();
|
void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; };
|
||||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
|
int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; };
|
||||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
|
void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; };
|
||||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
|
QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; };
|
||||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
|
QString getTitle() const final { return m_settings.m_title; };
|
||||||
virtual QString getTitle() const { return m_settings.m_title; };
|
QColor getTitleColor() const final { return m_settings.m_rgbColor; };
|
||||||
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
|
void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; }
|
||||||
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
|
bool getHidden() const final { return m_settings.m_hidden; }
|
||||||
virtual bool getHidden() const { return m_settings.m_hidden; }
|
ChannelMarker& getChannelMarker() final { return m_channelMarker; }
|
||||||
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
|
int getStreamIndex() const final { return -1; }
|
||||||
virtual int getStreamIndex() const { return -1; }
|
void setStreamIndex(int streamIndex) final { (void) streamIndex; }
|
||||||
virtual void setStreamIndex(int streamIndex) { (void) streamIndex; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::InterferometerGUI* ui;
|
Ui::InterferometerGUI* ui;
|
||||||
@ -83,7 +82,7 @@ private:
|
|||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr);
|
explicit InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr);
|
||||||
virtual ~InterferometerGUI();
|
~InterferometerGUI() final;
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
void applySettings(bool force = false);
|
void applySettings(bool force = false);
|
||||||
@ -92,13 +91,13 @@ private:
|
|||||||
void displaySettings();
|
void displaySettings();
|
||||||
void displayRateAndShift();
|
void displayRateAndShift();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
void makeUIConnections();
|
void makeUIConnections() const;
|
||||||
void updateAbsoluteCenterFrequency();
|
void updateAbsoluteCenterFrequency();
|
||||||
void updateDeviceSetList(const QList<int>& deviceSetIndexes);
|
void updateDeviceSetList(const QList<int>& deviceSetIndexes);
|
||||||
int getLocalDeviceIndexInCombo(int localDeviceIndex);
|
int getLocalDeviceIndexInCombo(int localDeviceIndex) const;
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*) final;
|
||||||
void enterEvent(EnterEventType*);
|
void enterEvent(EnterEventType*) final;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleSourceMessages();
|
void handleSourceMessages();
|
||||||
@ -111,7 +110,7 @@ private slots:
|
|||||||
void on_correlationType_currentIndexChanged(int index);
|
void on_correlationType_currentIndexChanged(int index);
|
||||||
void on_localDevice_currentIndexChanged(int index);
|
void on_localDevice_currentIndexChanged(int index);
|
||||||
void on_localDevicePlay_toggled(bool checked);
|
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 onMenuDialogCalled(const QPoint& p);
|
||||||
void tick();
|
void tick();
|
||||||
};
|
};
|
||||||
|
@ -474,7 +474,7 @@ void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ChannelAnalyzerGUI::onMenuDialogCalled(const QPoint& p)
|
void ChannelAnalyzerGUI::onMenuDialogCalled(const QPoint& p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -138,11 +138,6 @@ public:
|
|||||||
m_basebandSink->resetMagLevels();
|
m_basebandSink->resetMagLevels();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
static const char * const m_channelIdURI;
|
static const char * const m_channelIdURI;
|
||||||
|
@ -200,7 +200,7 @@ void ChannelPowerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ChannelPowerGUI::onMenuDialogCalled(const QPoint &p)
|
void ChannelPowerGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -152,7 +152,7 @@ public:
|
|||||||
SWGSDRangel::SWGChannelSettings& response);
|
SWGSDRangel::SWGChannelSettings& response);
|
||||||
|
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); }
|
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);
|
ChannelAPI::setMessageQueueToGUI(queue);
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
m_basebandSink->setMessageQueueToGUI(queue);
|
||||||
}
|
}
|
||||||
|
@ -3904,7 +3904,7 @@ void ADSBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ADSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void ADSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -163,10 +163,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -667,7 +667,7 @@ void AISDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void AISDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void AISDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -394,7 +394,7 @@ void AMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void AMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void AMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -556,7 +556,7 @@ void APTDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void APTDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void APTDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -207,7 +207,7 @@ void ATVDemodGUI::handleSourceMessages()
|
|||||||
|
|
||||||
void ATVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void ATVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -332,7 +332,7 @@ void BFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -349,7 +349,7 @@ void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ChirpChatDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void ChirpChatDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -392,10 +392,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
int getAudioSampleRate() const { return m_basebandSink->getAudioSampleRate(); }
|
int getAudioSampleRate() const { return m_basebandSink->getAudioSampleRate(); }
|
||||||
|
@ -451,7 +451,7 @@ void DABDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void DABDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void DABDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -169,7 +169,7 @@ void DATVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void DATVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void DATVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -163,10 +163,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ void DSCDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void DSCDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void DSCDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -297,7 +297,7 @@ void DSDDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -137,10 +137,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ void EndOfTrainDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void EndOfTrainDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void EndOfTrainDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -201,7 +201,7 @@ void FreeDVDemodGUI::on_spanLog2_valueChanged(int value)
|
|||||||
|
|
||||||
void FreeDVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void FreeDVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -102,7 +102,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setDeviceCenterFrequency(qint64 centerFrequency, int index);
|
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; }
|
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
|
||||||
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }
|
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@ void FT8DemodGUI::on_settings_clicked()
|
|||||||
|
|
||||||
void FT8DemodGUI::onMenuDialogCalled(const QPoint &p)
|
void FT8DemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -179,10 +179,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -946,7 +946,7 @@ void ILSDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ILSDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void ILSDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -349,7 +349,7 @@ void M17DemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void M17DemodGUI::onMenuDialogCalled(const QPoint &p)
|
void M17DemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -183,10 +183,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ void NavtexDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void NavtexDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void NavtexDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -135,7 +135,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override { ChannelAPI::setMessageQueueToGUI(queue); }
|
|
||||||
int getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
|
int getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
@ -318,7 +318,7 @@ void NFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void NFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void NFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -134,10 +134,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ void PacketDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void PacketDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void PacketDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -190,10 +190,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@ void PagerDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void PagerDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void PagerDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -501,7 +501,7 @@ void RadiosondeDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RadiosondeDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void RadiosondeDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -177,10 +177,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ void RttyDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RttyDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void RttyDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -101,7 +101,7 @@ public:
|
|||||||
return m_settings.m_inputFrequencyOffset;
|
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 getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
|
||||||
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
|
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
|
||||||
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }
|
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }
|
||||||
|
@ -299,7 +299,7 @@ void SSBDemodGUI::on_filterIndex_valueChanged(int value)
|
|||||||
|
|
||||||
void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -238,7 +238,7 @@ void VORDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void VORDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void VORDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -125,7 +125,7 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override {
|
void setMessageQueueToGUI(MessageQueue* queue) final {
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
ChannelAPI::setMessageQueueToGUI(queue);
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
m_basebandSink->setMessageQueueToGUI(queue);
|
||||||
}
|
}
|
||||||
|
@ -1111,7 +1111,7 @@ void VORDemodMCGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void VORDemodMCGUI::onMenuDialogCalled(const QPoint &p)
|
void VORDemodMCGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -180,7 +180,7 @@ void WFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void WFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void WFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -148,7 +148,7 @@ public:
|
|||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response);
|
SWGSDRangel::SWGChannelSettings& response);
|
||||||
|
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override;
|
void setMessageQueueToGUI(MessageQueue* queue) final;
|
||||||
void getLocalDevices(std::vector<uint32_t>& indexes);
|
void getLocalDevices(std::vector<uint32_t>& indexes);
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||||
|
@ -363,7 +363,7 @@ void FileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void FileSinkGUI::onMenuDialogCalled(const QPoint &p)
|
void FileSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -355,7 +355,7 @@ public:
|
|||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response);
|
SWGSDRangel::SWGChannelSettings& response);
|
||||||
|
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override {
|
void setMessageQueueToGUI(MessageQueue* queue) final {
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
ChannelAPI::setMessageQueueToGUI(queue);
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
m_basebandSink->setMessageQueueToGUI(queue);
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ void FreqScannerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void FreqScannerGUI::onMenuDialogCalled(const QPoint &p)
|
void FreqScannerGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -264,7 +264,7 @@ void FreqTrackerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void FreqTrackerGUI::onMenuDialogCalled(const QPoint &p)
|
void FreqTrackerGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -143,11 +143,6 @@ public:
|
|||||||
m_basebandSink->resetMagLevels();
|
m_basebandSink->resetMagLevels();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
static const char * const m_channelIdURI;
|
static const char * const m_channelIdURI;
|
||||||
|
@ -483,7 +483,7 @@ void HeatMapGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void HeatMapGUI::onMenuDialogCalled(const QPoint &p)
|
void HeatMapGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -333,7 +333,7 @@ void LocalSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void LocalSinkGUI::onMenuDialogCalled(const QPoint &p)
|
void LocalSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -540,7 +540,7 @@ void NoiseFigureGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void NoiseFigureGUI::onMenuDialogCalled(const QPoint &p)
|
void NoiseFigureGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -442,10 +442,6 @@ public:
|
|||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) {
|
||||||
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
m_basebandSink->getMagSqLevels(avg, peak, nbSamples);
|
||||||
}
|
}
|
||||||
/* void setMessageQueueToGUI(MessageQueue* queue) override {
|
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
|
@ -1940,7 +1940,7 @@ void RadioAstronomyGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RadioAstronomyGUI::onMenuDialogCalled(const QPoint &p)
|
void RadioAstronomyGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -282,7 +282,7 @@ void RadioClockGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RadioClockGUI::onMenuDialogCalled(const QPoint &p)
|
void RadioClockGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -233,7 +233,7 @@ void RemoteSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RemoteSinkGUI::onMenuDialogCalled(const QPoint &p)
|
void RemoteSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -164,7 +164,7 @@ public:
|
|||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
int getBasebandSampleRate() const { return m_basebandSampleRate; }
|
int getBasebandSampleRate() const { return m_basebandSampleRate; }
|
||||||
|
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override {
|
void setMessageQueueToGUI(MessageQueue* queue) final {
|
||||||
ChannelAPI::setMessageQueueToGUI(queue);
|
ChannelAPI::setMessageQueueToGUI(queue);
|
||||||
m_basebandSink->setMessageQueueToGUI(queue);
|
m_basebandSink->setMessageQueueToGUI(queue);
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ void RemoteTCPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RemoteTCPSinkGUI::onMenuDialogCalled(const QPoint &p)
|
void RemoteTCPSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -148,7 +148,7 @@ public:
|
|||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response);
|
SWGSDRangel::SWGChannelSettings& response);
|
||||||
|
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override;
|
void setMessageQueueToGUI(MessageQueue* queue) final;
|
||||||
void getLocalDevices(std::vector<uint32_t>& indexes);
|
void getLocalDevices(std::vector<uint32_t>& indexes);
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||||
|
@ -357,7 +357,7 @@ void SigMFFileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void SigMFFileSinkGUI::onMenuDialogCalled(const QPoint &p)
|
void SigMFFileSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -615,7 +615,7 @@ void UDPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void UDPSinkGUI::onMenuDialogCalled(const QPoint &p)
|
void UDPSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -101,7 +101,7 @@ public:
|
|||||||
return m_settings.m_inputFrequencyOffset;
|
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 getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; }
|
||||||
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
|
uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; }
|
||||||
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }
|
double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; }
|
||||||
|
@ -268,7 +268,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>AF volume limter gain (dB)</string>
|
<string>AF volume limiter gain (dB)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-80</number>
|
<number>-80</number>
|
||||||
|
@ -434,7 +434,7 @@ void WDSPRxGUI::on_demod_currentIndexChanged(int index)
|
|||||||
|
|
||||||
void WDSPRxGUI::onMenuDialogCalled(const QPoint &p)
|
void WDSPRxGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
@ -513,7 +513,7 @@ WDSPRxGUI::WDSPRxGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
|
|||||||
m_squelchDialog(nullptr)
|
m_squelchDialog(nullptr)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
m_helpURL = "plugins/channelrx/demodssb/readme.md";
|
m_helpURL = "plugins/channelrx/wdsprx/readme.md";
|
||||||
RollupContents *rollupContents = getRollupContents();
|
RollupContents *rollupContents = getRollupContents();
|
||||||
ui->setupUi(rollupContents);
|
ui->setupUi(rollupContents);
|
||||||
setSizePolicy(rollupContents->sizePolicy());
|
setSizePolicy(rollupContents->sizePolicy());
|
||||||
|
@ -219,7 +219,7 @@ public:
|
|||||||
|
|
||||||
double getMagSq() const;
|
double getMagSq() const;
|
||||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) const;
|
void getMagSqLevels(double& avg, double& peak, int& nbSamples) const;
|
||||||
void setMessageQueueToGUI(MessageQueue* queue) override;
|
void setMessageQueueToGUI(MessageQueue* queue) final;
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
|
|
||||||
static const char* const m_channelIdURI;
|
static const char* const m_channelIdURI;
|
||||||
|
@ -369,7 +369,7 @@ void FileSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void FileSourceGUI::onMenuDialogCalled(const QPoint &p)
|
void FileSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -237,7 +237,7 @@ void LocalSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void LocalSourceGUI::onMenuDialogCalled(const QPoint &p)
|
void LocalSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -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)
|
void IEEE_802_15_4_ModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -353,7 +353,7 @@ void AISModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void AISModGUI::onMenuDialogCalled(const QPoint &p)
|
void AISModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -296,7 +296,7 @@ void AMModGUI::onWidgetRolled(const QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void AMModGUI::onMenuDialogCalled(const QPoint &p)
|
void AMModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -309,7 +309,7 @@ public:
|
|||||||
void setLevelMeter(QObject *levelMeter);
|
void setLevelMeter(QObject *levelMeter);
|
||||||
int getEffectiveSampleRate() const;
|
int getEffectiveSampleRate() const;
|
||||||
void getCameraNumbers(std::vector<int>& numbers);
|
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_channelIdURI;
|
||||||
static const char* const m_channelId;
|
static const char* const m_channelId;
|
||||||
|
@ -702,7 +702,7 @@ void ATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ATVModGUI::onMenuDialogCalled(const QPoint &p)
|
void ATVModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -370,7 +370,7 @@ void ChirpChatModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void ChirpChatModGUI::onMenuDialogCalled(const QPoint &p)
|
void ChirpChatModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -262,7 +262,7 @@ public:
|
|||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
double getMagSq() const;
|
double getMagSq() const;
|
||||||
int getEffectiveSampleRate() 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_channelIdURI;
|
||||||
static const char* const m_channelId;
|
static const char* const m_channelId;
|
||||||
|
@ -497,7 +497,7 @@ void DATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void DATVModGUI::onMenuDialogCalled(const QPoint &p)
|
void DATVModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -306,7 +306,7 @@ void FreeDVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void FreeDVModGUI::onMenuDialogCalled(const QPoint &p)
|
void FreeDVModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -402,7 +402,7 @@ void M17ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void M17ModGUI::onMenuDialogCalled(const QPoint &p)
|
void M17ModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -384,7 +384,7 @@ void NFMModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void NFMModGUI::onMenuDialogCalled(const QPoint &p)
|
void NFMModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -399,7 +399,7 @@ void PacketModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void PacketModGUI::onMenuDialogCalled(const QPoint &p)
|
void PacketModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -194,7 +194,7 @@ public:
|
|||||||
void setLevelMeter(QObject *levelMeter);
|
void setLevelMeter(QObject *levelMeter);
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
int getSourceChannelSampleRate() 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_channelIdURI;
|
||||||
static const char* const m_channelId;
|
static const char* const m_channelId;
|
||||||
|
@ -283,7 +283,7 @@ void PSK31GUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void PSK31GUI::onMenuDialogCalled(const QPoint &p)
|
void PSK31GUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -194,7 +194,7 @@ public:
|
|||||||
void setLevelMeter(QObject *levelMeter);
|
void setLevelMeter(QObject *levelMeter);
|
||||||
uint32_t getNumberOfDeviceStreams() const;
|
uint32_t getNumberOfDeviceStreams() const;
|
||||||
int getSourceChannelSampleRate() 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_channelIdURI;
|
||||||
static const char* const m_channelId;
|
static const char* const m_channelId;
|
||||||
|
@ -362,7 +362,7 @@ void RttyModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RttyModGUI::onMenuDialogCalled(const QPoint &p)
|
void RttyModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -371,7 +371,7 @@ void SSBModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void SSBModGUI::onMenuDialogCalled(const QPoint &p)
|
void SSBModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -300,7 +300,7 @@ void WFMModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void WFMModGUI::onMenuDialogCalled(const QPoint &p)
|
void WFMModGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -310,7 +310,7 @@ void RemoteSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p)
|
void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
@ -495,7 +495,7 @@ void UDPSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
|||||||
|
|
||||||
void UDPSourceGUI::onMenuDialogCalled(const QPoint &p)
|
void UDPSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
if (m_contextMenuType == ContextMenuChannelSettings)
|
if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user