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

FreeDV demod: added 700C. More filter fixes

This commit is contained in:
f4exb 2019-02-27 01:56:27 +01:00
parent 7759f9cebc
commit fdbe8a6b59
9 changed files with 32 additions and 11 deletions

View File

@ -454,6 +454,10 @@ void FreeDVDemod::applyFreeDVMode(FreeDVDemodSettings::FreeDVMode mode)
switch(mode) switch(mode)
{ {
case FreeDVDemodSettings::FreeDVMode700C:
fdv_mode = FREEDV_MODE_700C;
m_scaleFactor = SDR_RX_SCALEF / 3.2f;
break;
case FreeDVDemodSettings::FreeDVMode700D: case FreeDVDemodSettings::FreeDVMode700D:
fdv_mode = FREEDV_MODE_700D; fdv_mode = FREEDV_MODE_700D;
m_scaleFactor = SDR_RX_SCALEF / 3.2f; m_scaleFactor = SDR_RX_SCALEF / 3.2f;

View File

@ -192,6 +192,11 @@
<string>800XA</string> <string>800XA</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>700C</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>700D</string> <string>700D</string>

View File

@ -162,9 +162,10 @@ int FreeDVDemodSettings::getHiCutoff(FreeDVMode freeDVMode)
case FreeDVMode800XA: // C4FM NB case FreeDVMode800XA: // C4FM NB
return 2400.0; return 2400.0;
break; break;
case FreeDVMode700C: // OFDM
case FreeDVMode700D: // OFDM case FreeDVMode700D: // OFDM
case FreeDVMode1600: // OFDM case FreeDVMode1600: // OFDM
return 2200.0; return 2400.0;
break; break;
case FreeDVMode2400A: // C4FM WB case FreeDVMode2400A: // C4FM WB
default: default:
@ -180,9 +181,10 @@ int FreeDVDemodSettings::getLowCutoff(FreeDVMode freeDVMode)
case FreeDVMode800XA: // C4FM NB case FreeDVMode800XA: // C4FM NB
return 400.0; return 400.0;
break; break;
case FreeDVMode700C: // OFDM
case FreeDVMode700D: // OFDM case FreeDVMode700D: // OFDM
case FreeDVMode1600: // OFDM case FreeDVMode1600: // OFDM
return 800.0; return 600.0;
break; break;
case FreeDVMode2400A: // C4FM WB case FreeDVMode2400A: // C4FM WB
default: default:

View File

@ -30,7 +30,8 @@ struct FreeDVDemodSettings
FreeDVMode2400A, FreeDVMode2400A,
FreeDVMode1600, FreeDVMode1600,
FreeDVMode800XA, FreeDVMode800XA,
FreeDVMode700D FreeDVMode700C,
FreeDVMode700D,
} FreeDVMode; } FreeDVMode;
qint32 m_inputFrequencyOffset; qint32 m_inputFrequencyOffset;

View File

@ -648,6 +648,10 @@ void FreeDVMod::applyFreeDVMode(FreeDVModSettings::FreeDVMode mode)
switch(mode) switch(mode)
{ {
case FreeDVModSettings::FreeDVMode700C:
fdv_mode = FREEDV_MODE_700C;
m_scaleFactor = SDR_TX_SCALEF / 3.2f;
break;
case FreeDVModSettings::FreeDVMode700D: case FreeDVModSettings::FreeDVMode700D:
fdv_mode = FREEDV_MODE_700D; fdv_mode = FREEDV_MODE_700D;
m_scaleFactor = SDR_TX_SCALEF / 3.2f; m_scaleFactor = SDR_TX_SCALEF / 3.2f;

View File

@ -114,7 +114,7 @@ bool FreeDVModGUI::handleMessage(const Message& message)
} }
else if (DSPConfigureAudio::match(message)) else if (DSPConfigureAudio::match(message))
{ {
qDebug("FreeDVModGUI::handleMessage: DSPConfigureAudio: %d", m_freeDVMod->getAudioSampleRate()); qDebug("FreeDVModGUI::handleMessage: DSPConfigureAudio: %d", m_freeDVMod->getModemSampleRate());
applyBandwidths(5 - ui->spanLog2->value()); // will update spectrum details with new sample rate applyBandwidths(5 - ui->spanLog2->value()); // will update spectrum details with new sample rate
return true; return true;
} }
@ -464,14 +464,11 @@ void FreeDVModGUI::displaySettings()
// Prevent uncontrolled triggering of applyBandwidths // Prevent uncontrolled triggering of applyBandwidths
ui->spanLog2->blockSignals(true); ui->spanLog2->blockSignals(true);
ui->spanLog2->setValue(5 - m_settings.m_spanLog2); ui->spanLog2->setValue(5 - m_settings.m_spanLog2);
ui->gaugeInput->setChecked(m_settings.m_gaugeInputElseModem);
QString s = QString::number(m_freeDVMod->getHiCutoff()/1000.0, 'f', 1);
ui->spanLog2->blockSignals(false); ui->spanLog2->blockSignals(false);
ui->gaugeInput->setChecked(m_settings.m_gaugeInputElseModem);
// The only one of the four signals triggering applyBandwidths will trigger it once only with all other values // The only one of the four signals triggering applyBandwidths will trigger it once only with all other values
// set correctly and therefore validate the settings and apply them to dependent widgets // set correctly and therefore validate the settings and apply them to dependent widgets

View File

@ -405,6 +405,11 @@
<string>800XA</string> <string>800XA</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>700C</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>700D</string> <string>700D</string>

View File

@ -178,9 +178,10 @@ int FreeDVModSettings::getHiCutoff(FreeDVMode freeDVMode)
case FreeDVModSettings::FreeDVMode800XA: // C4FM NB case FreeDVModSettings::FreeDVMode800XA: // C4FM NB
return 2400.0; return 2400.0;
break; break;
case FreeDVModSettings::FreeDVMode700C: // OFDM
case FreeDVModSettings::FreeDVMode700D: // OFDM case FreeDVModSettings::FreeDVMode700D: // OFDM
case FreeDVModSettings::FreeDVMode1600: // OFDM case FreeDVModSettings::FreeDVMode1600: // OFDM
return 2200.0; return 2400.0;
break; break;
case FreeDVModSettings::FreeDVMode2400A: // C4FM WB case FreeDVModSettings::FreeDVMode2400A: // C4FM WB
default: default:
@ -196,9 +197,10 @@ int FreeDVModSettings::getLowCutoff(FreeDVMode freeDVMode)
case FreeDVModSettings::FreeDVMode800XA: // C4FM NB case FreeDVModSettings::FreeDVMode800XA: // C4FM NB
return 400.0; return 400.0;
break; break;
case FreeDVModSettings::FreeDVMode700C: // OFDM
case FreeDVModSettings::FreeDVMode700D: // OFDM case FreeDVModSettings::FreeDVMode700D: // OFDM
case FreeDVModSettings::FreeDVMode1600: // OFDM case FreeDVModSettings::FreeDVMode1600: // OFDM
return 800.0; return 600.0;
break; break;
case FreeDVModSettings::FreeDVMode2400A: // C4FM WB case FreeDVModSettings::FreeDVMode2400A: // C4FM WB
default: default:

View File

@ -39,6 +39,7 @@ struct FreeDVModSettings
FreeDVMode2400A, FreeDVMode2400A,
FreeDVMode1600, FreeDVMode1600,
FreeDVMode800XA, FreeDVMode800XA,
FreeDVMode700C,
FreeDVMode700D FreeDVMode700D
} FreeDVMode; } FreeDVMode;