mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
SSB demod: corrected BW and Low cut sliders limits
This commit is contained in:
parent
5e0e3a01e1
commit
45261ce623
@ -369,26 +369,26 @@ bool SSBDemodGUI::setNewRate(int spanLog2)
|
|||||||
//m_rate = 48000 / (1<<spanLog2);
|
//m_rate = 48000 / (1<<spanLog2);
|
||||||
m_rate = m_ssbDemod->getSampleRate() / (1<<spanLog2);
|
m_rate = m_ssbDemod->getSampleRate() / (1<<spanLog2);
|
||||||
|
|
||||||
if (ui->BW->value() < -m_rate/100) {
|
if (ui->BW->value() < -m_rate/200) {
|
||||||
ui->BW->setValue(-m_rate/100);
|
ui->BW->setValue(-m_rate/200);
|
||||||
m_channelMarker.setBandwidth(-m_rate*2);
|
m_channelMarker.setBandwidth(-m_rate*2);
|
||||||
} else if (ui->BW->value() > m_rate/100) {
|
} else if (ui->BW->value() > m_rate/200) {
|
||||||
ui->BW->setValue(m_rate/100);
|
ui->BW->setValue(m_rate/200);
|
||||||
m_channelMarker.setBandwidth(m_rate*2);
|
m_channelMarker.setBandwidth(m_rate*2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ui->lowCut->value() < -m_rate/100) {
|
if (ui->lowCut->value() < -m_rate/200) {
|
||||||
ui->lowCut->setValue(-m_rate/100);
|
ui->lowCut->setValue(-m_rate/200);
|
||||||
m_channelMarker.setLowCutoff(-m_rate);
|
m_channelMarker.setLowCutoff(-m_rate);
|
||||||
} else if (ui->lowCut->value() > m_rate/100) {
|
} else if (ui->lowCut->value() > m_rate/200) {
|
||||||
ui->lowCut->setValue(m_rate/100);
|
ui->lowCut->setValue(m_rate/200);
|
||||||
m_channelMarker.setLowCutoff(m_rate);
|
m_channelMarker.setLowCutoff(m_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->BW->setMinimum(-m_rate/100);
|
ui->BW->setMinimum(-m_rate/200);
|
||||||
ui->lowCut->setMinimum(-m_rate/100);
|
ui->lowCut->setMinimum(-m_rate/200);
|
||||||
ui->BW->setMaximum(m_rate/100);
|
ui->BW->setMaximum(m_rate/200);
|
||||||
ui->lowCut->setMaximum(m_rate/100);
|
ui->lowCut->setMaximum(m_rate/200);
|
||||||
|
|
||||||
QString s = QString::number(m_rate/1000.0, 'f', 1);
|
QString s = QString::number(m_rate/1000.0, 'f', 1);
|
||||||
ui->spanText->setText(tr("%1k").arg(s));
|
ui->spanText->setText(tr("%1k").arg(s));
|
||||||
|
Loading…
Reference in New Issue
Block a user