ATV Demod: RF configuration message

pull/27/head
f4exb 2017-03-17 09:39:20 +01:00
rodzic e061b5eb2c
commit 822610074d
2 zmienionych plików z 68 dodań i 2 usunięć

Wyświetl plik

@ -26,6 +26,7 @@
#include "dsp/pidcontroller.h"
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureATVDemod, Message)
MESSAGE_CLASS_DEFINITION(ATVDemod::MsgConfigureRFATVDemod, Message)
const float ATVDemod::m_fltSecondToUs = 1000000.0f;
@ -98,6 +99,19 @@ void ATVDemod::configure(
objMessageQueue->push(msgCmd);
}
void ATVDemod::configureRF(
MessageQueue* objMessageQueue,
ATVModulation enmModulation,
float fltRFBandwidth,
float fltRFOppBandwidth)
{
Message* msgCmd = MsgConfigureRFATVDemod::create(
enmModulation,
fltRFBandwidth,
fltRFOppBandwidth);
objMessageQueue->push(msgCmd);
}
void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst)
{
float fltDivSynchroBlack = 1.0f - m_objRunning.m_fltVoltLevelSynchroBlack;

Wyświetl plik

@ -76,6 +76,20 @@ public:
}
};
struct ATVRFConfig
{
ATVModulation m_enmModulation;
float m_fltRFBandwidth;
float m_fltRFOppBandwidth;
ATVRFConfig() :
m_enmModulation(ATV_FM1),
m_fltRFBandwidth(0),
m_fltRFOppBandwidth(0)
{
}
};
ATVDemod();
~ATVDemod();
@ -90,6 +104,11 @@ public:
bool blnHSync,
bool blnVSync);
void configureRF(MessageQueue* objMessageQueue,
ATVModulation enmModulation,
float fltRFBandwidth,
float fltRFOppBandwidth);
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
virtual void start();
virtual void stop();
@ -106,7 +125,8 @@ private:
MESSAGE_CLASS_DECLARATION
public:
static MsgConfigureATVDemod* create(float fltLineDurationUs,
static MsgConfigureATVDemod* create(
float fltLineDurationUs,
float fltTopDurationUs,
float fltFramePerS,
float fltRatioOfRowsToDisplay,
@ -116,7 +136,8 @@ private:
bool blnHSync,
bool blnVSync)
{
return new MsgConfigureATVDemod(fltLineDurationUs,
return new MsgConfigureATVDemod(
fltLineDurationUs,
fltTopDurationUs,
fltFramePerS,
fltRatioOfRowsToDisplay,
@ -154,6 +175,37 @@ private:
}
};
class MsgConfigureRFATVDemod : public Message
{
MESSAGE_CLASS_DECLARATION
public:
static MsgConfigureRFATVDemod* create(
ATVModulation enmModulation,
float fltRFBandwidth,
float fltRFOppBandwidth)
{
return new MsgConfigureRFATVDemod(
enmModulation,
fltRFBandwidth,
fltRFOppBandwidth);
}
ATVRFConfig m_objMsgConfig;
private:
MsgConfigureRFATVDemod(
ATVModulation enmModulation,
float fltRFBandwidth,
float fltRFOppBandwidth) :
Message()
{
m_objMsgConfig.m_enmModulation = enmModulation;
m_objMsgConfig.m_fltRFBandwidth = fltRFBandwidth;
m_objMsgConfig.m_fltRFOppBandwidth = fltRFOppBandwidth;
}
};
//*************** ATV PARAMETERS ***************
ATVScreen * m_objRegisteredATVScreen;