1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-13 03:41:47 -05:00

ATV Modulator: use consistent opposite sideband bandwidth

This commit is contained in:
f4exb 2017-03-16 12:01:46 +01:00
parent b76c246bcd
commit 836c3a56da
2 changed files with 6 additions and 6 deletions

View File

@ -266,7 +266,7 @@ void ATVModGUI::on_modulation_currentIndexChanged(int index)
ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000);
ui->rfOppBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000);
m_channelMarker.setBandwidth(ui->rfBW->value()*100000);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*200000);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*100000);
m_channelMarker.setSidebands(ChannelMarker::vlsb);
}
else if (index == (int) ATVMod::ATVModulationUSB)
@ -281,7 +281,7 @@ void ATVModGUI::on_modulation_currentIndexChanged(int index)
ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000);
ui->rfOppBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000);
m_channelMarker.setBandwidth(ui->rfBW->value()*100000);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*200000);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*100000);
m_channelMarker.setSidebands(ChannelMarker::vusb);
}
else
@ -329,11 +329,11 @@ void ATVModGUI::on_rfOppBW_valueChanged(int value)
if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationVestigialLSB)
{
m_channelMarker.setOppositeBandwidth(-ui->rfOppBW->value()*200000);
m_channelMarker.setOppositeBandwidth(-ui->rfOppBW->value()*100000);
}
else if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationVestigialUSB)
{
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*200000);
m_channelMarker.setOppositeBandwidth(ui->rfOppBW->value()*100000);
}
else
{

View File

@ -1270,10 +1270,10 @@ void GLSpectrum::applyChanges()
pw = dv->m_channelMarker->getLowCutoff();
nw = dv->m_channelMarker->getBandwidth() / 2;
} else if (sidebands == ChannelMarker::vusb) {
nw = -dv->m_channelMarker->getOppositeBandwidth() / 2; // negative bandwidth
nw = -dv->m_channelMarker->getOppositeBandwidth(); // negative bandwidth
pw = dv->m_channelMarker->getBandwidth(); // positive bandwidth
} else if (sidebands == ChannelMarker::vlsb) {
pw = dv->m_channelMarker->getOppositeBandwidth() / 2; // positive bandwidth
pw = dv->m_channelMarker->getOppositeBandwidth(); // positive bandwidth
nw = -dv->m_channelMarker->getBandwidth(); // negative bandwidth
} else {
pw = dsbw / 2;