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

Web API: AM demod: added pll and syncAMOperation settings processing

This commit is contained in:
f4exb
2018-08-02 23:27:22 +02:00
parent eef1ce9a64
commit 8dd65e70f2
8 changed files with 99 additions and 2 deletions
+14
View File
@@ -549,6 +549,17 @@ int AMDemod::webapiSettingsPutPatch(
settings.m_audioDeviceName = *response.getAmDemodSettings()->getAudioDeviceName();
}
if (channelSettingsKeys.contains("pll")) {
settings.m_pll = response.getAmDemodSettings()->getPll();
}
if (channelSettingsKeys.contains("syncAMOperation")) {
qint32 syncAMOperationCode = response.getAmDemodSettings()->getSyncAmOperation();
settings.m_syncAMOperation = syncAMOperationCode < 0 ?
AMDemodSettings::SyncAMDSB : syncAMOperationCode > 2 ?
AMDemodSettings::SyncAMDSB : (AMDemodSettings::SyncAMOperation) syncAMOperationCode;
}
if (frequencyOffsetChanged)
{
MsgConfigureChannelizer* channelConfigMsg = MsgConfigureChannelizer::create(
@@ -602,6 +613,9 @@ void AMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respo
} else {
response.getAmDemodSettings()->setAudioDeviceName(new QString(settings.m_audioDeviceName));
}
response.getAmDemodSettings()->setPll(settings.m_pll ? 1 : 0);
response.getAmDemodSettings()->setSyncAmOperation((int) m_settings.m_syncAMOperation);
}
void AMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)