1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

ATV demod: ATVDemod cosmetic reformatting

This commit is contained in:
f4exb 2017-02-25 07:12:41 +01:00
parent 848a4007c1
commit cff5fc9924
2 changed files with 70 additions and 30 deletions

View File

@ -47,7 +47,8 @@ ATVDemod::ATVDemod() :
m_fltAmpMin(-2000000000.0f), m_fltAmpMin(-2000000000.0f),
m_fltAmpMax(2000000000.0f), m_fltAmpMax(2000000000.0f),
m_fltAmpDelta(1.0), m_fltAmpDelta(1.0),
m_fltAmpLineAverage(0.0f) m_fltAmpLineAverage(0.0f),
m_intNumberSamplePerTop(0)
{ {
setObjectName("ATVDemod"); setObjectName("ATVDemod");
@ -93,7 +94,6 @@ void ATVDemod::InitATVParameters(int intMsps, int intLineDurationUs, int intTopD
m_objSettingsMutex.lock(); m_objSettingsMutex.lock();
if(m_objRegisteredATVScreen==NULL) if(m_objRegisteredATVScreen==NULL)
{ {
m_intNumberSamplePerLine=0; m_intNumberSamplePerLine=0;
@ -139,7 +139,6 @@ void ATVDemod::InitATVParameters(int intMsps, int intLineDurationUs, int intTopD
m_objRegisteredATVScreen->resizeATVScreen(m_intNumberSamplePerLine,m_intNumberOfLines); m_objRegisteredATVScreen->resizeATVScreen(m_intNumberSamplePerLine,m_intNumberOfLines);
} }
//Mise à jour de la config //Mise à jour de la config
m_objRunning.m_enmModulation = m_enmModulation; m_objRunning.m_enmModulation = m_enmModulation;
m_objRunning.m_fltVoltLevelSynchroBlack = m_fltLevelSynchroBlack; m_objRunning.m_fltVoltLevelSynchroBlack = m_fltLevelSynchroBlack;
@ -167,7 +166,6 @@ void ATVDemod::InitATVParameters(int intMsps, int intLineDurationUs, int intTopD
m_objSettingsMutex.unlock(); m_objSettingsMutex.unlock();
m_blnInitialized=true; 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)

View File

@ -50,16 +50,16 @@ struct ATVConfig
bool m_blnVSync; bool m_blnVSync;
ATVConfig() : ATVConfig() :
m_intMsps(0), m_intMsps(0),
m_intLineDurationUs(0), m_intLineDurationUs(0),
m_intTopDurationUs(0), m_intTopDurationUs(0),
m_intFramePerS(0), m_intFramePerS(0),
m_intPercentOfRowsToDisplay(0), m_intPercentOfRowsToDisplay(0),
m_fltVoltLevelSynchroTop(0), m_fltVoltLevelSynchroTop(0),
m_fltVoltLevelSynchroBlack(0), m_fltVoltLevelSynchroBlack(0),
m_enmModulation(ATV_FM1), m_enmModulation(ATV_FM1),
m_blnHSync(false), m_blnHSync(false),
m_blnVSync(false) m_blnVSync(false)
{ {
} }
}; };
@ -73,7 +73,16 @@ public:
ATVDemod(); ATVDemod();
~ATVDemod(); ~ATVDemod();
void configure(MessageQueue* objMessageQueue, int intLineDurationUs, int intTopDurationUs, int intFramePerS, int intPercentOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, ATVModulation enmModulation, bool blnHSync, bool blnVSync); void configure(MessageQueue* objMessageQueue,
int intLineDurationUs,
int intTopDurationUs,
int intFramePerS,
int intPercentOfRowsToDisplay,
float fltVoltLevelSynchroTop,
float fltVoltLevelSynchroBlack,
ATVModulation enmModulation,
bool blnHSync,
bool blnVSync);
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
virtual void start(); virtual void start();
@ -81,7 +90,16 @@ public:
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
bool SetATVScreen(ATVScreen *objScreen); bool SetATVScreen(ATVScreen *objScreen);
void InitATVParameters(int intMsps, int intLineDurationUs, int intTopDurationUs, int intFramePerS, int intPercentOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, ATVModulation enmModulation, bool blnHSync, bool blnVSync); void InitATVParameters(int intMsps,
int intLineDurationUs,
int intTopDurationUs,
int intFramePerS,
int intPercentOfRowsToDisplay,
float fltVoltLevelSynchroTop,
float fltVoltLevelSynchroBlack,
ATVModulation enmModulation,
bool blnHSync,
bool blnVSync);
int GetSampleRate(); int GetSampleRate();
private: private:
@ -134,15 +152,39 @@ private:
MESSAGE_CLASS_DECLARATION MESSAGE_CLASS_DECLARATION
public: public:
static MsgConfigureATVDemod* create(int intLineDurationUs, int intTopDurationUs, int intFramePerS, int intPercentOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, ATVModulation enmModulation, bool blnHSync, bool blnVSync) static MsgConfigureATVDemod* create(int intLineDurationUs,
int intTopDurationUs,
int intFramePerS,
int intPercentOfRowsToDisplay,
float fltVoltLevelSynchroTop,
float fltVoltLevelSynchroBlack,
ATVModulation enmModulation,
bool blnHSync,
bool blnVSync)
{ {
return new MsgConfigureATVDemod(intLineDurationUs, intTopDurationUs, intFramePerS, intPercentOfRowsToDisplay, fltVoltLevelSynchroTop, fltVoltLevelSynchroBlack, enmModulation, blnHSync, blnVSync); return new MsgConfigureATVDemod(intLineDurationUs,
intTopDurationUs,
intFramePerS,
intPercentOfRowsToDisplay,
fltVoltLevelSynchroTop,
fltVoltLevelSynchroBlack,
enmModulation,
blnHSync,
blnVSync);
} }
ATVConfig m_objMsgConfig; ATVConfig m_objMsgConfig;
private: private:
MsgConfigureATVDemod(int intLineDurationUs, int intTopDurationUs, int intFramePerS, int intPercentOfRowsToDisplay, float fltVoltLevelSynchroTop, float fltVoltLevelSynchroBlack, ATVModulation enmModulation, bool blnHSync, bool blnVSync) : MsgConfigureATVDemod(int intLineDurationUs,
int intTopDurationUs,
int intFramePerS,
int intPercentOfRowsToDisplay,
float fltVoltLevelSynchroTop,
float fltVoltLevelSynchroBlack,
ATVModulation enmModulation,
bool blnHSync,
bool blnVSync) :
Message() Message()
{ {
m_objMsgConfig.m_enmModulation = enmModulation; m_objMsgConfig.m_enmModulation = enmModulation;