mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-10-08 00:00:42 -04:00
Interferometer and BladeRF2 MIMO fixes
This commit is contained in:
@@ -490,6 +490,7 @@ void BladeRF2MIMOGui::on_sampleRate_changed(quint64 value)
|
||||
}
|
||||
}
|
||||
|
||||
displaySampleRate();
|
||||
displayFcTooltip();
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
@@ -129,17 +129,26 @@ void BladeRF2MIThread::callback(const qint16* buf, qint32 samplesPerChannel)
|
||||
}
|
||||
|
||||
std::vector<SampleVector::const_iterator> vbegin;
|
||||
int lengths[2];
|
||||
|
||||
for (unsigned int channel = 0; channel < 2; channel++)
|
||||
{
|
||||
channelCallback(&buf[2*samplesPerChannel*channel], 2*samplesPerChannel, channel);
|
||||
lengths[channel] = channelCallback(&buf[2*samplesPerChannel*channel], 2*samplesPerChannel, channel);
|
||||
vbegin.push_back(m_convertBuffer[channel].begin());
|
||||
}
|
||||
|
||||
m_sampleFifo->writeSync(vbegin, samplesPerChannel/(1<<m_log2Decim));
|
||||
if (lengths[0] == lengths[1])
|
||||
{
|
||||
m_sampleFifo->writeSync(vbegin, lengths[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning("BladeRF2MIThread::callback: unequal channel lengths: [0]=%d [1]=%d", lengths[0], lengths[1]);
|
||||
m_sampleFifo->writeSync(vbegin, std::min(lengths[0], lengths[1]));
|
||||
}
|
||||
}
|
||||
|
||||
void BladeRF2MIThread::channelCallback(const qint16* buf, qint32 len, int channel)
|
||||
int BladeRF2MIThread::channelCallback(const qint16* buf, qint32 len, int channel)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer[channel].begin();
|
||||
|
||||
@@ -228,4 +237,6 @@ void BladeRF2MIThread::channelCallback(const qint16* buf, qint32 len, int channe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return it - m_convertBuffer[channel].begin();
|
||||
}
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
|
||||
void run();
|
||||
void callback(const qint16* buf, qint32 samplesPerChannel);
|
||||
void channelCallback(const qint16* buf, qint32 len, int channel);
|
||||
int channelCallback(const qint16* buf, qint32 len, int channel);
|
||||
};
|
||||
|
||||
#endif // PLUGINS_SAMPLEMIMO_BLADERF2MIMO_BLADERF2MITHREAD_H_
|
||||
|
||||
Reference in New Issue
Block a user