1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-18 06:11:46 -05:00

ATV Demod: rempved m_blnInitialized

This commit is contained in:
f4exb 2017-03-16 22:10:40 +01:00
parent 7e8d9889cd
commit 50da60af8e
2 changed files with 6 additions and 31 deletions

View File

@ -56,7 +56,6 @@ ATVDemod::ATVDemod() :
m_intNumberSamplePerLine=0; m_intNumberSamplePerLine=0;
m_intSynchroPoints=0; m_intSynchroPoints=0;
m_intNumberOfLines=0; m_intNumberOfLines=0;
m_blnInitialized=false;
m_intNumberOfRowsToDisplay=0; m_intNumberOfRowsToDisplay=0;
m_objMagSqAverage.resize(16, 1.0); m_objMagSqAverage.resize(16, 1.0);
@ -102,25 +101,8 @@ void ATVDemod::InitATVParameters(
int intNumberOfLines; int intNumberOfLines;
bool blnNewOpenGLScreen=false; bool blnNewOpenGLScreen=false;
m_blnInitialized=false;
m_objSettingsMutex.lock(); m_objSettingsMutex.lock();
if(m_objRegisteredATVScreen==NULL)
{
m_intNumberSamplePerLine=0;
m_intNumberSamplePerTop=0;
m_intNumberOfLines=0;
m_fltVoltLevelSynchroTop=0.0;
m_fltVoltLevelSynchroBlack=1.0;
m_blnInitialized=false;
m_objSettingsMutex.unlock();
return;
}
m_fltVoltLevelSynchroTop = fltVoltLevelSynchroTop; m_fltVoltLevelSynchroTop = fltVoltLevelSynchroTop;
m_fltVoltLevelSynchroBlack = fltVoltLevelSynchroBlack; m_fltVoltLevelSynchroBlack = fltVoltLevelSynchroBlack;
@ -163,6 +145,8 @@ void ATVDemod::InitATVParameters(
m_objRunning.m_blnHSync = blnHSync; m_objRunning.m_blnHSync = blnHSync;
m_objRunning.m_blnVSync = blnVSync; m_objRunning.m_blnVSync = blnVSync;
m_objSettingsMutex.unlock();
qDebug() << "ATVDemod::InitATVParameters:" qDebug() << "ATVDemod::InitATVParameters:"
<< " - Msps: " << intMsps << " - Msps: " << intMsps
<< " - Line us: " << intLineDurationUs << " - Line us: " << intLineDurationUs
@ -174,10 +158,6 @@ void ATVDemod::InitATVParameters(
<< " - Lines per Frame: " << m_intNumberOfLines << " - Lines per Frame: " << m_intNumberOfLines
<< " - Rows to Display: " << m_intNumberOfRowsToDisplay << " - Rows to Display: " << m_intNumberOfRowsToDisplay
<< " - Modulation: " << ((m_enmModulation==ATV_AM)?"AM" : "FM"); << " - Modulation: " << ((m_enmModulation==ATV_AM)?"AM" : "FM");
m_objSettingsMutex.unlock();
m_blnInitialized=true;
} }
void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst) void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst)
@ -349,18 +329,14 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
//********** Filling pixels ********** //********** Filling pixels **********
blnComputeImage=m_blnInitialized; blnComputeImage=(m_objRunning.m_intPercentOfRowsToDisplay!=50);
if(m_blnInitialized==true) if (!blnComputeImage)
{ {
blnComputeImage=(m_objRunning.m_intPercentOfRowsToDisplay!=50); blnComputeImage=((m_intImageIndex/2)%2==0);
if(!blnComputeImage)
{
blnComputeImage=((m_intImageIndex/2)%2==0);
}
} }
if(blnComputeImage) if (blnComputeImage)
{ {
m_objRegisteredATVScreen->setDataColor(m_intColIndex,intVal, intVal, intVal); m_objRegisteredATVScreen->setDataColor(m_intColIndex,intVal, intVal, intVal);
} }

View File

@ -115,7 +115,6 @@ private:
int m_intNumberSamplePerLine; int m_intNumberSamplePerLine;
int m_intNumberSamplePerTop; int m_intNumberSamplePerTop;
int m_intNumberOfLines; int m_intNumberOfLines;
bool m_blnInitialized;
int m_intNumberOfRowsToDisplay; int m_intNumberOfRowsToDisplay;
float m_fltVoltLevelSynchroTop; float m_fltVoltLevelSynchroTop;