mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
ATV Demod: use sample period for line duration adjustment step
This commit is contained in:
parent
87c63b41bb
commit
ce7c65ae38
@ -737,12 +737,12 @@ void ATVDemod::applySettings()
|
||||
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);
|
||||
|
||||
// qDebug() << "ATVDemod::applySettings:"
|
||||
// << " m_fltLineDuration: " << m_objConfig.m_fltLineDuration
|
||||
// << " m_fltFramePerS: " << m_objConfig.m_fltFramePerS
|
||||
// << " m_intNumberOfLines: " << m_intNumberOfLines
|
||||
// << " m_intNumberSamplePerLine: " << m_intNumberSamplePerLine
|
||||
// << " m_intNumberOfRowsToDisplay: " << m_intNumberOfRowsToDisplay;
|
||||
qDebug() << "ATVDemod::applySettings:"
|
||||
<< " m_fltLineDuration: " << m_objConfig.m_fltLineDuration
|
||||
<< " m_fltFramePerS: " << m_objConfig.m_fltFramePerS
|
||||
<< " m_intNumberOfLines: " << m_intNumberOfLines
|
||||
<< " m_intNumberSamplePerLine: " << m_intNumberSamplePerLine
|
||||
<< " m_intNumberOfRowsToDisplay: " << m_intNumberOfRowsToDisplay;
|
||||
|
||||
m_intNumberSamplePerTop = (int) ((m_objConfig.m_fltTopDurationUs * m_objConfig.m_intSampleRate) / m_fltSecondToUs);
|
||||
m_objRegisteredATVScreen->resizeATVScreen(m_intNumberSamplePerLine, m_intNumberOfLines);
|
||||
|
@ -205,6 +205,7 @@ bool ATVDemodGUI::handleMessage(const Message& objMessage)
|
||||
int sampleRate = ((ATVDemod::MsgReportEffectiveSampleRate&)objMessage).getSampleRate();
|
||||
ui->channelSampleRateText->setText(tr("%1k").arg(sampleRate/1000.0f, 0, 'f', 0));
|
||||
setRFFiltersSlidersRange(sampleRate);
|
||||
lineTimeUpdate();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -618,7 +619,12 @@ void ATVDemodGUI::lineTimeUpdate()
|
||||
{
|
||||
float nominalLineTime = getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex());
|
||||
int lineTimeScaleFactor = (int) std::log10(nominalLineTime);
|
||||
m_fltLineTimeMultiplier = std::pow(10.0, lineTimeScaleFactor-3);
|
||||
|
||||
if (m_objATVDemod->getEffectiveSampleRate() == 0) {
|
||||
m_fltLineTimeMultiplier = std::pow(10.0, lineTimeScaleFactor-3);
|
||||
} else {
|
||||
m_fltLineTimeMultiplier = 1.0f / m_objATVDemod->getEffectiveSampleRate();
|
||||
}
|
||||
|
||||
float lineTime = nominalLineTime + m_fltLineTimeMultiplier * ui->lineTime->value();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user