Skip to content

Commit

Permalink
Frequency Scanner: handle change of I/Q stream in tracked channels
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Dec 14, 2023
1 parent a9a6c67 commit 86a1d15
Show file tree
Hide file tree
Showing 57 changed files with 184 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/channelrx/chanalyzer/chanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ void ChannelAnalyzer::applySettings(const ChannelAnalyzerSettings& settings, boo
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodadsb/adsbdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ void ADSBDemod::applySettings(const ADSBDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodais/aisdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ void AISDemod::applySettings(const AISDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodam/amdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ void AMDemod::applySettings(const AMDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodapt/aptdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ void APTDemod::applySettings(const APTDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
13 changes: 13 additions & 0 deletions plugins/channelrx/demodatv/atvdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,19 @@ void ATVDemod::applySettings(const ATVDemodSettings& settings, bool force)
<< "m_udpPort:" << settings.m_udpPort
<< "force:" << force;

if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}
}

ATVDemodBaseband::MsgConfigureATVDemodBaseband *msg = ATVDemodBaseband::MsgConfigureATVDemodBaseband::create(settings, force);
m_basebandSink->getInputMessageQueue()->push(msg);

Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodbfm/bfmdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodchirpchat/chirpchatdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ void ChirpChatDemod::applySettings(const ChirpChatDemodSettings& settings, bool
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demoddab/dabdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ void DABDemod::applySettings(const DABDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
14 changes: 14 additions & 0 deletions plugins/channelrx/demoddatv/datvdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,20 @@ void DATVDemod::applySettings(const DATVDemodSettings& settings, bool force)
if (settings.m_playerEnable != m_settings.m_playerEnable) {
reverseAPIKeys.append("playerEnable");
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
}

DATVDemodBaseband::MsgConfigureDATVDemodBaseband *msg = DATVDemodBaseband::MsgConfigureDATVDemodBaseband::create(settings, force);
m_basebandSink->getInputMessageQueue()->push(msg);
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demoddsc/dscdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ void DSCDemod::applySettings(const DSCDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demoddsd/dsddemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ void DSDDemod::applySettings(const DSDDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodfreedv/freedvdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ void FreeDVDemod::applySettings(const FreeDVDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodft8/ft8demod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ void FT8Demod::applySettings(const FT8DemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodils/ilsdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ void ILSDemod::applySettings(const ILSDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodm17/m17demod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ void M17Demod::applySettings(const M17DemodSettings& settings, const QList<QStri
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}
}

Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodnavtex/navtexdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ void NavtexDemod::applySettings(const NavtexDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodnfm/nfmdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodpacket/packetdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ void PacketDemod::applySettings(const PacketDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodpager/pagerdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ void PagerDemod::applySettings(const PagerDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodradiosonde/radiosondedemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ void RadiosondeDemod::applySettings(const RadiosondeDemodSettings& settings, boo
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodrtty/rttydemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ void RttyDemod::applySettings(const RttyDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodssb/ssbdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodvor/vordemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ void VORDemod::applySettings(const VORDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/demodwfm/wfmdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ void WFMDemod::applySettings(const WFMDemodSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/filesink/filesink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ void FileSink::applySettings(const FileSinkSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
51 changes: 51 additions & 0 deletions plugins/channelrx/freqscanner/freqscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ void FreqScanner::applySettings(const FreqScannerSettings& settings, const QStri
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
scanAvailableChannels(); // re-scan
emit streamIndexChanged(settings.m_streamIndex);
}
}

Expand Down Expand Up @@ -1138,6 +1139,13 @@ void FreqScanner::scanAvailableChannels()
-1
};
m_availableChannels[channel] = availableChannel;
QObject::connect(
channel,
&ChannelAPI::streamIndexChanged,
[=](int streamIndex){
this->handleChannelStreamIndexChanged(streamIndex, channel);
}
);
}
}

Expand Down Expand Up @@ -1165,6 +1173,13 @@ void FreqScanner::scanAvailableChannels()
channel->getStreamIndex()
};
m_availableChannels[channel] = availableChannel;
QObject::connect(
channel,
&ChannelAPI::streamIndexChanged,
[=](int streamIndex){
this->handleChannelStreamIndexChanged(streamIndex, channel);
}
);
}
}
}
Expand All @@ -1187,6 +1202,13 @@ void FreqScanner::handleChannelAdded(int deviceSetIndex, ChannelAPI* channel)
FreqScannerSettings::AvailableChannel availableChannel =
FreqScannerSettings::AvailableChannel{ deviceSetIndex, channel->getIndexInDeviceSet(), -1};
m_availableChannels[channel] = availableChannel;
QObject::connect(
channel,
&ChannelAPI::streamIndexChanged,
[=](int streamIndex){
this->handleChannelStreamIndexChanged(streamIndex, channel);
}
);
}

DSPDeviceMIMOEngine *deviceMIMOEngine = getDeviceAPI()->getDeviceMIMOEngine();
Expand All @@ -1203,6 +1225,13 @@ void FreqScanner::handleChannelAdded(int deviceSetIndex, ChannelAPI* channel)
channel->getStreamIndex()
};
m_availableChannels[channel] = availableChannel;
QObject::connect(
channel,
&ChannelAPI::streamIndexChanged,
[=](int streamIndex){
this->handleChannelStreamIndexChanged(streamIndex, channel);
}
);
}

notifyUpdateChannels();
Expand All @@ -1226,6 +1255,28 @@ void FreqScanner::handleChannelRemoved(int deviceSetIndex, ChannelAPI* channel)
notifyUpdateChannels();
}

void FreqScanner::handleChannelStreamIndexChanged(int streamIndex, ChannelAPI* channel)
{
qDebug("FreqScanner::handleChannelStreamIndexChanged: channel: %s (%p) stream: %d",
qPrintable(channel->getURI()), channel, streamIndex);
if (streamIndex != m_settings.m_streamIndex) // channel has moved to another I/Q stream
{
m_availableChannels.remove(channel);
notifyUpdateChannels();
}
else if (!m_availableChannels.contains(channel)) // if channel has been tracked before put back it in the list
{
FreqScannerSettings::AvailableChannel availableChannel =
FreqScannerSettings::AvailableChannel{
getDeviceSetIndex(),
channel->getIndexInDeviceSet(),
channel->getStreamIndex()
};
m_availableChannels[channel] = availableChannel;
notifyUpdateChannels();
}
}

void FreqScanner::notifyUpdateChannels()
{
if (getMessageQueueToGUI())
Expand Down
1 change: 1 addition & 0 deletions plugins/channelrx/freqscanner/freqscanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ private slots:
void handleIndexInDeviceSetChanged(int index);
void handleChannelAdded(int deviceSetIndex, ChannelAPI* channel);
void handleChannelRemoved(int deviceSetIndex, ChannelAPI* channel);
void handleChannelStreamIndexChanged(int streamIndex, ChannelAPI* channel);
void timeout();

};
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/freqtracker/freqtracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ void FreqTracker::applySettings(const FreqTrackerSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
2 changes: 2 additions & 0 deletions plugins/channelrx/heatmap/heatmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ void HeatMap::applySettings(const HeatMapSettings& settings, bool force)
m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSink(this, settings.m_streamIndex);
m_deviceAPI->addChannelSinkAPI(this);
m_settings.m_streamIndex = settings.m_streamIndex; // make sure ChannelAPI::getStreamIndex() is consistent
emit streamIndexChanged(settings.m_streamIndex);
}

reverseAPIKeys.append("streamIndex");
Expand Down
Loading

0 comments on commit 86a1d15

Please sign in to comment.