1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00

Channel Analyzer NG: handle rational downsampler in the GUI

This commit is contained in:
f4exb 2017-03-01 05:37:37 +01:00
parent 2008b5fbde
commit 5dfe2a7a2a
3 changed files with 20 additions and 1 deletions

View File

@ -190,10 +190,26 @@ void ChannelAnalyzerNGGUI::on_deltaMinus_toggled(bool minus)
}
}
void ChannelAnalyzerNGGUI::on_channelSampleRate_changed(quint64 value)
{
if (ui->useRationalDownsampler->isChecked())
{
qDebug("ChannelAnalyzerNGGUI::on_channelSampleRate_changed: %llu", value);
setNewFinalRate(m_spanLog2);
applySettings();
}
}
void ChannelAnalyzerNGGUI::on_useRationalDownsampler_toggled(bool checked)
{
setNewFinalRate(m_spanLog2);
applySettings();
}
int ChannelAnalyzerNGGUI::getRequestedChannelSampleRate()
{
if (ui->useRationalDownsampler->isChecked()) {
return ui->channelSampleRate->getValue();
return ui->channelSampleRate->getValueNew();
} else {
return m_channelizer->getInputSampleRate();
}

View File

@ -61,6 +61,8 @@ private slots:
void channelizerInputSampleRateChanged();
void on_deltaFrequency_changed(quint64 value);
void on_deltaMinus_toggled(bool minus);
void on_channelSampleRate_changed(quint64 value);
void on_useRationalDownsampler_toggled(bool checked);
void on_BW_valueChanged(int value);
void on_lowCut_valueChanged(int value);
void on_spanLog2_currentIndexChanged(int index);

View File

@ -32,6 +32,7 @@ public:
void setBold(bool bold);
void setColorMapper(ColorMapper colorMapper);
quint64 getValue() const { return m_value; }
quint64 getValueNew() const { return m_valueNew; }
signals:
void changed(quint64 value);