1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 07:24:44 -04:00

REST API: config: GET (7): debug phase 1

This commit is contained in:
f4exb
2019-08-02 01:58:59 +02:00
parent a4007b762e
commit c7d05aeaff
8 changed files with 98 additions and 46 deletions
+2 -17
View File
@@ -27,6 +27,7 @@
#include "plugin/plugininstancegui.h"
#include "plugin/pluginapi.h"
#include "plugin/plugininterface.h"
#include "channel/channelutils.h"
#include "settings/preset.h"
#include "deviceuiset.h"
@@ -194,7 +195,7 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA
for(int i = 0; i < channelRegistrations->count(); i++)
{
//if((*channelRegistrations)[i].m_channelIdURI == channelConfig.m_channelIdURI)
if (compareRxChannelURIs((*channelRegistrations)[i].m_channelIdURI, channelConfig.m_channelIdURI))
if (ChannelUtils::compareRxChannelURIs((*channelRegistrations)[i].m_channelIdURI, channelConfig.m_channelIdURI))
{
qDebug("DeviceUISet::loadRxChannelSettings: creating new channel [%s] from config [%s]",
qPrintable((*channelRegistrations)[i].m_channelIdURI),
@@ -354,19 +355,3 @@ bool DeviceUISet::ChannelInstanceRegistration::operator<(const ChannelInstanceRe
}
}
bool DeviceUISet::compareRxChannelURIs(const QString& registerdChannelURI, const QString& xChannelURI)
{
if ((xChannelURI == "sdrangel.channel.chanalyzerng") || (xChannelURI == "sdrangel.channel.chanalyzer")) { // renamed ChanalyzerNG to Chanalyzer in 4.0.0
return registerdChannelURI == "sdrangel.channel.chanalyzer";
} else if ((xChannelURI == "de.maintech.sdrangelove.channel.am") || (xChannelURI == "sdrangel.channel.amdemod")) {
return registerdChannelURI == "sdrangel.channel.amdemod";
} else if ((xChannelURI == "de.maintech.sdrangelove.channel.nfm") || (xChannelURI == "sdrangel.channel.nfmdemod")) {
return registerdChannelURI == "sdrangel.channel.nfmdemod";
} else if ((xChannelURI == "de.maintech.sdrangelove.channel.ssb") || (xChannelURI == "sdrangel.channel.ssbdemod")) {
return registerdChannelURI == "sdrangel.channel.ssbdemod";
} else if ((xChannelURI == "de.maintech.sdrangelove.channel.wfm") || (xChannelURI == "sdrangel.channel.wfmdemod")) {
return registerdChannelURI == "sdrangel.channel.wfmdemod";
} else {
return registerdChannelURI == xChannelURI;
}
}