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

ATV Demod: correction for AM sync (F4HKW)

This commit is contained in:
f4exb 2017-03-06 03:36:02 +01:00
parent 2318419716
commit 62ab9b2f29
2 changed files with 20 additions and 14 deletions

View File

@ -50,7 +50,7 @@ ATVDemod::ATVDemod() :
m_fltAmpLineAverage(0.0f), m_fltAmpLineAverage(0.0f),
m_intNumberSamplePerTop(0) m_intNumberSamplePerTop(0)
{ {
setObjectName("ATVDemod"); setObjectName("ATVDemod");
//*************** ATV PARAMETERS *************** //*************** ATV PARAMETERS ***************
m_intNumberSamplePerLine=0; m_intNumberSamplePerLine=0;
@ -226,6 +226,7 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
ptrBuffer ++; ptrBuffer ++;
fltQ= ((qint32) (*ptrBuffer)) << 4; fltQ= ((qint32) (*ptrBuffer)) << 4;
ptrBuffer ++; ptrBuffer ++;
#else #else
for (SampleVector::const_iterator it = begin; it != end; ++it /* ++it **/) for (SampleVector::const_iterator it = begin; it != end; ++it /* ++it **/)
@ -485,6 +486,10 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
{ {
m_fltAmpDelta=1.0f; m_fltAmpDelta=1.0f;
} }
//Reset extrema
m_fltEffMin=2000000.0f;
m_fltEffMax=-2000000.0f;
} }
} }
else else
@ -525,10 +530,10 @@ void ATVDemod::stop()
bool ATVDemod::handleMessage(const Message& cmd) bool ATVDemod::handleMessage(const Message& cmd)
{ {
qDebug() << "ATVDemod::handleMessage"; qDebug() << "ATVDemod::handleMessage";
if (DownChannelizer::MsgChannelizerNotification::match(cmd)) if (DownChannelizer::MsgChannelizerNotification::match(cmd))
{ {
DownChannelizer::MsgChannelizerNotification& objNotif = (DownChannelizer::MsgChannelizerNotification&) cmd; DownChannelizer::MsgChannelizerNotification& objNotif = (DownChannelizer::MsgChannelizerNotification&) cmd;
if(m_objRunning.m_intMsps!=objNotif.getSampleRate()) if(m_objRunning.m_intMsps!=objNotif.getSampleRate())
@ -540,10 +545,10 @@ bool ATVDemod::handleMessage(const Message& cmd)
qDebug() << "ATVDemod::handleMessage: MsgChannelizerNotification:" qDebug() << "ATVDemod::handleMessage: MsgChannelizerNotification:"
<< " m_intMsps: " << m_objRunning.m_intMsps; << " m_intMsps: " << m_objRunning.m_intMsps;
return true; return true;
} }
else if (MsgConfigureATVDemod::match(cmd)) else if (MsgConfigureATVDemod::match(cmd))
{ {
MsgConfigureATVDemod& objCfg = (MsgConfigureATVDemod&) cmd; MsgConfigureATVDemod& objCfg = (MsgConfigureATVDemod&) cmd;
if((objCfg.m_objMsgConfig.m_enmModulation != m_objRunning.m_enmModulation) if((objCfg.m_objMsgConfig.m_enmModulation != m_objRunning.m_enmModulation)
@ -569,12 +574,12 @@ bool ATVDemod::handleMessage(const Message& cmd)
ApplySettings(); ApplySettings();
} }
return true; return true;
} }
else else
{ {
return false; return false;
} }
} }
void ATVDemod::ApplySettings() void ATVDemod::ApplySettings()
@ -593,3 +598,4 @@ int ATVDemod::GetSampleRate()
{ {
return m_objRunning.m_intMsps; return m_objRunning.m_intMsps;
} }

View File

@ -26,7 +26,7 @@
const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor = const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
{ {
QString("ATV Demodulator"), QString("ATV Demodulator"),
QString("3.2.0"), QString("3.3.0"),
QString("(c) F4HKW for F4EXB / SDRAngel"), QString("(c) F4HKW for F4EXB / SDRAngel"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,