mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-24 21:28:29 -04:00
ATV Demod: show number of points per line
This commit is contained in:
parent
ce7c65ae38
commit
4ef2386945
@ -705,7 +705,7 @@ void ATVDemod::applySettings()
|
||||
{
|
||||
m_objSettingsMutex.lock();
|
||||
|
||||
m_objConfigPrivate.m_intTVSampleRate = (m_objConfig.m_intSampleRate / 1000000) * 1000000; // make sure working sample rate is a multiple of rate units
|
||||
m_objConfigPrivate.m_intTVSampleRate = (m_objConfig.m_intSampleRate / 500000) * 500000; // make sure working sample rate is a multiple of rate units
|
||||
|
||||
if (m_objConfigPrivate.m_intTVSampleRate > 0)
|
||||
{
|
||||
@ -733,7 +733,7 @@ void ATVDemod::applySettings()
|
||||
{
|
||||
m_objSettingsMutex.lock();
|
||||
|
||||
m_intNumberOfLines = (int) round(1.0f / (m_objConfig.m_fltLineDuration * m_objConfig.m_fltFramePerS));
|
||||
m_intNumberOfLines = (int) (1.0f / (m_objConfig.m_fltLineDuration * m_objConfig.m_fltFramePerS));
|
||||
m_intNumberSamplePerLine = (int) (m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate);
|
||||
m_intNumberOfRowsToDisplay = (int) (m_objConfig.m_fltRatioOfRowsToDisplay * m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate);
|
||||
|
||||
@ -754,6 +754,11 @@ void ATVDemod::applySettings()
|
||||
m_intRowsLimit=0;
|
||||
|
||||
m_objSettingsMutex.unlock();
|
||||
|
||||
int sampleRate = m_objRFConfig.m_blndecimatorEnable ? m_objConfigPrivate.m_intTVSampleRate : m_objConfig.m_intSampleRate;
|
||||
MsgReportEffectiveSampleRate *report;
|
||||
report = MsgReportEffectiveSampleRate::create(sampleRate, m_intNumberSamplePerLine);
|
||||
getOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
if ((m_objConfigPrivate.m_intTVSampleRate != m_objRunningPrivate.m_intTVSampleRate)
|
||||
@ -762,7 +767,7 @@ void ATVDemod::applySettings()
|
||||
{
|
||||
int sampleRate = m_objRFConfig.m_blndecimatorEnable ? m_objConfigPrivate.m_intTVSampleRate : m_objConfig.m_intSampleRate;
|
||||
MsgReportEffectiveSampleRate *report;
|
||||
report = MsgReportEffectiveSampleRate::create(sampleRate);
|
||||
report = MsgReportEffectiveSampleRate::create(sampleRate, m_intNumberSamplePerLine);
|
||||
getOutputMessageQueue()->push(report);
|
||||
}
|
||||
|
||||
|
@ -112,18 +112,21 @@ public:
|
||||
|
||||
public:
|
||||
int getSampleRate() const { return m_sampleRate; }
|
||||
int getNbPointsPerLine() const { return m_nbPointsPerLine; }
|
||||
|
||||
static MsgReportEffectiveSampleRate* create(int sampleRate)
|
||||
static MsgReportEffectiveSampleRate* create(int sampleRate, int nbPointsPerLine)
|
||||
{
|
||||
return new MsgReportEffectiveSampleRate(sampleRate);
|
||||
return new MsgReportEffectiveSampleRate(sampleRate, nbPointsPerLine);
|
||||
}
|
||||
|
||||
protected:
|
||||
int m_sampleRate;
|
||||
int m_nbPointsPerLine;
|
||||
|
||||
MsgReportEffectiveSampleRate(int sampleRate) :
|
||||
MsgReportEffectiveSampleRate(int sampleRate, int nbPointsPerLine) :
|
||||
Message(),
|
||||
m_sampleRate(sampleRate)
|
||||
m_sampleRate(sampleRate),
|
||||
m_nbPointsPerLine(nbPointsPerLine)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -203,7 +203,9 @@ bool ATVDemodGUI::handleMessage(const Message& objMessage)
|
||||
if (ATVDemod::MsgReportEffectiveSampleRate::match(objMessage))
|
||||
{
|
||||
int sampleRate = ((ATVDemod::MsgReportEffectiveSampleRate&)objMessage).getSampleRate();
|
||||
int nbPointsPerLine = ((ATVDemod::MsgReportEffectiveSampleRate&)objMessage).getNbPointsPerLine();
|
||||
ui->channelSampleRateText->setText(tr("%1k").arg(sampleRate/1000.0f, 0, 'f', 0));
|
||||
ui->nbPointsPerLineText->setText(tr("%1p").arg(nbPointsPerLine));
|
||||
setRFFiltersSlidersRange(sampleRate);
|
||||
lineTimeUpdate();
|
||||
|
||||
|
@ -150,6 +150,25 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="nbPointsPerLineText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Number of points (samples) per line</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>000p</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
|
Loading…
Reference in New Issue
Block a user