mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-26 05:55:35 -04:00
SSB channels: fix the fixes (2)
This commit is contained in:
parent
3bdddb5818
commit
465416ee19
@ -260,7 +260,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget
|
|||||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applyBandwidths(true);
|
applyBandwidths(true); // does applySettings(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
SSBDemodGUI::~SSBDemodGUI()
|
SSBDemodGUI::~SSBDemodGUI()
|
||||||
@ -303,6 +303,14 @@ void SSBDemodGUI::applyBandwidths(bool force)
|
|||||||
int lw = ui->lowCut->value();
|
int lw = ui->lowCut->value();
|
||||||
int bwMax = 480/(1<<spanLog2);
|
int bwMax = 480/(1<<spanLog2);
|
||||||
|
|
||||||
|
qDebug() << "SSBDemodGUI::applyBandwidths:"
|
||||||
|
<< " dsb: " << dsb
|
||||||
|
<< " spanLog2: " << spanLog2
|
||||||
|
<< " m_spectrumRate: " << m_spectrumRate
|
||||||
|
<< " bw: " << bw
|
||||||
|
<< " lw: " << lw
|
||||||
|
<< " bwMax: " << bwMax;
|
||||||
|
|
||||||
bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;
|
bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;
|
||||||
|
|
||||||
if (bw < 0) {
|
if (bw < 0) {
|
||||||
|
@ -80,15 +80,16 @@ bool SSBModGUI::deserialize(const QByteArray& data)
|
|||||||
{
|
{
|
||||||
if(m_settings.deserialize(data))
|
if(m_settings.deserialize(data))
|
||||||
{
|
{
|
||||||
|
qDebug("SSBModGUI::deserialize");
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true); // will have true
|
applyBandwidths(true); // does applySettings(true)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true); // will have true
|
applyBandwidths(true); // does applySettings(true)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -415,11 +416,11 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* pa
|
|||||||
m_settings.setSpectrumGUI(ui->spectrumGUI);
|
m_settings.setSpectrumGUI(ui->spectrumGUI);
|
||||||
m_settings.setCWKeyerGUI(ui->cwKeyerGUI);
|
m_settings.setCWKeyerGUI(ui->cwKeyerGUI);
|
||||||
|
|
||||||
displaySettings();
|
|
||||||
applyBandwidths(true); // does applySettings(true)
|
|
||||||
|
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
connect(m_ssbMod, SIGNAL(levelChanged(qreal, qreal, int)), ui->volumeMeter, SLOT(levelChanged(qreal, qreal, int)));
|
connect(m_ssbMod, SIGNAL(levelChanged(qreal, qreal, int)), ui->volumeMeter, SLOT(levelChanged(qreal, qreal, int)));
|
||||||
|
|
||||||
|
displaySettings();
|
||||||
|
applyBandwidths(true); // does applySettings(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
SSBModGUI::~SSBModGUI()
|
SSBModGUI::~SSBModGUI()
|
||||||
@ -459,6 +460,14 @@ void SSBModGUI::applyBandwidths(bool force)
|
|||||||
int lw = ui->lowCut->value();
|
int lw = ui->lowCut->value();
|
||||||
int bwMax = 480/(1<<spanLog2);
|
int bwMax = 480/(1<<spanLog2);
|
||||||
|
|
||||||
|
qDebug() << "SSBModGUI::applyBandwidths:"
|
||||||
|
<< " dsb: " << dsb
|
||||||
|
<< " spanLog2: " << spanLog2
|
||||||
|
<< " m_spectrumRate: " << m_spectrumRate
|
||||||
|
<< " bw: " << bw
|
||||||
|
<< " lw: " << lw
|
||||||
|
<< " bwMax: " << bwMax;
|
||||||
|
|
||||||
bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;
|
bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;
|
||||||
|
|
||||||
if (bw < 0) {
|
if (bw < 0) {
|
||||||
@ -530,7 +539,7 @@ void SSBModGUI::applyBandwidths(bool force)
|
|||||||
|
|
||||||
void SSBModGUI::displaySettings()
|
void SSBModGUI::displaySettings()
|
||||||
{
|
{
|
||||||
bool applySettingsWereBlocked = blockApplySettings(true);
|
bool applySettingsWereBlocked = blockApplySettings(true);
|
||||||
|
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user