mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-01 01:06:35 -04:00
Channel analyzer NG: fixes
This commit is contained in:
parent
524c7fbe7c
commit
ed08480226
@ -106,14 +106,31 @@ void ChannelAnalyzerNGGUI::displaySettings()
|
|||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
|
|
||||||
ui->useRationalDownsampler->setChecked(m_settings.m_downSample);
|
ui->useRationalDownsampler->setChecked(m_settings.m_downSample);
|
||||||
|
ui->channelSampleRate->setValue(m_settings.m_downSampleRate);
|
||||||
|
setNewFinalRate();
|
||||||
ui->BW->setValue(m_settings.m_bandwidth/100);
|
ui->BW->setValue(m_settings.m_bandwidth/100);
|
||||||
ui->lowCut->setValue(m_settings.m_lowCutoff/100);
|
ui->lowCut->setValue(m_settings.m_lowCutoff/100);
|
||||||
ui->deltaFrequency->setValue(m_settings.m_frequency);
|
ui->deltaFrequency->setValue(m_settings.m_frequency);
|
||||||
ui->spanLog2->setCurrentIndex(m_settings.m_spanLog2);
|
ui->spanLog2->setCurrentIndex(m_settings.m_spanLog2);
|
||||||
|
displayPLLSettings();
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
|
}
|
||||||
|
|
||||||
setNewFinalRate();
|
void ChannelAnalyzerNGGUI::displayPLLSettings()
|
||||||
|
{
|
||||||
|
if (m_settings.m_fll)
|
||||||
|
{
|
||||||
|
ui->pllPskOrder->setCurrentIndex(5);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
for(; ((m_settings.m_pllPskOrder>>i) & 1) == 0; i++);
|
||||||
|
ui->pllPskOrder->setCurrentIndex(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->pll->setChecked(m_settings.m_pll);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelAnalyzerNGGUI::setSpectrumDisplay()
|
void ChannelAnalyzerNGGUI::setSpectrumDisplay()
|
||||||
@ -163,6 +180,7 @@ bool ChannelAnalyzerNGGUI::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
qDebug() << "ChannelAnalyzerNGGUI::handleMessage: MsgReportChannelSampleRateChanged";
|
qDebug() << "ChannelAnalyzerNGGUI::handleMessage: MsgReportChannelSampleRateChanged";
|
||||||
ui->channelSampleRate->setValueRange(7, 2000U, m_channelAnalyzer->getInputSampleRate());
|
ui->channelSampleRate->setValueRange(7, 2000U, m_channelAnalyzer->getInputSampleRate());
|
||||||
|
ui->channelSampleRate->setValue(m_settings.m_downSampleRate);
|
||||||
setNewFinalRate();
|
setNewFinalRate();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -229,16 +247,18 @@ void ChannelAnalyzerNGGUI::on_pll_toggled(bool checked)
|
|||||||
ui->pll->setToolTip(tr("PLL lock"));
|
ui->pll->setToolTip(tr("PLL lock"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_settings.m_pll = checked;
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelAnalyzerNGGUI::on_pllPskOrder_currentIndexChanged(int index)
|
void ChannelAnalyzerNGGUI::on_pllPskOrder_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (index < 5)
|
if (index < 5) {
|
||||||
{
|
|
||||||
m_settings.m_pllPskOrder = (1<<index);
|
m_settings.m_pllPskOrder = (1<<index);
|
||||||
applySettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_settings.m_fll = (index == 5);
|
||||||
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelAnalyzerNGGUI::on_useRationalDownsampler_toggled(bool checked)
|
void ChannelAnalyzerNGGUI::on_useRationalDownsampler_toggled(bool checked)
|
||||||
|
@ -86,6 +86,7 @@ private:
|
|||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
void applySettings(bool force = false);
|
void applySettings(bool force = false);
|
||||||
void displaySettings();
|
void displaySettings();
|
||||||
|
void displayPLLSettings();
|
||||||
void setSpectrumDisplay();
|
void setSpectrumDisplay();
|
||||||
|
|
||||||
void leaveEvent(QEvent*);
|
void leaveEvent(QEvent*);
|
||||||
|
@ -42,6 +42,7 @@ PhaseLockComplex::PhaseLockComplex() :
|
|||||||
m_yIm(0.0),
|
m_yIm(0.0),
|
||||||
m_freq(0.0),
|
m_freq(0.0),
|
||||||
m_freqPrev(0.0),
|
m_freqPrev(0.0),
|
||||||
|
m_freqTest(0.0),
|
||||||
m_lockCount(0),
|
m_lockCount(0),
|
||||||
m_lockFreq(0.026f),
|
m_lockFreq(0.026f),
|
||||||
m_pskOrder(1),
|
m_pskOrder(1),
|
||||||
@ -110,6 +111,7 @@ void PhaseLockComplex::reset()
|
|||||||
m_yIm = 0.0f;
|
m_yIm = 0.0f;
|
||||||
m_freq = 0.0f;
|
m_freq = 0.0f;
|
||||||
m_freqPrev = 0.0f;
|
m_freqPrev = 0.0f;
|
||||||
|
m_freqTest = 0.0f;
|
||||||
m_lockCount = 0;
|
m_lockCount = 0;
|
||||||
m_lockTimeCount = 0;
|
m_lockTimeCount = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user