mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
ATV Demod: arbitrary sample rate: GUI changes
This commit is contained in:
parent
2c2ec0327c
commit
a2a584440c
@ -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();
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ private:
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void displayRFBandwidths();
|
||||
void applyTVSampleRate();
|
||||
void applySampleRate();
|
||||
void setChannelMarkerBandwidth();
|
||||
void setRFFiltersSlidersRange(int sampleRate);
|
||||
void lineTimeUpdate();
|
||||
|
@ -137,15 +137,15 @@
|
||||
<widget class="QLabel" name="nbPointsPerLineText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Number of points (samples) per line</string>
|
||||
<string>Number of integer points (samples) per line plus fractional part</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>000p</string>
|
||||
<string>0000p+0.00</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
Loading…
Reference in New Issue
Block a user