1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 18:43:28 -05:00

WDSP receiver: implemented SAM DSB/USB/LSB selection

This commit is contained in:
f4exb 2024-07-15 03:45:04 +02:00
parent c411e8fbf5
commit 3c337d6cf5
2 changed files with 27 additions and 11 deletions

View File

@ -409,15 +409,16 @@ void WDSPRxGUI::on_demod_currentIndexChanged(int index)
switch(m_settings.m_demod) switch(m_settings.m_demod)
{ {
case WDSPRxProfile::DemodSSB: case WDSPRxProfile::DemodSSB:
case WDSPRxProfile::DemodSAM:
break; break;
case WDSPRxProfile::DemodAM: case WDSPRxProfile::DemodAM:
case WDSPRxProfile::DemodSAM:
case WDSPRxProfile::DemodFMN: case WDSPRxProfile::DemodFMN:
m_settings.m_dsb = true; m_settings.m_dsb = true;
break; break;
default: default:
break; break;
} }
displaySettings(); displaySettings();
applyBandwidths(m_settings.m_profiles[m_settings.m_profileIndex].m_spanLog2, true); // does applySettings(true) applyBandwidths(m_settings.m_profiles[m_settings.m_profileIndex].m_spanLog2, true); // does applySettings(true)
} }
@ -829,6 +830,22 @@ void WDSPRxGUI::displaySettings()
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency()); ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
ui->fftWindow->setCurrentIndex(m_settings.m_profiles[m_settings.m_profileIndex].m_fftWindow); ui->fftWindow->setCurrentIndex(m_settings.m_profiles[m_settings.m_profileIndex].m_fftWindow);
// DSB enable/disable
switch(m_settings.m_demod)
{
case WDSPRxProfile::DemodSSB:
case WDSPRxProfile::DemodSAM:
ui->dsb->setEnabled(true);
break;
case WDSPRxProfile::DemodAM:
case WDSPRxProfile::DemodFMN:
ui->dsb->setEnabled(false);
break;
default:
ui->dsb->setEnabled(true);
break;
}
// Prevent uncontrolled triggering of applyBandwidths // Prevent uncontrolled triggering of applyBandwidths
ui->spanLog2->blockSignals(true); ui->spanLog2->blockSignals(true);
ui->dsb->blockSignals(true); ui->dsb->blockSignals(true);

View File

@ -451,17 +451,10 @@ void WDSPRxSink::applySettings(const WDSPRxSettings& settings, bool force)
if (settings.m_demod == WDSPRxProfile::DemodSSB) if (settings.m_demod == WDSPRxProfile::DemodSSB)
{ {
if (dsb) if (dsb) {
{
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_DSB); WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_DSB);
}
else
{
if (usb) {
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_USB);
} else { } else {
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_LSB); WDSP::RXA::SetMode(*m_rxa, usb ? WDSP::RXA::RXA_USB : WDSP::RXA::RXA_LSB);
}
} }
} }
else if (settings.m_demod == WDSPRxProfile::DemodAM) else if (settings.m_demod == WDSPRxProfile::DemodAM)
@ -471,6 +464,12 @@ void WDSPRxSink::applySettings(const WDSPRxSettings& settings, bool force)
else if (settings.m_demod == WDSPRxProfile::DemodSAM) else if (settings.m_demod == WDSPRxProfile::DemodSAM)
{ {
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_SAM); WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_SAM);
if (dsb) {
WDSP::AMD::SetAMDSBMode(*m_rxa, 0);
} else {
WDSP::AMD::SetAMDSBMode(*m_rxa, usb ? 2 : 1);
}
} }
else if (settings.m_demod == WDSPRxProfile::DemodFMN) else if (settings.m_demod == WDSPRxProfile::DemodFMN)
{ {