mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
WDSP receiver: implemented SAM DSB/USB/LSB selection
This commit is contained in:
parent
c411e8fbf5
commit
3c337d6cf5
@ -409,15 +409,16 @@ void WDSPRxGUI::on_demod_currentIndexChanged(int index)
|
||||
switch(m_settings.m_demod)
|
||||
{
|
||||
case WDSPRxProfile::DemodSSB:
|
||||
case WDSPRxProfile::DemodSAM:
|
||||
break;
|
||||
case WDSPRxProfile::DemodAM:
|
||||
case WDSPRxProfile::DemodSAM:
|
||||
case WDSPRxProfile::DemodFMN:
|
||||
m_settings.m_dsb = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
displaySettings();
|
||||
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->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
|
||||
ui->spanLog2->blockSignals(true);
|
||||
ui->dsb->blockSignals(true);
|
||||
|
@ -451,17 +451,10 @@ void WDSPRxSink::applySettings(const WDSPRxSettings& settings, bool force)
|
||||
|
||||
if (settings.m_demod == WDSPRxProfile::DemodSSB)
|
||||
{
|
||||
if (dsb)
|
||||
{
|
||||
if (dsb) {
|
||||
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_DSB);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (usb) {
|
||||
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_USB);
|
||||
} else {
|
||||
WDSP::RXA::SetMode(*m_rxa, WDSP::RXA::RXA_LSB);
|
||||
}
|
||||
} else {
|
||||
WDSP::RXA::SetMode(*m_rxa, usb ? WDSP::RXA::RXA_USB : WDSP::RXA::RXA_LSB);
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user