1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-28 07:46:37 -04:00

NFM demod: added REST API support for high pass filter setting

This commit is contained in:
f4exb 2019-05-18 03:41:28 +02:00
parent 2c3bbea5bc
commit 1777eab1e3
2 changed files with 9 additions and 0 deletions

View File

@ -681,6 +681,9 @@ int NFMDemod::webapiSettingsPutPatch(
if (channelSettingsKeys.contains("audioMute")) {
settings.m_audioMute = response.getNfmDemodSettings()->getAudioMute() != 0;
}
if (channelSettingsKeys.contains("highPass")) {
settings.m_highPass = response.getNfmDemodSettings()->getHighPass() != 0;
}
if (channelSettingsKeys.contains("ctcssIndex")) {
settings.m_ctcssIndex = response.getNfmDemodSettings()->getCtcssIndex();
}
@ -771,6 +774,7 @@ void NFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
{
response.getNfmDemodSettings()->setAfBandwidth(settings.m_afBandwidth);
response.getNfmDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
response.getNfmDemodSettings()->setHighPass(settings.m_highPass ? 1 : 0);
response.getNfmDemodSettings()->setCtcssIndex(settings.m_ctcssIndex);
response.getNfmDemodSettings()->setCtcssOn(settings.m_ctcssOn ? 1 : 0);
response.getNfmDemodSettings()->setDeltaSquelch(settings.m_deltaSquelch ? 1 : 0);
@ -838,6 +842,9 @@ void NFMDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, co
if (channelSettingsKeys.contains("audioMute") || force) {
swgNFMDemodSettings->setAudioMute(settings.m_audioMute ? 1 : 0);
}
if (channelSettingsKeys.contains("highPass") || force) {
swgNFMDemodSettings->setAudioMute(settings.m_highPass ? 1 : 0);
}
if (channelSettingsKeys.contains("ctcssIndex") || force) {
swgNFMDemodSettings->setCtcssIndex(settings.m_ctcssIndex);
}

View File

@ -29,6 +29,8 @@ NFMDemodSettings:
format: float
ctcssOn:
type: integer
highPass:
type: integer
audioMute:
type: integer
ctcssIndex: