diff --git a/devices/hackrf/devicehackrfvalues.cpp b/devices/hackrf/devicehackrfvalues.cpp index e118f11f8..b15724554 100644 --- a/devices/hackrf/devicehackrfvalues.cpp +++ b/devices/hackrf/devicehackrfvalues.cpp @@ -16,9 +16,10 @@ #include "devicehackrfvalues.h" -const unsigned int HackRFSampleRates::m_nb_rates = 21; +const unsigned int HackRFSampleRates::m_nb_rates = 22; const unsigned int HackRFSampleRates::m_rates[HackRFSampleRates::m_nb_rates] = { 2400000, + 2600000, 3000000, 3150000, // for PAL-M 3200000, diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index 77b5ec668..b9bfe2ba4 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -665,6 +665,7 @@ void ATVMod::apply(bool force) int rateUnits, nbPointsPerRateUnit; getBaseValues(m_config.m_nbLines * m_config.m_fps, rateUnits, nbPointsPerRateUnit); m_tvSampleRate = (m_config.m_outputSampleRate / rateUnits) * rateUnits; // make sure working sample rate is a multiple of rate units + m_pointsPerLine = (m_tvSampleRate / rateUnits) * nbPointsPerRateUnit; m_settingsMutex.lock(); @@ -690,7 +691,7 @@ void ATVMod::apply(bool force) m_settingsMutex.unlock(); MsgReportEffectiveSampleRate *report; - report = MsgReportEffectiveSampleRate::create(m_tvSampleRate); + report = MsgReportEffectiveSampleRate::create(m_tvSampleRate, m_pointsPerLine); getOutputMessageQueue()->push(report); } diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 09af5aedf..3e0eb8211 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -311,18 +311,23 @@ public: public: int getSampleRate() const { return m_sampleRate; } + uint32_t gatNbPointsPerLine() const { return m_nbPointsPerLine; } - static MsgReportEffectiveSampleRate* create(int sampleRate) + static MsgReportEffectiveSampleRate* create(int sampleRate, uint32_t nbPointsPerLine) { - return new MsgReportEffectiveSampleRate(sampleRate); + return new MsgReportEffectiveSampleRate(sampleRate, nbPointsPerLine); } protected: int m_sampleRate; + uint32_t m_nbPointsPerLine; - MsgReportEffectiveSampleRate(int sampleRate) : + MsgReportEffectiveSampleRate( + int sampleRate, + uint32_t nbPointsPerLine) : Message(), - m_sampleRate(sampleRate) + m_sampleRate(sampleRate), + m_nbPointsPerLine(nbPointsPerLine) { } }; @@ -556,6 +561,7 @@ private: Real m_interpolatorDistance; Real m_interpolatorDistanceRemain; int m_tvSampleRate; //!< sample rate for generating signal + uint32_t m_pointsPerLine; //!< Number of points per full line uint32_t m_pointsPerSync; //!< number of line points for the horizontal sync uint32_t m_pointsPerBP; //!< number of line points for the back porch uint32_t m_pointsPerImgLine; //!< number of line points for the image line diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp index 3f1bfb455..d927f1ad6 100644 --- a/plugins/channeltx/modatv/atvmodgui.cpp +++ b/plugins/channeltx/modatv/atvmodgui.cpp @@ -214,7 +214,9 @@ bool ATVModGUI::handleMessage(const Message& message) else if (ATVMod::MsgReportEffectiveSampleRate::match(message)) { int sampleRate = ((ATVMod::MsgReportEffectiveSampleRate&)message).getSampleRate(); + uint32_t nbPointsPerLine = ((ATVMod::MsgReportEffectiveSampleRate&)message).gatNbPointsPerLine(); ui->channelSampleRateText->setText(tr("%1k").arg(sampleRate/1000.0f, 0, 'f', 0)); + ui->nbPointsPerLineText->setText(tr("%1p").arg(nbPointsPerLine)); setRFFiltersSlidersRange(sampleRate); return true; } diff --git a/plugins/channeltx/modatv/atvmodgui.ui b/plugins/channeltx/modatv/atvmodgui.ui index 75a88287e..db0951907 100644 --- a/plugins/channeltx/modatv/atvmodgui.ui +++ b/plugins/channeltx/modatv/atvmodgui.ui @@ -146,6 +146,22 @@ + + + + + 40 + 0 + + + + 0000p + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + +