mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-09 01:02:26 -04:00
ATV Demod: refactoring: moved enum and structure inside class
This commit is contained in:
parent
72943911d9
commit
5b4290c3e6
@ -34,42 +34,46 @@
|
|||||||
#include "atvscreen.h"
|
#include "atvscreen.h"
|
||||||
|
|
||||||
|
|
||||||
enum ATVModulation { ATV_AM, ATV_FM1 , ATV_FM2 };
|
|
||||||
|
|
||||||
struct ATVConfig
|
|
||||||
{
|
|
||||||
int m_intMsps;
|
|
||||||
int m_intLineDurationUs;
|
|
||||||
int m_intTopDurationUs;
|
|
||||||
int m_intFramePerS;
|
|
||||||
int m_intPercentOfRowsToDisplay;
|
|
||||||
float m_fltVoltLevelSynchroTop;
|
|
||||||
float m_fltVoltLevelSynchroBlack;
|
|
||||||
ATVModulation m_enmModulation;
|
|
||||||
bool m_blnHSync;
|
|
||||||
bool m_blnVSync;
|
|
||||||
|
|
||||||
ATVConfig() :
|
|
||||||
m_intMsps(0),
|
|
||||||
m_intLineDurationUs(0),
|
|
||||||
m_intTopDurationUs(0),
|
|
||||||
m_intFramePerS(0),
|
|
||||||
m_intPercentOfRowsToDisplay(0),
|
|
||||||
m_fltVoltLevelSynchroTop(0),
|
|
||||||
m_fltVoltLevelSynchroBlack(0),
|
|
||||||
m_enmModulation(ATV_FM1),
|
|
||||||
m_blnHSync(false),
|
|
||||||
m_blnVSync(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class ATVDemod : public BasebandSampleSink
|
class ATVDemod : public BasebandSampleSink
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
enum ATVModulation {
|
||||||
|
ATV_AM,
|
||||||
|
ATV_FM1,
|
||||||
|
ATV_FM2
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ATVConfig
|
||||||
|
{
|
||||||
|
int m_intMsps;
|
||||||
|
int m_intLineDurationUs;
|
||||||
|
int m_intTopDurationUs;
|
||||||
|
int m_intFramePerS;
|
||||||
|
int m_intPercentOfRowsToDisplay;
|
||||||
|
float m_fltVoltLevelSynchroTop;
|
||||||
|
float m_fltVoltLevelSynchroBlack;
|
||||||
|
ATVModulation m_enmModulation;
|
||||||
|
bool m_blnHSync;
|
||||||
|
bool m_blnVSync;
|
||||||
|
|
||||||
|
ATVConfig() :
|
||||||
|
m_intMsps(0),
|
||||||
|
m_intLineDurationUs(0),
|
||||||
|
m_intTopDurationUs(0),
|
||||||
|
m_intFramePerS(0),
|
||||||
|
m_intPercentOfRowsToDisplay(0),
|
||||||
|
m_fltVoltLevelSynchroTop(0),
|
||||||
|
m_fltVoltLevelSynchroBlack(0),
|
||||||
|
m_enmModulation(ATV_FM1),
|
||||||
|
m_blnHSync(false),
|
||||||
|
m_blnVSync(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
ATVDemod();
|
ATVDemod();
|
||||||
~ATVDemod();
|
~ATVDemod();
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ void ATVDemodGUI::blockApplySettings(bool blnBlock)
|
|||||||
|
|
||||||
void ATVDemodGUI::applySettings()
|
void ATVDemodGUI::applySettings()
|
||||||
{
|
{
|
||||||
ATVModulation enmSelectedModulation;
|
ATVDemod::ATVModulation enmSelectedModulation;
|
||||||
|
|
||||||
if (m_blnDoApplySettings)
|
if (m_blnDoApplySettings)
|
||||||
{
|
{
|
||||||
@ -281,19 +281,19 @@ void ATVDemodGUI::applySettings()
|
|||||||
switch (ui->modulation->currentIndex())
|
switch (ui->modulation->currentIndex())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
enmSelectedModulation = ATV_FM1;
|
enmSelectedModulation = ATVDemod::ATV_FM1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
enmSelectedModulation = ATV_FM2;
|
enmSelectedModulation = ATVDemod::ATV_FM2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
enmSelectedModulation = ATV_AM;
|
enmSelectedModulation = ATVDemod::ATV_AM;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
enmSelectedModulation = ATV_FM1;
|
enmSelectedModulation = ATVDemod::ATV_FM1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user