XTRX input: removed useless settings including Fc pos (useless because of NCO)

This commit is contained in:
f4exb 2018-12-30 10:18:57 +01:00
parent ecaa7f61b0
commit 2eb78ebad8
5 changed files with 21 additions and 100 deletions

View File

@ -1114,8 +1114,6 @@ bool XTRXInput::applySettings(const XTRXInputSettings& settings, bool force, boo
<< " sample rate with soft decimation: " << m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftDecim) << "S/s" << " sample rate with soft decimation: " << m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftDecim) << "S/s"
<< " m_gain: " << m_settings.m_gain << " m_gain: " << m_settings.m_gain
<< " m_lpfBW: " << m_settings.m_lpfBW << " m_lpfBW: " << m_settings.m_lpfBW
<< " m_lpfFIRBW: " << m_settings.m_lpfFIRBW
<< " m_lpfFIREnable: " << m_settings.m_lpfFIREnable
<< " m_ncoEnable: " << m_settings.m_ncoEnable << " m_ncoEnable: " << m_settings.m_ncoEnable
<< " m_ncoFrequency: " << m_settings.m_ncoFrequency << " m_ncoFrequency: " << m_settings.m_ncoFrequency
<< " m_antennaPath: " << m_settings.m_antennaPath << " m_antennaPath: " << m_settings.m_antennaPath

View File

@ -31,8 +31,6 @@ void XTRXInputSettings::resetToDefaults()
m_iqCorrection = false; m_iqCorrection = false;
m_log2SoftDecim = 0; m_log2SoftDecim = 0;
m_lpfBW = 4.5e6f; m_lpfBW = 4.5e6f;
m_lpfFIREnable = false;
m_lpfFIRBW = 2.5e6f;
m_gain = 50; m_gain = 50;
m_ncoEnable = false; m_ncoEnable = false;
m_ncoFrequency = 0; m_ncoFrequency = 0;
@ -56,8 +54,6 @@ QByteArray XTRXInputSettings::serialize() const
s.writeBool(4, m_iqCorrection); s.writeBool(4, m_iqCorrection);
s.writeU32(5, m_log2SoftDecim); s.writeU32(5, m_log2SoftDecim);
s.writeFloat(7, m_lpfBW); s.writeFloat(7, m_lpfBW);
s.writeBool(8, m_lpfFIREnable);
s.writeFloat(9, m_lpfFIRBW);
s.writeU32(10, m_gain); s.writeU32(10, m_gain);
s.writeBool(11, m_ncoEnable); s.writeBool(11, m_ncoEnable);
s.writeS32(12, m_ncoFrequency); s.writeS32(12, m_ncoFrequency);
@ -93,8 +89,6 @@ bool XTRXInputSettings::deserialize(const QByteArray& data)
d.readBool(4, &m_iqCorrection, false); d.readBool(4, &m_iqCorrection, false);
d.readU32(5, &m_log2SoftDecim, 0); d.readU32(5, &m_log2SoftDecim, 0);
d.readFloat(7, &m_lpfBW, 1.5e6); d.readFloat(7, &m_lpfBW, 1.5e6);
d.readBool(8, &m_lpfFIREnable, false);
d.readFloat(9, &m_lpfFIRBW, 1.5e6);
d.readU32(10, &m_gain, 50); d.readU32(10, &m_gain, 50);
d.readBool(11, &m_ncoEnable, false); d.readBool(11, &m_ncoEnable, false);
d.readS32(12, &m_ncoFrequency, 0); d.readS32(12, &m_ncoFrequency, 0);

View File

