ATV modulator: use settings (1)

This commit is contained in:
f4exb 2017-10-22 00:33:18 +02:00
parent dcb43d554c
commit 04c8729e44
6 changed files with 254 additions and 229 deletions

View File

@ -72,8 +72,8 @@ ATVMod::ATVMod() :
m_config.m_outputSampleRate = 1000000; m_config.m_outputSampleRate = 1000000;
m_config.m_inputFrequencyOffset = 0; m_config.m_inputFrequencyOffset = 0;
m_config.m_rfBandwidth = 1000000; m_config.m_rfBandwidth = 1000000;
m_config.m_atvModInput = ATVModInputHBars; m_config.m_atvModInput = ATVModSettings::ATVModInputHBars;
m_config.m_atvStd = ATVStdPAL625; m_config.m_atvStd = ATVModSettings::ATVStdPAL625;
m_config.m_nbLines = 625; m_config.m_nbLines = 625;
m_config.m_fps = 25; m_config.m_fps = 25;
@ -102,12 +102,12 @@ ATVMod::~ATVMod()
void ATVMod::configure(MessageQueue* messageQueue, void ATVMod::configure(MessageQueue* messageQueue,
Real rfBandwidth, Real rfBandwidth,
Real rfOppBandwidth, Real rfOppBandwidth,
ATVStd atvStd, ATVModSettings::ATVStd atvStd,
int nbLines, int nbLines,
int fps, int fps,
ATVModInput atvModInput, ATVModSettings::ATVModInput atvModInput,
Real uniformLevel, Real uniformLevel,
ATVModulation atvModulation, ATVModSettings::ATVModulation atvModulation,
bool videoPlayLoop, bool videoPlayLoop,
bool videoPlay, bool videoPlay,
bool cameraPlay, bool cameraPlay,
@ -208,24 +208,24 @@ void ATVMod::modulateSample()
switch (m_running.m_atvModulation) switch (m_running.m_atvModulation)
{ {
case ATVModulationFM: // FM half bandwidth deviation case ATVModSettings::ATVModulationFM: // FM half bandwidth deviation
m_modPhasor += (t - 0.5f) * m_running.m_fmExcursion * 2.0f * M_PI; m_modPhasor += (t - 0.5f) * m_running.m_fmExcursion * 2.0f * M_PI;
if (m_modPhasor > 2.0f * M_PI) m_modPhasor -= 2.0f * M_PI; // limit growth if (m_modPhasor > 2.0f * M_PI) m_modPhasor -= 2.0f * M_PI; // limit growth
if (m_modPhasor < 2.0f * M_PI) m_modPhasor += 2.0f * M_PI; // limit growth if (m_modPhasor < 2.0f * M_PI) m_modPhasor += 2.0f * M_PI; // limit growth
m_modSample.real(cos(m_modPhasor) * m_running.m_rfScalingFactor); // -1 dB m_modSample.real(cos(m_modPhasor) * m_running.m_rfScalingFactor); // -1 dB
m_modSample.imag(sin(m_modPhasor) * m_running.m_rfScalingFactor); m_modSample.imag(sin(m_modPhasor) * m_running.m_rfScalingFactor);
break; break;
case ATVModulationLSB: case ATVModSettings::ATVModulationLSB:
case ATVModulationUSB: case ATVModSettings::ATVModulationUSB:
m_modSample = modulateSSB(t); m_modSample = modulateSSB(t);
m_modSample *= m_running.m_rfScalingFactor; m_modSample *= m_running.m_rfScalingFactor;
break; break;
case ATVModulationVestigialLSB: case ATVModSettings::ATVModulationVestigialLSB:
case ATVModulationVestigialUSB: case ATVModSettings::ATVModulationVestigialUSB:
m_modSample = modulateVestigialSSB(t); m_modSample = modulateVestigialSSB(t);
m_modSample *= m_running.m_rfScalingFactor; m_modSample *= m_running.m_rfScalingFactor;
break; break;
case ATVModulationAM: // AM 90% case ATVModSettings::ATVModulationAM: // AM 90%
default: default:
m_modSample.real((t*1.8f + 0.1f) * (m_running.m_rfScalingFactor/2.0f)); // modulate and scale zero frequency carrier m_modSample.real((t*1.8f + 0.1f) * (m_running.m_rfScalingFactor/2.0f)); // modulate and scale zero frequency carrier
m_modSample.imag(0.0f); m_modSample.imag(0.0f);
@ -238,7 +238,7 @@ Complex& ATVMod::modulateSSB(Real& sample)
Complex ci(sample, 0.0f); Complex ci(sample, 0.0f);
fftfilt::cmplx *filtered; fftfilt::cmplx *filtered;
n_out = m_SSBFilter->runSSB(ci, &filtered, m_running.m_atvModulation == ATVModulationUSB); n_out = m_SSBFilter->runSSB(ci, &filtered, m_running.m_atvModulation == ATVModSettings::ATVModulationUSB);
if (n_out > 0) if (n_out > 0)
{ {
@ -257,7 +257,7 @@ Complex& ATVMod::modulateVestigialSSB(Real& sample)
Complex ci(sample, 0.0f); Complex ci(sample, 0.0f);
fftfilt::cmplx *filtered; fftfilt::cmplx *filtered;
n_out = m_DSBFilter->runAsym(ci, &filtered, m_running.m_atvModulation == ATVModulationVestigialUSB); n_out = m_DSBFilter->runAsym(ci, &filtered, m_running.m_atvModulation == ATVModSettings::ATVModulationVestigialUSB);
if (n_out > 0) if (n_out > 0)
{ {
@ -272,7 +272,7 @@ Complex& ATVMod::modulateVestigialSSB(Real& sample)
void ATVMod::pullVideo(Real& sample) void ATVMod::pullVideo(Real& sample)
{ {
if ((m_running.m_atvStd == ATVStdHSkip) && (m_lineCount == m_nbLines2)) // last line in skip mode if ((m_running.m_atvStd == ATVModSettings::ATVStdHSkip) && (m_lineCount == m_nbLines2)) // last line in skip mode
{ {
pullImageLine(sample, true); // pull image line without sync pullImageLine(sample, true); // pull image line without sync
} }
@ -327,7 +327,7 @@ void ATVMod::pullVideo(Real& sample)
m_lineCount = 0; m_lineCount = 0;
m_evenImage = !m_evenImage; m_evenImage = !m_evenImage;
if ((m_running.m_atvModInput == ATVModInputVideo) && m_videoOK && (m_running.m_videoPlay) && !m_videoEOF) if ((m_running.m_atvModInput == ATVModSettings::ATVModInputVideo) && m_videoOK && (m_running.m_videoPlay) && !m_videoEOF)
{ {
int grabOK = 0; int grabOK = 0;
int fpsIncrement = (int) m_videoFPSCount - m_videoPrevFPSCount; int fpsIncrement = (int) m_videoFPSCount - m_videoPrevFPSCount;
@ -376,7 +376,7 @@ void ATVMod::pullVideo(Real& sample)
m_videoFPSCount = m_videoFPSq; m_videoFPSCount = m_videoFPSq;
} }
} }
else if ((m_running.m_atvModInput == ATVModInputCamera) && (m_running.m_cameraPlay)) else if ((m_running.m_atvModInput == ATVModSettings::ATVModInputCamera) && (m_running.m_cameraPlay))
{ {
ATVCamera& camera = m_cameras[m_cameraIndex]; // currently selected canera ATVCamera& camera = m_cameras[m_cameraIndex]; // currently selected canera
@ -806,18 +806,18 @@ void ATVMod::getBaseValues(int outputSampleRate, int linesPerSecond, int& sample
sampleRateUnits = nbPointsPerRateUnit * linesPerSecond; sampleRateUnits = nbPointsPerRateUnit * linesPerSecond;
} }
float ATVMod::getRFBandwidthDivisor(ATVModulation modulation) float ATVMod::getRFBandwidthDivisor(ATVModSettings::ATVModulation modulation)
{ {
switch(modulation) switch(modulation)
{ {
case ATVModulationLSB: case ATVModSettings::ATVModulationLSB:
case ATVModulationUSB: case ATVModSettings::ATVModulationUSB:
case ATVModulationVestigialLSB: case ATVModSettings::ATVModulationVestigialLSB:
case ATVModulationVestigialUSB: case ATVModSettings::ATVModulationVestigialUSB:
return 1.05f; return 1.05f;
break; break;
case ATVModulationAM: case ATVModSettings::ATVModulationAM:
case ATVModulationFM: case ATVModSettings::ATVModulationFM:
default: default:
return 2.2f; return 2.2f;
} }
@ -851,7 +851,7 @@ void ATVMod::applyStandard()
switch(m_config.m_atvStd) switch(m_config.m_atvStd)
{ {
case ATVStdHSkip: case ATVModSettings::ATVStdHSkip:
m_nbImageLines = m_nbLines; // lines less the total number of sync lines m_nbImageLines = m_nbLines; // lines less the total number of sync lines
m_nbImageLines2 = m_nbImageLines; // force non interleaved for vbars m_nbImageLines2 = m_nbImageLines; // force non interleaved for vbars
m_interleaved = false; m_interleaved = false;
@ -866,7 +866,7 @@ void ATVMod::applyStandard()
m_blankLineLvel = 0.7f; m_blankLineLvel = 0.7f;
m_nbLines2 = m_nbLines - 1; m_nbLines2 = m_nbLines - 1;
break; break;
case ATVStdShort: case ATVModSettings::ATVStdShort:
m_nbImageLines = m_nbLines - 2; // lines less the total number of sync lines m_nbImageLines = m_nbLines - 2; // lines less the total number of sync lines
m_nbImageLines2 = m_nbImageLines; // force non interleaved for vbars m_nbImageLines2 = m_nbImageLines; // force non interleaved for vbars
m_interleaved = false; m_interleaved = false;
@ -881,7 +881,7 @@ void ATVMod::applyStandard()
m_blankLineLvel = 0.7f; m_blankLineLvel = 0.7f;
m_nbLines2 = m_nbLines; // force non interleaved => treated as even for all lines m_nbLines2 = m_nbLines; // force non interleaved => treated as even for all lines
break; break;
case ATVStdShortInterleaved: case ATVModSettings::ATVStdShortInterleaved:
m_nbImageLines = m_nbLines - 2; // lines less the total number of sync lines m_nbImageLines = m_nbLines - 2; // lines less the total number of sync lines
m_nbImageLines2 = m_nbImageLines / 2; m_nbImageLines2 = m_nbImageLines / 2;
m_interleaved = true; m_interleaved = true;
@ -895,7 +895,7 @@ void ATVMod::applyStandard()
m_nbBlankLines = 1; m_nbBlankLines = 1;
m_blankLineLvel = 0.7f; m_blankLineLvel = 0.7f;
break; break;
case ATVStd405: // Follows loosely the 405 lines standard case ATVModSettings::ATVStd405: // Follows loosely the 405 lines standard
m_nbImageLines = m_nbLines - 15; // lines less the total number of sync lines m_nbImageLines = m_nbLines - 15; // lines less the total number of sync lines
m_nbImageLines2 = m_nbImageLines / 2; m_nbImageLines2 = m_nbImageLines / 2;
m_interleaved = true; m_interleaved = true;
@ -909,7 +909,7 @@ void ATVMod::applyStandard()
m_nbBlankLines = 7; // yields 376 lines (195 - 7) * 2 m_nbBlankLines = 7; // yields 376 lines (195 - 7) * 2
m_blankLineLvel = m_blackLevel; m_blankLineLvel = m_blackLevel;
break; break;
case ATVStdPAL525: // Follows PAL-M standard case ATVModSettings::ATVStdPAL525: // Follows PAL-M standard
m_nbImageLines = m_nbLines - 15; m_nbImageLines = m_nbLines - 15;
m_nbImageLines2 = m_nbImageLines / 2; m_nbImageLines2 = m_nbImageLines / 2;
m_interleaved = true; m_interleaved = true;
@ -923,7 +923,7 @@ void ATVMod::applyStandard()
m_nbBlankLines = 15; // yields 480 lines (255 - 15) * 2 m_nbBlankLines = 15; // yields 480 lines (255 - 15) * 2
m_blankLineLvel = m_blackLevel; m_blankLineLvel = m_blackLevel;
break; break;
case ATVStdPAL625: // Follows PAL-B/G/H standard case ATVModSettings::ATVStdPAL625: // Follows PAL-B/G/H standard
default: default:
m_nbImageLines = m_nbLines - 15; m_nbImageLines = m_nbLines - 15;
m_nbImageLines2 = m_nbImageLines / 2; m_nbImageLines2 = m_nbImageLines / 2;

View File

@ -34,43 +34,12 @@
#include "dsp/fftfilt.h" #include "dsp/fftfilt.h"
#include "util/message.h" #include "util/message.h"
#include "atvmodsettings.h"
class ATVMod : public BasebandSampleSource { class ATVMod : public BasebandSampleSource {
Q_OBJECT Q_OBJECT
public: public:
typedef enum
{
ATVStdPAL625,
ATVStdPAL525,
ATVStd405,
ATVStdShortInterleaved,
ATVStdShort,
ATVStdHSkip,
} ATVStd;
typedef enum
{
ATVModInputUniform,
ATVModInputHBars,
ATVModInputVBars,
ATVModInputChessboard,
ATVModInputHGradient,
ATVModInputVGradient,
ATVModInputImage,
ATVModInputVideo,
ATVModInputCamera
} ATVModInput;
typedef enum
{
ATVModulationAM,
ATVModulationFM,
ATVModulationUSB,
ATVModulationLSB,
ATVModulationVestigialUSB,
ATVModulationVestigialLSB
} ATVModulation;
class MsgConfigureImageFileName : public Message class MsgConfigureImageFileName : public Message
{ {
MESSAGE_CLASS_DECLARATION MESSAGE_CLASS_DECLARATION
@ -381,12 +350,12 @@ public:
void configure(MessageQueue* messageQueue, void configure(MessageQueue* messageQueue,
Real rfBandwidth, Real rfBandwidth,
Real rfOppBandwidth, Real rfOppBandwidth,
ATVStd atvStd, ATVModSettings::ATVStd atvStd,
int nbLines, int nbLines,
int fps, int fps,
ATVModInput atvModInput, ATVModSettings::ATVModInput atvModInput,
Real uniformLevel, Real uniformLevel,
ATVModulation atvModulation, ATVModSettings::ATVModulation atvModulation,
bool videoPlayLoop, bool videoPlayLoop,
bool videoPlay, bool videoPlay,
bool cameraPLay, bool cameraPLay,
@ -407,7 +376,7 @@ public:
void getCameraNumbers(std::vector<int>& numbers); void getCameraNumbers(std::vector<int>& numbers);
static void getBaseValues(int outputSampleRate, int linesPerSecond, int& sampleRateUnits, uint32_t& nbPointsPerRateUnit); static void getBaseValues(int outputSampleRate, int linesPerSecond, int& sampleRateUnits, uint32_t& nbPointsPerRateUnit);
static float getRFBandwidthDivisor(ATVModulation modulation); static float getRFBandwidthDivisor(ATVModSettings::ATVModulation modulation);
signals: signals:
/** /**
@ -426,12 +395,12 @@ private:
public: public:
Real getRFBandwidth() const { return m_rfBandwidth; } Real getRFBandwidth() const { return m_rfBandwidth; }
Real getRFOppBandwidth() const { return m_rfOppBandwidth; } Real getRFOppBandwidth() const { return m_rfOppBandwidth; }
ATVStd getATVStd() const { return m_atvStd; } ATVModSettings::ATVStd getATVStd() const { return m_atvStd; }
ATVModInput getATVModInput() const { return m_atvModInput; } ATVModSettings::ATVModInput getATVModInput() const { return m_atvModInput; }
int getNbLines() const { return m_nbLines; } int getNbLines() const { return m_nbLines; }
int getFPS() const { return m_fps; } int getFPS() const { return m_fps; }
Real getUniformLevel() const { return m_uniformLevel; } Real getUniformLevel() const { return m_uniformLevel; }
ATVModulation getModulation() const { return m_atvModulation; } ATVModSettings::ATVModulation getModulation() const { return m_atvModulation; }
bool getVideoPlayLoop() const { return m_videoPlayLoop; } bool getVideoPlayLoop() const { return m_videoPlayLoop; }
bool getVideoPlay() const { return m_videoPlay; } bool getVideoPlay() const { return m_videoPlay; }
bool getCameraPlay() const { return m_cameraPlay; } bool getCameraPlay() const { return m_cameraPlay; }
@ -444,12 +413,12 @@ private:
static MsgConfigureATVMod* create( static MsgConfigureATVMod* create(
Real rfBandwidth, Real rfBandwidth,
Real rfOppBandwidth, Real rfOppBandwidth,
ATVStd atvStd, ATVModSettings::ATVStd atvStd,
int nbLines, int nbLines,
int fps, int fps,
ATVModInput atvModInput, ATVModSettings::ATVModInput atvModInput,
Real uniformLevel, Real uniformLevel,
ATVModulation atvModulation, ATVModSettings::ATVModulation atvModulation,
bool videoPlayLoop, bool videoPlayLoop,
bool videoPlay, bool videoPlay,
bool cameraPlay, bool cameraPlay,
@ -481,12 +450,12 @@ private:
private: private:
Real m_rfBandwidth; Real m_rfBandwidth;
Real m_rfOppBandwidth; Real m_rfOppBandwidth;
ATVStd m_atvStd; ATVModSettings::ATVStd m_atvStd;
int m_nbLines; int m_nbLines;
int m_fps; int m_fps;
ATVModInput m_atvModInput; ATVModSettings::ATVModInput m_atvModInput;
Real m_uniformLevel; Real m_uniformLevel;
ATVModulation m_atvModulation; ATVModSettings::ATVModulation m_atvModulation;
bool m_videoPlayLoop; bool m_videoPlayLoop;
bool m_videoPlay; bool m_videoPlay;
bool m_cameraPlay; bool m_cameraPlay;
@ -499,12 +468,12 @@ private:
MsgConfigureATVMod( MsgConfigureATVMod(
Real rfBandwidth, Real rfBandwidth,
Real rfOppBandwidth, Real rfOppBandwidth,
ATVStd atvStd, ATVModSettings::ATVStd atvStd,
int nbLines, int nbLines,
int fps, int fps,
ATVModInput atvModInput, ATVModSettings::ATVModInput atvModInput,
Real uniformLevel, Real uniformLevel,
ATVModulation atvModulation, ATVModSettings::ATVModulation atvModulation,
bool videoPlayLoop, bool videoPlayLoop,
bool videoPlay, bool videoPlay,
bool cameraPlay, bool cameraPlay,
@ -573,12 +542,12 @@ private:
qint64 m_inputFrequencyOffset; //!< offset from baseband center frequency qint64 m_inputFrequencyOffset; //!< offset from baseband center frequency
Real m_rfBandwidth; //!< Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB Real m_rfBandwidth; //!< Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB
Real m_rfOppBandwidth; //!< Bandwidth of opposite sideband for vestigial SSB Real m_rfOppBandwidth; //!< Bandwidth of opposite sideband for vestigial SSB
ATVStd m_atvStd; //!< Standard ATVModSettings::ATVStd m_atvStd; //!< Standard
int m_nbLines; //!< Number of lines per full frame int m_nbLines; //!< Number of lines per full frame
int m_fps; //!< Number of frames per second int m_fps; //!< Number of frames per second
ATVModInput m_atvModInput; //!< Input source type ATVModSettings::ATVModInput m_atvModInput; //!< Input source type
Real m_uniformLevel; //!< Percentage between black and white for uniform screen display Real m_uniformLevel; //!< Percentage between black and white for uniform screen display
ATVModulation m_atvModulation; //!< RF modulation type ATVModSettings::ATVModulation m_atvModulation; //!< RF modulation type
bool m_videoPlayLoop; //!< Play video in a loop bool m_videoPlayLoop; //!< Play video in a loop
bool m_videoPlay; //!< True to play video and false to pause bool m_videoPlay; //!< True to play video and false to pause
bool m_cameraPlay; //!< True to play camera video and false to pause bool m_cameraPlay; //!< True to play camera video and false to pause
@ -593,12 +562,12 @@ private:
m_inputFrequencyOffset(0), m_inputFrequencyOffset(0),
m_rfBandwidth(0), m_rfBandwidth(0),
m_rfOppBandwidth(0), m_rfOppBandwidth(0),
m_atvStd(ATVStdPAL625), m_atvStd(ATVModSettings::ATVStdPAL625),
m_nbLines(625), m_nbLines(625),
m_fps(25), m_fps(25),
m_atvModInput(ATVModInputHBars), m_atvModInput(ATVModSettings::ATVModInputHBars),
m_uniformLevel(0.5f), m_uniformLevel(0.5f),
m_atvModulation(ATVModulationAM), m_atvModulation(ATVModSettings::ATVModulationAM),
m_videoPlayLoop(false), m_videoPlayLoop(false),
m_videoPlay(false), m_videoPlay(false),
m_cameraPlay(false), m_cameraPlay(false),
@ -741,22 +710,22 @@ private:
switch(m_running.m_atvModInput) switch(m_running.m_atvModInput)
{ {
case ATVModInputHBars: case ATVModSettings::ATVModInputHBars:
sample = (pointIndex / m_pointsPerHBar) * m_hBarIncrement + m_blackLevel; sample = (pointIndex / m_pointsPerHBar) * m_hBarIncrement + m_blackLevel;
break; break;
case ATVModInputVBars: case ATVModSettings::ATVModInputVBars:
sample = (iLine / m_linesPerVBar) * m_vBarIncrement + m_blackLevel; sample = (iLine / m_linesPerVBar) * m_vBarIncrement + m_blackLevel;
break; break;
case ATVModInputChessboard: case ATVModSettings::ATVModInputChessboard:
sample = (((iLine / m_linesPerVBar)*5 + (pointIndex / m_pointsPerHBar)) % 2) * m_spanLevel * m_running.m_uniformLevel + m_blackLevel; sample = (((iLine / m_linesPerVBar)*5 + (pointIndex / m_pointsPerHBar)) % 2) * m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
break; break;
case ATVModInputHGradient: case ATVModSettings::ATVModInputHGradient:
sample = (pointIndex / (float) m_pointsPerImgLine) * m_spanLevel + m_blackLevel; sample = (pointIndex / (float) m_pointsPerImgLine) * m_spanLevel + m_blackLevel;
break; break;
case ATVModInputVGradient: case ATVModSettings::ATVModInputVGradient:
sample = ((iLine -5) / (float) m_nbImageLines2) * m_spanLevel + m_blackLevel; sample = ((iLine -5) / (float) m_nbImageLines2) * m_spanLevel + m_blackLevel;
break; break;
case ATVModInputImage: case ATVModSettings::ATVModInputImage:
if (!m_imageOK || (iLineImage < -oddity) || m_image.empty()) if (!m_imageOK || (iLineImage < -oddity) || m_image.empty())
{ {
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel; sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
@ -774,7 +743,7 @@ private:
sample = (pixv / 256.0f) * m_spanLevel + m_blackLevel; sample = (pixv / 256.0f) * m_spanLevel + m_blackLevel;
} }
break; break;
case ATVModInputVideo: case ATVModSettings::ATVModInputVideo:
if (!m_videoOK || (iLineImage < -oddity) || m_videoFrame.empty()) if (!m_videoOK || (iLineImage < -oddity) || m_videoFrame.empty())
{ {
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel; sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
@ -792,7 +761,7 @@ private:
sample = (pixv / 256.0f) * m_spanLevel + m_blackLevel; sample = (pixv / 256.0f) * m_spanLevel + m_blackLevel;
} }
break; break;
case ATVModInputCamera: case ATVModSettings::ATVModInputCamera:
if ((iLineImage < -oddity) || (m_cameraIndex < 0)) if ((iLineImage < -oddity) || (m_cameraIndex < 0))
{ {
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel; sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
@ -819,7 +788,7 @@ private:
} }
} }
break; break;
case ATVModInputUniform: case ATVModSettings::ATVModInputUniform:
default: default:
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel; sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
} }

View File

@ -25,15 +25,15 @@
#include "device/devicesinkapi.h" #include "device/devicesinkapi.h"
#include "dsp/upchannelizer.h" #include "dsp/upchannelizer.h"
#include "dsp/threadedbasebandsamplesource.h" #include "dsp/threadedbasebandsamplesource.h"
#include "ui_atvmodgui.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "util/simpleserializer.h" #include "util/simpleserializer.h"
#include "util/db.h"
#include "gui/basicchannelsettingswidget.h" #include "gui/basicchannelsettingswidget.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
#include "util/db.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "ui_atvmodgui.h"
#include "atvmodgui.h" #include "atvmodgui.h"
const QString ATVModGUI::m_channelID = "sdrangel.channeltx.modatv"; const QString ATVModGUI::m_channelID = "sdrangel.channeltx.modatv";
@ -70,111 +70,29 @@ void ATVModGUI::setCenterFrequency(qint64 centerFrequency)
void ATVModGUI::resetToDefaults() void ATVModGUI::resetToDefaults()
{ {
blockApplySettings(true); m_settings.resetToDefaults();
ui->rfBW->setValue(10);
ui->uniformLevel->setValue(35);
ui->standard->setCurrentIndex(0);
ui->nbLines->setCurrentIndex(0);
ui->fps->setCurrentIndex(1);
ui->inputSelect->setCurrentIndex(0);
ui->deltaFrequency->setValue(0);
ui->modulation->setCurrentIndex(0);
blockApplySettings(false);
applySettings();
} }
QByteArray ATVModGUI::serialize() const QByteArray ATVModGUI::serialize() const
{ {
SimpleSerializer s(1); return m_settings.serialize();
s.writeS32(1, m_channelMarker.getCenterFrequency());
s.writeS32(2, ui->rfBW->value());
s.writeS32(3, ui->uniformLevel->value());
s.writeS32(4, ui->standard->currentIndex());
s.writeS32(5, ui->inputSelect->currentIndex());
s.writeU32(6, m_channelMarker.getColor().rgb());
s.writeS32(7, ui->rfOppBW->value());
s.writeS32(8, ui->modulation->currentIndex());
s.writeBool(9, ui->invertVideo->isChecked());
s.writeS32(10, ui->nbLines->currentIndex());
s.writeS32(11, ui->fps->currentIndex());
s.writeS32(12, ui->rfScaling->value());
s.writeS32(13, ui->fmExcursion->value());
s.writeString(14, ui->overlayText->text());
return s.final();
} }
bool ATVModGUI::deserialize(const QByteArray& data) bool ATVModGUI::deserialize(const QByteArray& data)
{ {
SimpleDeserializer d(data); if(m_settings.deserialize(data))
if(!d.isValid())
{ {
resetToDefaults(); displaySettings();
return false; applySettings(); // will have true
} return true;
}
if(d.getVersion() == 1)
{
QByteArray bytetmp;
quint32 u32tmp;
qint32 tmp;
bool booltmp;
QString tmpString;
blockApplySettings(true);
m_channelMarker.blockSignals(true);
d.readS32(1, &tmp, 0);
m_channelMarker.setCenterFrequency(tmp);
d.readS32(2, &tmp, 4);
ui->rfBW->setValue(tmp);
d.readS32(3, &tmp, 100);
ui->uniformLevel->setValue(tmp);
d.readS32(4, &tmp, 0);
ui->standard->setCurrentIndex(tmp);
d.readS32(5, &tmp, 0);
ui->inputSelect->setCurrentIndex(tmp);
if(d.readU32(6, &u32tmp))
{
m_channelMarker.setColor(u32tmp);
}
d.readS32(7, &tmp, 10);
ui->rfOppBW->setValue(tmp);
d.readS32(8, &tmp, 0);
ui->modulation->setCurrentIndex(tmp);
d.readBool(9, &booltmp, false);
ui->invertVideo->setChecked(booltmp);
d.readS32(10, &tmp, 0);
ui->nbLines->setCurrentIndex(tmp);
d.readS32(11, &tmp, 0);
ui->fps->setCurrentIndex(tmp);
d.readS32(12, &tmp, 80);
ui->rfScaling->setValue(tmp);
d.readS32(13, &tmp, 250);
ui->fmExcursion->setValue(tmp);
d.readString(14, &tmpString, "");
ui->overlayText->setText(tmpString);
blockApplySettings(false);
m_channelMarker.blockSignals(false);
ATVMod::MsgConfigureOverlayText* message = ATVMod::MsgConfigureOverlayText::create(ui->overlayText->text());
m_atvMod->getInputMessageQueue()->push(message);
applySettings();
return true;
}
else else
{ {
resetToDefaults(); m_settings.resetToDefaults();
return false; displaySettings();
} applySettings(); // will have true
return false;
}
} }
bool ATVModGUI::handleMessage(const Message& message) bool ATVModGUI::handleMessage(const Message& message)
@ -255,10 +173,10 @@ void ATVModGUI::setRFFiltersSlidersRange(int sampleRate)
m_rfSliderDivisor /= 10; m_rfSliderDivisor /= 10;
} }
if ((ui->modulation->currentIndex() == (int) ATVMod::ATVModulationLSB) || if ((ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationLSB) ||
(ui->modulation->currentIndex() == (int) ATVMod::ATVModulationUSB) || (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationUSB) ||
(ui->modulation->currentIndex() == (int) ATVMod::ATVModulationVestigialLSB) || (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialLSB) ||
(ui->modulation->currentIndex() == (int) ATVMod::ATVModulationVestigialUSB)) (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialUSB))
{ {
ui->rfBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor)); ui->rfBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor));
ui->rfOppBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor)); ui->rfOppBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor));
@ -320,6 +238,39 @@ int ATVModGUI::getNbLines()
} }
} }
int ATVModGUI::getNbLinesIndex(int nbLines)
{
if (nbLines < 32) {
return 1;
} else if (nbLines < 60) {
return 12;
} else if (nbLines < 90) {
return 11;
} else if (nbLines < 120) {
return 10;
} else if (nbLines < 180) {
return 9;
} else if (nbLines < 240) {
return 8;
} else if (nbLines < 343) {
return 7;
} else if (nbLines < 360) {
return 6;
} else if (nbLines < 405) {
return 5;
} else if (nbLines < 480) {
return 4;
} else if (nbLines < 525) {
return 3;
} else if (nbLines < 625) {
return 2;
} else if (nbLines < 640) {
return 1;
} else {
return 0;
}
}
int ATVModGUI::getFPS() int ATVModGUI::getFPS()
{ {
switch(ui->fps->currentIndex()) switch(ui->fps->currentIndex())
@ -356,7 +307,33 @@ int ATVModGUI::getFPS()
return 25; return 25;
break; break;
} }
}
int ATVModGUI::getFPSIndex(int fps)
{
if (fps < 1) {
return 1;
} else if (fps < 2) {
return 9;
} else if (fps < 5) {
return 8;
} else if (fps < 8) {
return 7;
} else if (fps < 10) {
return 6;
} else if (fps < 12) {
return 5;
} else if (fps < 16) {
return 4;
} else if (fps < 20) {
return 3;
} else if (fps < 25) {
return 2;
} else if (fps < 30) {
return 1;
} else {
return 0;
}
} }
void ATVModGUI::handleSourceMessages() void ATVModGUI::handleSourceMessages()
@ -377,8 +354,9 @@ void ATVModGUI::on_deltaFrequency_changed(qint64 value)
m_channelMarker.setCenterFrequency(value); m_channelMarker.setCenterFrequency(value);
} }
void ATVModGUI::on_modulation_currentIndexChanged(int index __attribute__((unused))) void ATVModGUI::on_modulation_currentIndexChanged(int index)
{ {
m_settings.m_atvModulation = (ATVModSettings::ATVModulation) index;
setRFFiltersSlidersRange(m_atvMod->getEffectiveSampleRate()); setRFFiltersSlidersRange(m_atvMod->getEffectiveSampleRate());
setChannelMarkerBandwidth(); setChannelMarkerBandwidth();
applySettings(); applySettings();
@ -387,18 +365,21 @@ void ATVModGUI::on_modulation_currentIndexChanged(int index __attribute__((unuse
void ATVModGUI::on_rfScaling_valueChanged(int value) void ATVModGUI::on_rfScaling_valueChanged(int value)
{ {
ui->rfScalingText->setText(tr("%1").arg(value)); ui->rfScalingText->setText(tr("%1").arg(value));
m_settings.m_rfScalingFactor = value * 327.68f;
applySettings(); applySettings();
} }
void ATVModGUI::on_fmExcursion_valueChanged(int value) void ATVModGUI::on_fmExcursion_valueChanged(int value)
{ {
ui->fmExcursionText->setText(tr("%1").arg(value / 10.0, 0, 'f', 1)); ui->fmExcursionText->setText(tr("%1").arg(value / 10.0, 0, 'f', 1));
m_settings.m_fmExcursion = value / 1000.0; // pro mill
applySettings(); applySettings();
} }
void ATVModGUI::on_rfBW_valueChanged(int value) void ATVModGUI::on_rfBW_valueChanged(int value)
{ {
ui->rfBWText->setText(QString("%1k").arg((value*m_rfSliderDivisor) / 1000.0, 0, 'f', 0)); ui->rfBWText->setText(QString("%1k").arg((value*m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
m_settings.m_rfBandwidth = value * m_rfSliderDivisor * 1.0f;
setChannelMarkerBandwidth(); setChannelMarkerBandwidth();
applySettings(); applySettings();
} }
@ -406,29 +387,30 @@ void ATVModGUI::on_rfBW_valueChanged(int value)
void ATVModGUI::on_rfOppBW_valueChanged(int value) void ATVModGUI::on_rfOppBW_valueChanged(int value)
{ {
ui->rfOppBWText->setText(QString("%1k").arg((value*m_rfSliderDivisor) / 1000.0, 0, 'f', 0)); ui->rfOppBWText->setText(QString("%1k").arg((value*m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
m_settings.m_rfOppBandwidth = value * m_rfSliderDivisor * 1.0f;
setChannelMarkerBandwidth(); setChannelMarkerBandwidth();
applySettings(); applySettings();
} }
void ATVModGUI::setChannelMarkerBandwidth() void ATVModGUI::setChannelMarkerBandwidth()
{ {
if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationLSB) if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationLSB)
{ {
m_channelMarker.setBandwidth(-ui->rfBW->value()*m_rfSliderDivisor*2); m_channelMarker.setBandwidth(-ui->rfBW->value()*m_rfSliderDivisor*2);
m_channelMarker.setSidebands(ChannelMarker::lsb); m_channelMarker.setSidebands(ChannelMarker::lsb);
} }
else if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationVestigialLSB) else if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialLSB)
{ {
m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor); m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*m_rfSliderDivisor); m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*m_rfSliderDivisor);
m_channelMarker.setSidebands(ChannelMarker::vlsb); m_channelMarker.setSidebands(ChannelMarker::vlsb);
} }
else if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationUSB) else if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationUSB)
{ {
m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor*2); m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor*2);
m_channelMarker.setSidebands(ChannelMarker::usb); m_channelMarker.setSidebands(ChannelMarker::usb);
} }
else if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationVestigialUSB) else if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialUSB)
{ {
m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor); m_channelMarker.setBandwidth(ui->rfBW->value()*m_rfSliderDivisor);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*m_rfSliderDivisor); m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*m_rfSliderDivisor);
@ -443,43 +425,51 @@ void ATVModGUI::setChannelMarkerBandwidth()
void ATVModGUI::on_nbLines_currentIndexChanged(int index __attribute__((unused))) void ATVModGUI::on_nbLines_currentIndexChanged(int index __attribute__((unused)))
{ {
m_settings.m_nbLines = getNbLines();
applySettings(); applySettings();
} }
void ATVModGUI::on_fps_currentIndexChanged(int index __attribute__((unused))) void ATVModGUI::on_fps_currentIndexChanged(int index __attribute__((unused)))
{ {
m_settings.m_fps = getFPS();
applySettings(); applySettings();
} }
void ATVModGUI::on_standard_currentIndexChanged(int index __attribute__((unused))) void ATVModGUI::on_standard_currentIndexChanged(int index)
{ {
m_settings.m_atvStd = (ATVModSettings::ATVStd) index;
applySettings(); applySettings();
} }
void ATVModGUI::on_uniformLevel_valueChanged(int value) void ATVModGUI::on_uniformLevel_valueChanged(int value)
{ {
ui->uniformLevelText->setText(QString("%1").arg(value)); ui->uniformLevelText->setText(QString("%1").arg(value));
m_settings.m_uniformLevel = value / 100.0f;
applySettings(); applySettings();
} }
void ATVModGUI::on_invertVideo_clicked() void ATVModGUI::on_invertVideo_clicked(bool checked)
{ {
m_settings.m_invertedVideo = checked;
applySettings(); applySettings();
} }
void ATVModGUI::on_inputSelect_currentIndexChanged(int index __attribute__((unused))) void ATVModGUI::on_inputSelect_currentIndexChanged(int index)
{ {
m_settings.m_atvModInput = (ATVModSettings::ATVModInput) index;
applySettings(); applySettings();
} }
void ATVModGUI::on_channelMute_toggled(bool checked __attribute__((unused))) void ATVModGUI::on_channelMute_toggled(bool checked)
{ {
m_settings.m_channelMute = checked;
applySettings(); applySettings();
} }
void ATVModGUI::on_forceDecimator_toggled(bool checked __attribute__((unused))) void ATVModGUI::on_forceDecimator_toggled(bool checked)
{ {
m_settings.m_forceDecimator = checked;
applySettings(); applySettings();
} }
@ -509,13 +499,15 @@ void ATVModGUI::on_videoFileDialog_clicked(bool checked __attribute__((unused)))
} }
} }
void ATVModGUI::on_playLoop_toggled(bool checked __attribute__((unused))) void ATVModGUI::on_playLoop_toggled(bool checked)
{ {
m_settings.m_videoPlayLoop = checked;
applySettings(); applySettings();
} }
void ATVModGUI::on_playVideo_toggled(bool checked) void ATVModGUI::on_playVideo_toggled(bool checked)
{ {
m_settings.m_videoPlay = checked;
ui->navTimeSlider->setEnabled(!checked); ui->navTimeSlider->setEnabled(!checked);
m_enableNavTime = !checked; m_enableNavTime = !checked;
applySettings(); applySettings();
@ -530,8 +522,9 @@ void ATVModGUI::on_navTimeSlider_valueChanged(int value)
} }
} }
void ATVModGUI::on_playCamera_toggled(bool checked __attribute__((unused))) void ATVModGUI::on_playCamera_toggled(bool checked)
{ {
m_settings.m_cameraPlay = checked;
applySettings(); applySettings();
} }
@ -568,6 +561,7 @@ void ATVModGUI::on_overlayTextShow_toggled(bool checked)
void ATVModGUI::on_overlayText_textEdited(const QString& arg1 __attribute__((unused))) void ATVModGUI::on_overlayText_textEdited(const QString& arg1 __attribute__((unused)))
{ {
m_settings.m_overlayText = arg1;
ATVMod::MsgConfigureOverlayText* message = ATVMod::MsgConfigureOverlayText::create(ui->overlayText->text()); ATVMod::MsgConfigureOverlayText* message = ATVMod::MsgConfigureOverlayText::create(ui->overlayText->text());
m_atvMod->getInputMessageQueue()->push(message); m_atvMod->getInputMessageQueue()->push(message);
} }
@ -683,34 +677,87 @@ void ATVModGUI::applySettings()
{ {
if (m_doApplySettings) if (m_doApplySettings)
{ {
setTitleColor(m_channelMarker.getColor());
m_channelizer->configure(m_channelizer->getInputMessageQueue(), m_channelizer->configure(m_channelizer->getInputMessageQueue(),
m_channelizer->getOutputSampleRate(), m_channelizer->getOutputSampleRate(),
m_channelMarker.getCenterFrequency()); m_channelMarker.getCenterFrequency());
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency()); m_atvMod->configure(m_atvMod->getInputMessageQueue(),
m_settings.m_rfBandwidth,
m_atvMod->configure(m_atvMod->getInputMessageQueue(), m_settings.m_rfOppBandwidth,
ui->rfBW->value() * m_rfSliderDivisor * 1.0f, m_settings.m_atvStd,
ui->rfOppBW->value() * m_rfSliderDivisor * 1.0f, m_settings.m_nbLines,
(ATVMod::ATVStd) ui->standard->currentIndex(), m_settings.m_fps,
getNbLines(), m_settings.m_atvModInput,
getFPS(), m_settings.m_uniformLevel,
(ATVMod::ATVModInput) ui->inputSelect->currentIndex(), m_settings.m_atvModulation,
ui->uniformLevel->value() / 100.0f, m_settings.m_videoPlayLoop,
(ATVMod::ATVModulation) ui->modulation->currentIndex(), m_settings.m_videoPlay,
ui->playLoop->isChecked(), m_settings.m_cameraPlay,
ui->playVideo->isChecked(), m_settings.m_channelMute,
ui->playCamera->isChecked(), m_settings.m_invertedVideo,
ui->channelMute->isChecked(), m_settings.m_rfScalingFactor,
ui->invertVideo->isChecked(), m_settings.m_fmExcursion, // percentage of full bandwidth. Value in pro milli
ui->rfScaling->value() * 327.68f, m_settings.m_forceDecimator);
ui->fmExcursion->value() / 1000.0f, // percentage of full bandwidth. Value in pro milli
ui->forceDecimator->isChecked());
} }
} }
void ATVModGUI::displaySettings()
{
m_channelMarker.blockSignals(true);
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
m_channelMarker.setColor(m_settings.m_rgbColor);
m_channelMarker.blockSignals(false);
setTitleColor(m_settings.m_rgbColor);
setWindowTitle(m_channelMarker.getTitle());
blockApplySettings(true);
ui->modulation->setCurrentIndex((int) m_settings.m_atvModulation);
setRFFiltersSlidersRange(m_atvMod->getEffectiveSampleRate());
ui->rfBW->setValue(roundf(m_settings.m_rfBandwidth / m_rfSliderDivisor));
ui->rfBWText->setText(QString("%1k").arg((ui->rfBW->value()*m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
ui->rfOppBW->setValue(roundf(m_settings.m_rfOppBandwidth / m_rfSliderDivisor));
ui->rfOppBWText->setText(QString("%1k").arg((ui->rfOppBW->value()*m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
setChannelMarkerBandwidth();
ui->deltaFrequency->setValue(m_settings.m_inputFrequencyOffset);
ui->forceDecimator->setChecked(m_settings.m_forceDecimator);
ui->channelMute->setChecked(m_settings.m_channelMute);
ui->fmExcursion->setValue(roundf(m_settings.m_fmExcursion * 1000.0));
ui->fmExcursionText->setText(tr("%1").arg(ui->fmExcursion->value() / 10.0, 0, 'f', 1));
ui->rfScaling->setValue(roundf(m_settings.m_rfScalingFactor / 327.68f));
ui->rfScalingText->setText(tr("%1").arg(ui->rfScaling->value()));
int validNbLinesIndex = getNbLinesIndex(m_settings.m_nbLines);
ui->nbLines->setCurrentIndex(validNbLinesIndex);
m_settings.m_nbLines = getNbLines(); // normalize
int validFPSIndex = getFPSIndex(m_settings.m_fps);
ui->fps->setCurrentIndex(validFPSIndex);
m_settings.m_fps = getFPS(); // normalize
ui->standard->setCurrentIndex((int) m_settings.m_atvStd);
ui->inputSelect->setCurrentIndex((int) m_settings.m_atvModInput);
ui->invertVideo->setChecked(m_settings.m_invertedVideo);
ui->uniformLevel->setValue(roundf(m_settings.m_uniformLevel * 100.0));
ui->uniformLevelText->setText(QString("%1").arg(ui->uniformLevel->value()));
ui->overlayText->setText(m_settings.m_overlayText);
ATVMod::MsgConfigureOverlayText* message = ATVMod::MsgConfigureOverlayText::create(ui->overlayText->text());
m_atvMod->getInputMessageQueue()->push(message);
blockApplySettings(false);
}
void ATVModGUI::leaveEvent(QEvent*) void ATVModGUI::leaveEvent(QEvent*)
{ {
blockApplySettings(true); blockApplySettings(true);
@ -731,7 +778,7 @@ void ATVModGUI::tick()
m_channelPowerDbAvg.feed(powDb); m_channelPowerDbAvg.feed(powDb);
ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.average(), 0, 'f', 1)); ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.average(), 0, 'f', 1));
if (((++m_tickCount & 0xf) == 0) && (ui->inputSelect->currentIndex() == (int) ATVMod::ATVModInputVideo)) if (((++m_tickCount & 0xf) == 0) && (ui->inputSelect->currentIndex() == (int) ATVModSettings::ATVModInputVideo))
{ {
ATVMod::MsgConfigureVideoFileSourceStreamTiming* message = ATVMod::MsgConfigureVideoFileSourceStreamTiming::create(); ATVMod::MsgConfigureVideoFileSourceStreamTiming* message = ATVMod::MsgConfigureVideoFileSourceStreamTiming::create();
m_atvMod->getInputMessageQueue()->push(message); m_atvMod->getInputMessageQueue()->push(message);

View File

@ -24,6 +24,7 @@
#include "util/messagequeue.h" #include "util/messagequeue.h"
#include "atvmod.h" #include "atvmod.h"
#include "atvmodsettings.h"
class PluginAPI; class PluginAPI;
class DeviceSinkAPI; class DeviceSinkAPI;
@ -73,7 +74,7 @@ private slots:
void on_nbLines_currentIndexChanged(int index); void on_nbLines_currentIndexChanged(int index);
void on_fps_currentIndexChanged(int index); void on_fps_currentIndexChanged(int index);
void on_standard_currentIndexChanged(int index); void on_standard_currentIndexChanged(int index);
void on_invertVideo_clicked(); void on_invertVideo_clicked(bool checked);
void on_uniformLevel_valueChanged(int value); void on_uniformLevel_valueChanged(int value);
void on_inputSelect_currentIndexChanged(int index); void on_inputSelect_currentIndexChanged(int index);
void on_imageFileDialog_clicked(bool checked); void on_imageFileDialog_clicked(bool checked);
@ -103,6 +104,7 @@ private:
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI; DeviceSinkAPI* m_deviceAPI;
ChannelMarker m_channelMarker; ChannelMarker m_channelMarker;
ATVModSettings m_settings;
bool m_basicSettingsShown; bool m_basicSettingsShown;
bool m_doApplySettings; bool m_doApplySettings;
@ -127,12 +129,15 @@ private:
void blockApplySettings(bool block); void blockApplySettings(bool block);
void applySettings(); void applySettings();
void displaySettings();
void updateWithStreamData(); void updateWithStreamData();
void updateWithStreamTime(); void updateWithStreamTime();
void setRFFiltersSlidersRange(int sampleRate); void setRFFiltersSlidersRange(int sampleRate);
void setChannelMarkerBandwidth(); void setChannelMarkerBandwidth();
int getNbLines(); int getNbLines();
int getFPS(); int getFPS();
int getNbLinesIndex(int nbLines);
int getFPSIndex(int fps);
void leaveEvent(QEvent*); void leaveEvent(QEvent*);
void enterEvent(QEvent*); void enterEvent(QEvent*);

View File

@ -445,6 +445,9 @@
<height>24</height> <height>24</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>RF volume</string>
</property>
<property name="maximum"> <property name="maximum">
<number>100</number> <number>100</number>
</property> </property>

View File

@ -48,6 +48,7 @@ void ATVModSettings::resetToDefaults()
m_fmExcursion = 0.5f; // half bandwidth m_fmExcursion = 0.5f; // half bandwidth
m_forceDecimator = false; m_forceDecimator = false;
m_overlayText = "ATV"; m_overlayText = "ATV";
m_rgbColor = Qt::white;
} }
QByteArray ATVModSettings::serialize() const QByteArray ATVModSettings::serialize() const