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

Rename SDRDaemonSource device plugin to RemoteInput (2): REST API

This commit is contained in:
f4exb
2019-02-03 00:49:57 +01:00
parent 4fe16095d4
commit 60ca383a6e
18 changed files with 375 additions and 360 deletions
+17 -2
View File
@@ -2105,6 +2105,21 @@ bool WebAPIRequestMapper::validateDeviceSettings(
return false;
}
}
else if ((*deviceHwType == "RemoteInput") && (deviceSettings.getTx() == 0))
{
if (jsonObject.contains("remoteInputSettings") && jsonObject["remoteInputSettings"].isObject())
{
QJsonObject remoteInputSettingsJsonObject = jsonObject["remoteInputSettings"].toObject();
deviceSettingsKeys = remoteInputSettingsJsonObject.keys();
deviceSettings.setRemoteInputSettings(new SWGSDRangel::SWGRemoteInputSettings());
deviceSettings.getRemoteInputSettings()->fromJsonObject(remoteInputSettingsJsonObject);
return true;
}
else
{
return false;
}
}
else if ((*deviceHwType == "RemoteOutput") && (deviceSettings.getTx() != 0))
{
if (jsonObject.contains("remoteOutputSettings") && jsonObject["remoteOutputSettings"].isObject())
@@ -2489,7 +2504,7 @@ void WebAPIRequestMapper::resetDeviceSettings(SWGSDRangel::SWGDeviceSettings& de
deviceSettings.setPlutoSdrOutputSettings(0);
deviceSettings.setRtlSdrSettings(0);
deviceSettings.setRemoteOutputSettings(0);
deviceSettings.setSdrDaemonSourceSettings(0);
deviceSettings.setRemoteInputSettings(0);
deviceSettings.setSdrPlaySettings(0);
deviceSettings.setTestSourceSettings(0);
}
@@ -2508,7 +2523,7 @@ void WebAPIRequestMapper::resetDeviceReport(SWGSDRangel::SWGDeviceReport& device
deviceReport.setPlutoSdrOutputReport(0);
deviceReport.setRtlSdrReport(0);
deviceReport.setRemoteOutputReport(0);
deviceReport.setSdrDaemonSourceReport(0);
deviceReport.setRemoteInputReport(0);
deviceReport.setSdrPlayReport(0);
}