1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-14 12:22:00 -05:00

Corrected interpolator to alculate rational resampling for AM and WFM too. Revised and enhanced list of sampling rates. Change low tuning limit for XB200

This commit is contained in:
f4exb 2015-06-07 23:07:19 +02:00
parent 843997812b
commit 5904a6f926
5 changed files with 15 additions and 6 deletions

View File

@ -231,7 +231,7 @@ void AMDemod::apply()
(m_config.m_rfBandwidth != m_running.m_rfBandwidth)) { (m_config.m_rfBandwidth != m_running.m_rfBandwidth)) {
m_interpolator.create(16, m_config.m_inputSampleRate, m_config.m_rfBandwidth / 2.2); m_interpolator.create(16, m_config.m_inputSampleRate, m_config.m_rfBandwidth / 2.2);
m_interpolatorDistanceRemain = 0; m_interpolatorDistanceRemain = 0;
m_interpolatorDistance = m_config.m_inputSampleRate / m_config.m_audioSampleRate; m_interpolatorDistance = (Real) m_config.m_inputSampleRate / (Real) m_config.m_audioSampleRate;
} }
if((m_config.m_afBandwidth != m_running.m_afBandwidth) || if((m_config.m_afBandwidth != m_running.m_afBandwidth) ||

View File

@ -286,7 +286,7 @@ void WFMDemod::apply()
{ {
m_interpolator.create(16, m_config.m_inputSampleRate, m_config.m_afBandwidth); m_interpolator.create(16, m_config.m_inputSampleRate, m_config.m_afBandwidth);
m_interpolatorDistanceRemain = (Real) m_config.m_inputSampleRate / m_config.m_audioSampleRate; m_interpolatorDistanceRemain = (Real) m_config.m_inputSampleRate / m_config.m_audioSampleRate;
m_interpolatorDistance = m_config.m_inputSampleRate / m_config.m_audioSampleRate; m_interpolatorDistance = (Real) m_config.m_inputSampleRate / (Real) m_config.m_audioSampleRate;
} }
if((m_config.m_inputSampleRate != m_running.m_inputSampleRate) || if((m_config.m_inputSampleRate != m_running.m_inputSampleRate) ||

View File

@ -259,6 +259,15 @@ void BladerfGui::on_xb200_currentIndexChanged(int index)
m_settings.m_xb200 = false; m_settings.m_xb200 = false;
} }
if (m_settings.m_xb200)
{
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000);
}
else
{
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN/1000, BLADERF_FREQUENCY_MAX/1000);
}
sendSettings(); sendSettings();
} }
@ -315,8 +324,8 @@ unsigned int BladerfGui::getXb200Index(bool xb_200, bladerf_xb200_path xb200Path
} }
} }
unsigned int BladerfSampleRates::m_rates[] = {384, 768, 1536, 2304, 3072, 6144, 12288, 24576, 30720, 39936}; unsigned int BladerfSampleRates::m_rates[] = {384, 768, 1536, 2304, 3072, 4608, 6144, 9216, 12288, 18432, 24576, 30720, 36864, 39936};
unsigned int BladerfSampleRates::m_nb_rates = 10; unsigned int BladerfSampleRates::m_nb_rates = 14;
unsigned int BladerfSampleRates::getRate(unsigned int rate_index) unsigned int BladerfSampleRates::getRate(unsigned int rate_index)
{ {

View File

@ -79,7 +79,7 @@ public:
static unsigned int getRate(unsigned int rate_index); static unsigned int getRate(unsigned int rate_index);
static unsigned int getRateIndex(unsigned int rate); static unsigned int getRateIndex(unsigned int rate);
private: private:
static unsigned int m_rates[10]; static unsigned int m_rates[14];
static unsigned int m_nb_rates; static unsigned int m_nb_rates;
}; };

View File

@ -201,7 +201,7 @@
<string>Device Samplerate</string> <string>Device Samplerate</string>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>9</number> <number>13</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>1</number> <number>1</number>