diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index fc3dde666..5cd4ec56c 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -139,7 +139,7 @@ void ATVDemodGUI::displaySettings() ui->amScaleOffset->setValue(m_settings.m_amOffsetFactor); ui->amScaleOffsetText->setText(QString("%1").arg(m_settings.m_amOffsetFactor)); - applyTVSampleRate(); + applySampleRate(); m_doApplySettings = true; } @@ -165,18 +165,20 @@ void ATVDemodGUI::displayRFBandwidths() ui->rfOppBWText->setText(QString("%1k").arg((sliderPosition * m_rfSliderDivisor) / 1000.0, 0, 'f', 0)); } -void ATVDemodGUI::applyTVSampleRate() +void ATVDemodGUI::applySampleRate() { - qDebug("TVDemodGUI::applyTVSampleRate"); + qDebug("ATVDemodGUI::applySampleRate"); unsigned int nbPointsPerLine; ATVDemodSettings::getBaseValues(m_basebandSampleRate, m_settings.m_fps*m_settings.m_nbLines, nbPointsPerLine); + float samplesPerLineFrac = (float) m_basebandSampleRate / (m_settings.m_nbLines * m_settings.m_fps) - nbPointsPerLine; ui->tvSampleRateText->setText(tr("%1k").arg(m_basebandSampleRate/1000.0f, 0, 'f', 2)); - ui->nbPointsPerLineText->setText(tr("%1p").arg(nbPointsPerLine)); + ui->nbPointsPerLineText->setText(tr("%1p+%2").arg(nbPointsPerLine).arg(samplesPerLineFrac, 0, 'f', 2)); m_scopeVis->setLiveRate(m_basebandSampleRate); setRFFiltersSlidersRange(m_basebandSampleRate); displayRFBandwidths(); lineTimeUpdate(); topTimeUpdate(); + setChannelMarkerBandwidth(); } bool ATVDemodGUI::handleMessage(const Message& message) @@ -185,7 +187,7 @@ bool ATVDemodGUI::handleMessage(const Message& message) { DSPSignalNotification& notif = (DSPSignalNotification&) message; m_basebandSampleRate = notif.getSampleRate(); - applyTVSampleRate(); + applySampleRate(); return true; } @@ -453,14 +455,14 @@ void ATVDemodGUI::on_halfImage_clicked() void ATVDemodGUI::on_nbLines_currentIndexChanged(int index) { m_settings.m_nbLines = ATVDemodSettings::getNumberOfLines(index); - applyTVSampleRate(); + applySampleRate(); applySettings(); } void ATVDemodGUI::on_fps_currentIndexChanged(int index) { m_settings.m_fps = ATVDemodSettings::getFps(index); - applyTVSampleRate(); + applySampleRate(); applySettings(); } diff --git a/plugins/channelrx/demodatv/atvdemodgui.h b/plugins/channelrx/demodatv/atvdemodgui.h index 763eb37e8..331bc721b 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.h +++ b/plugins/channelrx/demodatv/atvdemodgui.h @@ -87,7 +87,7 @@ private: void displaySettings(); void displayStreamIndex(); void displayRFBandwidths(); - void applyTVSampleRate(); + void applySampleRate(); void setChannelMarkerBandwidth(); void setRFFiltersSlidersRange(int sampleRate); void lineTimeUpdate(); diff --git a/plugins/channelrx/demodatv/atvdemodgui.ui b/plugins/channelrx/demodatv/atvdemodgui.ui index 628836dca..d1d12528c 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.ui +++ b/plugins/channelrx/demodatv/atvdemodgui.ui @@ -137,15 +137,15 @@ - 40 + 80 0 - Number of points (samples) per line + Number of integer points (samples) per line plus fractional part - 000p + 0000p+0.00 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter