Browse Source

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

chirpmodem-v8.0.0
f4exb 7 years ago
parent
commit
8d5dfde3eb
  1. 8
      plugins/channelrx/demodatv/atvdemodwebapiadapter.cpp

8
plugins/channelrx/demodatv/atvdemodwebapiadapter.cpp

@ -65,6 +65,8 @@ void ATVDemodWebAPIAdapter::webapiFormatChannelSettings( @@ -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( @@ -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;
}

Loading…
Cancel
Save