1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

LimeSDR input: added DAC sample rate display

This commit is contained in:
f4exb
2017-07-07 00:01:01 +02:00
parent 77e11004b0
commit 62b6281370
8 changed files with 102 additions and 48 deletions
@@ -244,6 +244,17 @@ void LimeSDRInputGUI::handleMessagesToGUI()
}
}
void LimeSDRInputGUI::updateADCRate()
{
uint32_t adcRate = m_settings.m_devSampleRate * (1<<m_settings.m_log2HardDecim);
if (adcRate < 100000000) {
ui->adcRateLabel->setText(tr("%1k").arg(QString::number(adcRate / 1000.0f, 'g', 5)));
} else {
ui->adcRateLabel->setText(tr("%1M").arg(QString::number(adcRate / 1000000.0f, 'g', 5)));
}
}
void LimeSDRInputGUI::updateSampleRateAndFrequency()
{
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
@@ -262,6 +273,8 @@ void LimeSDRInputGUI::displaySettings()
ui->hwDecim->setCurrentIndex(m_settings.m_log2HardDecim);
ui->swDecim->setCurrentIndex(m_settings.m_log2SoftDecim);
updateADCRate();
ui->lpf->setValue(m_settings.m_lpfBW / 1000);
ui->lpFIREnable->setChecked(m_settings.m_lpfFIREnable);
@@ -456,6 +469,7 @@ void LimeSDRInputGUI::on_iqImbalance_toggled(bool checked)
void LimeSDRInputGUI::on_sampleRate_changed(quint64 value)
{
m_settings.m_devSampleRate = value;
updateADCRate();
setNCODisplay();
sendSettings();}
@@ -464,6 +478,7 @@ void LimeSDRInputGUI::on_hwDecim_currentIndexChanged(int index)
if ((index <0) || (index > 5))
return;
m_settings.m_log2HardDecim = index;
updateADCRate();
setNCODisplay();
sendSettings();
}