1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

LoRa modulator: REST API (1)

This commit is contained in:
f4exb
2020-02-22 18:37:09 +01:00
parent 738f671255
commit 9aaa4756a2
17 changed files with 1568 additions and 57 deletions
+9
View File
@@ -72,6 +72,7 @@ const QMap<QString, QString> WebAPIRequestMapper::m_channelURIToSettingsKey = {
{"sdrangel.demod.localsink", "LocalSinkSettings"},
{"sdrangel.channel.localsink", "LocalSinkSettings"}, // remap
{"sdrangel.channel.localsource", "LocalSourceSettings"},
{"sdrangel.channel.modlora", "LoRaModSettings"},
{"sdrangel.demod.remotesink", "RemoteSinkSettings"},
{"sdrangel.channeltx.remotesource", "RemoteSourceSettings"},
{"sdrangel.channeltx.modssb", "SSBModSettings"},
@@ -146,6 +147,8 @@ const QMap<QString, QString> WebAPIRequestMapper::m_channelTypeToSettingsKey = {
{"NFMMod", "NFMModSettings"},
{"LocalSink", "LocalSinkSettings"},
{"LocalSource", "LocalSourceSettings"},
{"LoRaDemod", "LoRaDemodSettings"},
{"LoRaMod", "LoRaModSettings"},
{"RemoteSink", "RemoteSinkSettings"},
{"RemoteSource", "RemoteSourceSettings"},
{"SSBMod", "SSBModSettings"},
@@ -2911,6 +2914,12 @@ bool WebAPIRequestMapper::getChannel(
channelSettings->setLocalSourceSettings(new SWGSDRangel::SWGLocalSourceSettings());
channelSettings->getLocalSourceSettings()->fromJsonObject(settingsJsonObject);
}
else if (channelSettingsKey == "LoRaModSettings")
{
channelSettings->setLoRaModSettings(new SWGSDRangel::SWGLoRaModSettings());
channelSettings->getLoRaModSettings()->init(); // contains a list of strings
channelSettings->getLoRaModSettings()->fromJsonObject(settingsJsonObject);
}
else if (channelSettingsKey == "RemoteSinkSettings")
{
channelSettings->setRemoteSinkSettings(new SWGSDRangel::SWGRemoteSinkSettings());