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

SSB: space sliders ticks more evenly depending on spectrum sample rate

This commit is contained in:
f4exb 2017-12-01 00:28:47 +01:00
parent 06f49e1405
commit 21e52e33fb
2 changed files with 14 additions and 2 deletions

View File

@ -332,6 +332,8 @@ void SSBDemodGUI::applyBandwidths(bool force)
int bw = ui->BW->value();
int lw = ui->lowCut->value();
int bwMax = 480/(1<<spanLog2);
int tickInterval = m_spectrumRate / 1200;
tickInterval = tickInterval == 0 ? 1 : tickInterval;
qDebug() << "SSBDemodGUI::applyBandwidths:"
<< " dsb: " << dsb
@ -339,7 +341,11 @@ void SSBDemodGUI::applyBandwidths(bool force)
<< " m_spectrumRate: " << m_spectrumRate
<< " bw: " << bw
<< " lw: " << lw
<< " bwMax: " << bwMax;
<< " bwMax: " << bwMax
<< " tickInterval: " << tickInterval;
ui->BW->setTickInterval(tickInterval);
ui->lowCut->setTickInterval(tickInterval);
bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;

View File

@ -458,6 +458,8 @@ void SSBModGUI::applyBandwidths(bool force)
int bw = ui->BW->value();
int lw = ui->lowCut->value();
int bwMax = 480/(1<<spanLog2);
int tickInterval = m_spectrumRate / 1200;
tickInterval = tickInterval == 0 ? 1 : tickInterval;
qDebug() << "SSBModGUI::applyBandwidths:"
<< " dsb: " << dsb
@ -465,7 +467,11 @@ void SSBModGUI::applyBandwidths(bool force)
<< " m_spectrumRate: " << m_spectrumRate
<< " bw: " << bw
<< " lw: " << lw
<< " bwMax: " << bwMax;
<< " bwMax: " << bwMax
<< " tickInterval: " << tickInterval;
ui->BW->setTickInterval(tickInterval);
ui->lowCut->setTickInterval(tickInterval);
bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;