1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-27 15:26:33 -04:00

LimeSDR: added soft decimation/interpolation by 64

This commit is contained in:
f4exb 2017-05-08 17:30:08 +02:00
parent a159e72e20
commit 10cbfb3b44
8 changed files with 47 additions and 28 deletions

View File

@ -395,7 +395,7 @@ void LimeSDROutputGUI::on_hwInterp_currentIndexChanged(int index)
void LimeSDROutputGUI::on_swInterp_currentIndexChanged(int index)
{
if ((index <0) || (index > 5))
if ((index <0) || (index > 6))
return;
m_settings.m_log2SoftInterp = index;
sendSettings();

View File

@ -295,7 +295,7 @@
<string>TSP hardware interpolation factor</string>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<item>
<property name="text">
@ -383,6 +383,11 @@
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</item>
<item>

View File

@ -30,7 +30,7 @@
const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
QString("LimeSDR Output"),
QString("3.4.0"),
QString("3.4.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -84,9 +84,9 @@ void LimeSDROutputThread::run()
}
count = 0;
msleep = LIMESDROUTPUT_BLOCKSIZE/(m_sampleRate/1e6f);
mdelta = msleep/100;
msleep = (3*msleep)/4; // to start faster
// msleep = LIMESDROUTPUT_BLOCKSIZE/(m_sampleRate/1e6f);
// mdelta = msleep/100;
// msleep = (3*msleep)/4; // to start faster
while (m_running)
{
@ -104,25 +104,25 @@ void LimeSDROutputThread::run()
qDebug("LimeSDROutputThread::run written %d/%d samples", res, LIMESDROUTPUT_BLOCKSIZE);
}
usleep(msleep);
if (count < 10)
{
count++;
}
else
{
if (LMS_GetStreamStatus(m_stream, &streamStatus) == 0)
{
if (streamStatus.fifoFilledCount < (4*streamStatus.fifoSize)/5) { // FIFO at 80%
msleep -= mdelta;
} else {
msleep += mdelta;
}
}
count = 0;
}
// usleep(msleep);
//
// if (count < 10)
// {
// count++;
// }
// else
// {
// if (LMS_GetStreamStatus(m_stream, &streamStatus) == 0)
// {
// if (streamStatus.fifoFilledCount < (4*streamStatus.fifoSize)/5) { // FIFO at 80%
// msleep -= mdelta;
// } else {
// msleep += mdelta;
// }
// }
//
// count = 0;
// }
}
if (LMS_StopStream(m_stream) < 0) {

View File

@ -427,7 +427,7 @@ void LimeSDRInputGUI::on_hwDecim_currentIndexChanged(int index)
void LimeSDRInputGUI::on_swDecim_currentIndexChanged(int index)
{
if ((index <0) || (index > 5))
if ((index <0) || (index > 6))
return;
m_settings.m_log2SoftDecim = index;
sendSettings();

View File

@ -330,7 +330,7 @@
<string>TSP hardware decimation factor</string>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<item>
<property name="text">
@ -418,6 +418,11 @@
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</item>
<item>

View File

@ -31,7 +31,7 @@
const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = {
QString("LimeSDR Input"),
QString("3.4.0"),
QString("3.4.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -132,6 +132,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len)
case 5:
m_decimators.decimate32_inf(&it, buf, len);
break;
case 6:
m_decimators.decimate64_inf(&it, buf, len);
break;
default:
break;
}
@ -155,6 +158,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len)
case 5:
m_decimators.decimate32_sup(&it, buf, len);
break;
case 6:
m_decimators.decimate64_sup(&it, buf, len);
break;
default:
break;
}
@ -178,6 +184,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len)
case 5:
m_decimators.decimate32_cen(&it, buf, len);
break;
case 6:
m_decimators.decimate64_cen(&it, buf, len);
break;
default:
break;
}