1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

ATV demod: REST API: new AM scaling adjust settings: implementation

This commit is contained in:
f4exb 2020-07-01 13:33:16 +02:00
parent c2c3829b21
commit 8d5dfde3eb

View File

@ -65,6 +65,8 @@ void ATVDemodWebAPIAdapter::webapiFormatChannelSettings(
response.getAtvDemodSettings()->setFltVoltLevelSynchroBlack(settings.m_levelBlack);
response.getAtvDemodSettings()->setFltVoltLevelSynchroTop(settings.m_levelSynchroTop);
response.getAtvDemodSettings()->setFmDeviation(settings.m_fmDeviation);
response.getAtvDemodSettings()->setAmScalingFactor(settings.m_amScalingFactor);
response.getAtvDemodSettings()->setAmOffsetFactor(settings.m_amOffsetFactor);
response.getAtvDemodSettings()->setFpsIndex(ATVDemodSettings::getFpsIndex(settings.m_fps));
response.getAtvDemodSettings()->setHalfImage(settings.m_halfFrames ? 1 : 0);
response.getAtvDemodSettings()->setIntFrequencyOffset(settings.m_inputFrequencyOffset);
@ -125,6 +127,12 @@ void ATVDemodWebAPIAdapter::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("fmDeviation")) {
settings.m_fmDeviation = response.getAtvDemodSettings()->getFmDeviation();
}
if (channelSettingsKeys.contains("amOffsetFactor")) {
settings.m_amOffsetFactor = response.getAtvDemodSettings()->getAmOffsetFactor();
}
if (channelSettingsKeys.contains("amScalingFactor")) {
settings.m_amScalingFactor = response.getAtvDemodSettings()->getAmScalingFactor();
}
if (channelSettingsKeys.contains("halfImage")) {
settings.m_halfFrames = response.getAtvDemodSettings()->getHalfImage() != 0;
}