mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 06:04:39 -04:00
MIMO: add channel to TestMI (1)
This commit is contained in:
@@ -38,7 +38,7 @@ TestMIThread::TestMIThread(SampleSinkFifo* sampleFifo, QObject* parent) :
|
||||
m_sampleFifo(sampleFifo),
|
||||
m_frequencyShift(0),
|
||||
m_toneFrequency(440),
|
||||
m_modulation(TestMISettings::ModulationNone),
|
||||
m_modulation(TestMIStreamSettings::ModulationNone),
|
||||
m_amModulation(0.5f),
|
||||
m_fmDeviationUnit(0.0f),
|
||||
m_fmPhasor(0.0f),
|
||||
@@ -176,7 +176,7 @@ void TestMIThread::setToneFrequency(int toneFrequency)
|
||||
m_toneNco.setFreq(toneFrequency, m_samplerate);
|
||||
}
|
||||
|
||||
void TestMIThread::setModulation(TestMISettings::Modulation modulation)
|
||||
void TestMIThread::setModulation(TestMIStreamSettings::Modulation modulation)
|
||||
{
|
||||
m_modulation = modulation;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ void TestMIThread::generate(quint32 chunksize)
|
||||
{
|
||||
switch (m_modulation)
|
||||
{
|
||||
case TestMISettings::ModulationAM:
|
||||
case TestMIStreamSettings::ModulationAM:
|
||||
{
|
||||
Complex c = m_nco.nextIQ();
|
||||
Real t, re, im;
|
||||
@@ -259,7 +259,7 @@ void TestMIThread::generate(quint32 chunksize)
|
||||
m_buf[i++] = (int16_t) (im * (float) m_amplitudeBitsQ);
|
||||
}
|
||||
break;
|
||||
case TestMISettings::ModulationFM:
|
||||
case TestMIStreamSettings::ModulationFM:
|
||||
{
|
||||
Complex c = m_nco.nextIQ();
|
||||
Real t, re, im;
|
||||
@@ -272,7 +272,7 @@ void TestMIThread::generate(quint32 chunksize)
|
||||
m_buf[i++] = (int16_t) (im * (float) m_amplitudeBitsQ);
|
||||
}
|
||||
break;
|
||||
case TestMISettings::ModulationPattern0: // binary pattern
|
||||
case TestMIStreamSettings::ModulationPattern0: // binary pattern
|
||||
{
|
||||
if (m_pulseSampleCount < m_pulseWidth) // sync pattern: 0
|
||||
{
|
||||
@@ -314,7 +314,7 @@ void TestMIThread::generate(quint32 chunksize)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TestMISettings::ModulationPattern1: // sawtooth pattern
|
||||
case TestMIStreamSettings::ModulationPattern1: // sawtooth pattern
|
||||
{
|
||||
Real re, im;
|
||||
re = (float) (m_pulseWidth - m_pulseSampleCount) / (float) m_pulseWidth;
|
||||
@@ -329,7 +329,7 @@ void TestMIThread::generate(quint32 chunksize)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TestMISettings::ModulationPattern2: // 50% duty cycle square pattern
|
||||
case TestMIStreamSettings::ModulationPattern2: // 50% duty cycle square pattern
|
||||
{
|
||||
if (m_pulseSampleCount < m_pulseWidth) // 1
|
||||
{
|
||||
@@ -347,7 +347,7 @@ void TestMIThread::generate(quint32 chunksize)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TestMISettings::ModulationNone:
|
||||
case TestMIStreamSettings::ModulationNone:
|
||||
default:
|
||||
{
|
||||
Complex c = m_nco.nextIQ(m_phaseImbalance);
|
||||
|
||||
Reference in New Issue
Block a user