1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Fix loss of constellation when device restarted in M17 demod.

This commit is contained in:
srcejon 2023-11-17 14:17:52 +00:00
parent 4178abe24b
commit 66351cff30
2 changed files with 13 additions and 3 deletions

View File

@ -57,7 +57,8 @@ M17Demod::M17Demod(DeviceAPI *deviceAPI) :
m_thread(nullptr),
m_basebandSink(nullptr),
m_running(false),
m_basebandSampleRate(0)
m_basebandSampleRate(0),
m_scopeXYSink(nullptr)
{
qDebug("M17Demod::M17Demod");
setObjectName(m_channelId);
@ -141,6 +142,7 @@ void M17Demod::start()
if (m_basebandSampleRate != 0) {
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
}
m_basebandSink->setScopeXYSink(m_scopeXYSink);
m_basebandSink->reset();
m_thread->start();
@ -751,3 +753,11 @@ void M17Demod::handleIndexInDeviceSetChanged(int index)
m_basebandSink->setFifoLabel(fifoLabel);
m_basebandSink->setAudioFifoLabel(fifoLabel);
}
void M17Demod::setScopeXYSink(BasebandSampleSink* sampleSink)
{
m_scopeXYSink = sampleSink;
if (m_running) {
m_basebandSink->setScopeXYSink(sampleSink);
}
}

View File

@ -209,7 +209,7 @@ public:
SWGSDRangel::SWGChannelSettings& response);
uint32_t getNumberOfDeviceStreams() const;
void setScopeXYSink(BasebandSampleSink* sampleSink) { if (m_running) { m_basebandSink->setScopeXYSink(sampleSink); } }
void setScopeXYSink(BasebandSampleSink* sampleSink);
void configureMyPosition(float myLatitude, float myLongitude) { if (m_running) { m_basebandSink->configureMyPosition(myLatitude, myLongitude); } }
double getMagSq() { return m_running ? m_basebandSink->getMagSq() : 0.0; }
bool getSquelchOpen() const { return m_running && m_basebandSink->getSquelchOpen(); }
@ -281,7 +281,7 @@ private:
bool m_running;
M17DemodSettings m_settings;
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
BasebandSampleSink *m_scopeXYSink;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;