@ -28,12 +28,6 @@
*/ */
struct XTRXInputSettings struct XTRXInputSettings
{ {
typedef enum {
FC_POS_INFRA = 0,
FC_POS_SUPRA,
FC_POS_CENTER
} fcPos_t;
typedef enum { typedef enum {
GAIN_AUTO, GAIN_AUTO,
GAIN_MANUAL GAIN_MANUAL
@ -48,8 +42,6 @@ struct XTRXInputSettings
bool m_iqCorrection; bool m_iqCorrection;
uint32_t m_log2SoftDecim; uint32_t m_log2SoftDecim;
float m_lpfBW; //!< LMS amalog lowpass filter bandwidth (Hz) float m_lpfBW; //!< LMS amalog lowpass filter bandwidth (Hz)
bool m_lpfFIREnable; //!< Enable LMS digital lowpass FIR filters
float m_lpfFIRBW; //!< LMS digital lowpass FIR filters bandwidth (Hz)
uint32_t m_gain; //!< Optimally distributed gain (dB) uint32_t m_gain; //!< Optimally distributed gain (dB)
bool m_ncoEnable; //!< Enable TSP NCO and mixing bool m_ncoEnable; //!< Enable TSP NCO and mixing
int m_ncoFrequency; //!< Actual NCO frequency (the resulting frequency with mixing is displayed) int m_ncoFrequency; //!< Actual NCO frequency (the resulting frequency with mixing is displayed)

View File

@ -28,7 +28,6 @@ XTRXInputThread::XTRXInputThread(DeviceXTRXShared* shared,
m_convertBuffer(XTRX_BLOCKSIZE), m_convertBuffer(XTRX_BLOCKSIZE),
m_sampleFifo(sampleFifo), m_sampleFifo(sampleFifo),
m_log2Decim(0), m_log2Decim(0),
m_fcPos(XTRXInputSettings::FC_POS_CENTER),
m_shared(shared) m_shared(shared)
{ {
} }
@ -69,11 +68,6 @@ void XTRXInputThread::setLog2Decimation(unsigned int log2_decim)
m_log2Decim = log2_decim; m_log2Decim = log2_decim;
} }
void XTRXInputThread::setFcPos(int fcPos)
{
m_fcPos = fcPos;
}
void XTRXInputThread::run() void XTRXInputThread::run()
{ {
int res; int res;
@ -157,83 +151,28 @@ void XTRXInputThread::callback(const qint16* buf, qint32 len)
} }
else else
{ {
if (m_fcPos == 0) // Infra switch (m_log2Decim)
{ {
switch (m_log2Decim) case 1:
{ m_decimators.decimate2_cen(&it, buf, len);
case 1: break;
m_decimators.decimate2_inf(&it, buf, len); case 2:
break; m_decimators.decimate4_cen(&it, buf, len);
case 2: break;
m_decimators.decimate4_inf(&it, buf, len); case 3:
break; m_decimators.decimate8_cen(&it, buf, len);
case 3: break;
m_decimators.decimate8_inf(&it, buf, len); case 4:
break; m_decimators.decimate16_cen(&it, buf, len);
case 4: break;
m_decimators.decimate16_inf(&it, buf, len); case 5:
break; m_decimators.decimate32_cen(&it, buf, len);
case 5: break;
m_decimators.decimate32_inf(&it, buf, len); case 6:
break; m_decimators.decimate64_cen(&it, buf, len);
case 6: break;
m_decimators.decimate64_inf(&it, buf, len); default:
break; break;
default:
break;
}
}
else if (m_fcPos == 1) // Supra
{
switch (m_log2Decim)
{
case 1:
m_decimators.decimate2_sup(&it, buf, len);
break;
case 2:
m_decimators.decimate4_sup(&it, buf, len);
break;
case 3:
m_decimators.decimate8_sup(&it, buf, len);
break;
case 4:
m_decimators.decimate16_sup(&it, buf, len);
break;
case 5:
m_decimators.decimate32_sup(&it, buf, len);
break;
case 6:
m_decimators.decimate64_sup(&it, buf, len);
break;
default:
break;
}
}
else if (m_fcPos == 2) // Center
{
switch (m_log2Decim)
{
case 1:
m_decimators.decimate2_cen(&it, buf, len);
break;
case 2:
m_decimators.decimate4_cen(&it, buf, len);
break;
case 3:
m_decimators.decimate8_cen(&it, buf, len);
break;
case 4:
m_decimators.decimate16_cen(&it, buf, len);
break;
case 5:
m_decimators.decimate32_cen(&it, buf, len);
break;
case 6:
m_decimators.decimate64_cen(&it, buf, len);
break;
default:
break;
}
} }
} }

View File

@ -43,7 +43,6 @@ public:
virtual void setDeviceSampleRate(int sampleRate __attribute__((unused))) {} virtual void setDeviceSampleRate(int sampleRate __attribute__((unused))) {}
virtual bool isRunning() { return m_running; } virtual bool isRunning() { return m_running; }
void setLog2Decimation(unsigned int log2_decim); void setLog2Decimation(unsigned int log2_decim);
void setFcPos(int fcPos);
private: private:
QMutex m_startWaitMutex; QMutex m_startWaitMutex;
@ -55,7 +54,6 @@ private:
SampleSinkFifo* m_sampleFifo; SampleSinkFifo* m_sampleFifo;
unsigned int m_log2Decim; // soft decimation unsigned int m_log2Decim; // soft decimation
int m_fcPos;
Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 12> m_decimators; Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 12> m_decimators;