From abd463d374e1086547b2780368c1b8cacf63bb8e Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 15 Mar 2017 05:05:42 +0100 Subject: [PATCH] ATV Modulator: SSB support in GUI --- plugins/channeltx/modatv/atvmod.h | 4 ++- plugins/channeltx/modatv/atvmodgui.cpp | 44 +++++++++++++++++++++-- plugins/channeltx/modatv/atvmodgui.ui | 10 ++++++ plugins/channeltx/modatv/atvmodplugin.cpp | 2 +- sdrbase/gui/aboutdialog.ui | 2 +- sdrbase/mainwindow.cpp | 4 +-- 6 files changed, 59 insertions(+), 7 deletions(-) diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 84d4dadc7..f4668f464 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -59,7 +59,9 @@ public: typedef enum { ATVModulationAM, - ATVModulationFM + ATVModulationFM, + ATVModulationUSB, + ATVModulationLSB } ATVModulation; class MsgConfigureImageFileName : public Message diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp index 14e60687b..0e108da41 100644 --- a/plugins/channeltx/modatv/atvmodgui.cpp +++ b/plugins/channeltx/modatv/atvmodgui.cpp @@ -201,7 +201,15 @@ void ATVModGUI::viewChanged() void ATVModGUI::channelizerOutputSampleRateChanged() { - ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 100000); + if ((ui->modulation->currentIndex() == (int) ATVMod::ATVModulationLSB) || + (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationUSB)) + { + ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000); + } + else + { + ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 100000); + } } void ATVModGUI::handleSourceMessages() @@ -239,13 +247,45 @@ void ATVModGUI::on_deltaFrequency_changed(quint64 value) void ATVModGUI::on_modulation_currentIndexChanged(int index) { + if (index == (int) ATVMod::ATVModulationLSB) + { + ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000); + m_channelMarker.setBandwidth(-ui->rfBW->value()*200000); + m_channelMarker.setSidebands(ChannelMarker::lsb); + } + else if (index == (int) ATVMod::ATVModulationUSB) + { + ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 200000); + m_channelMarker.setBandwidth(ui->rfBW->value()*200000); + m_channelMarker.setSidebands(ChannelMarker::usb); + } + else + { + ui->rfBW->setMaximum(m_channelizer->getOutputSampleRate() / 100000); + m_channelMarker.setBandwidth(ui->rfBW->value()*100000); + m_channelMarker.setSidebands(ChannelMarker::dsb); + } + applySettings(); } void ATVModGUI::on_rfBW_valueChanged(int value) { ui->rfBWText->setText(QString("%1 MHz").arg(value / 10.0, 0, 'f', 1)); - m_channelMarker.setBandwidth(value * 100000); + + if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationLSB) + { + m_channelMarker.setBandwidth(-ui->rfBW->value()*200000); + } + else if (ui->modulation->currentIndex() == (int) ATVMod::ATVModulationUSB) + { + m_channelMarker.setBandwidth(ui->rfBW->value()*200000); + } + else + { + m_channelMarker.setBandwidth(ui->rfBW->value()*100000); + } + applySettings(); } diff --git a/plugins/channeltx/modatv/atvmodgui.ui b/plugins/channeltx/modatv/atvmodgui.ui index 3e9b384d9..65cc6f972 100644 --- a/plugins/channeltx/modatv/atvmodgui.ui +++ b/plugins/channeltx/modatv/atvmodgui.ui @@ -211,6 +211,16 @@ FM + + + USB + + + + + LSB + + diff --git a/plugins/channeltx/modatv/atvmodplugin.cpp b/plugins/channeltx/modatv/atvmodplugin.cpp index ad477a535..e6965e9af 100644 --- a/plugins/channeltx/modatv/atvmodplugin.cpp +++ b/plugins/channeltx/modatv/atvmodplugin.cpp @@ -23,7 +23,7 @@ const PluginDescriptor ATVModPlugin::m_pluginDescriptor = { QString("ATV Modulator"), - QString("3.3.0"), + QString("3.3.1"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/sdrbase/gui/aboutdialog.ui b/sdrbase/gui/aboutdialog.ui index 3f0cd6634..cd3a92dec 100644 --- a/sdrbase/gui/aboutdialog.ui +++ b/sdrbase/gui/aboutdialog.ui @@ -84,7 +84,7 @@ - <html><head/><body><p>Version 3.3.0 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html> + <html><head/><body><p>Version 3.3.1 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html> true diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 1ccf55e53..a60e674f2 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -453,9 +453,9 @@ void MainWindow::createStatusBar() { QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR); #if QT_VERSION >= 0x050400 - m_showSystemWidget = new QLabel("SDRangel v3.3.0 " + qtVersionStr + QSysInfo::prettyProductName(), this); + m_showSystemWidget = new QLabel("SDRangel v3.3.1 " + qtVersionStr + QSysInfo::prettyProductName(), this); #else - m_showSystemWidget = new QLabel("SDRangel v3.3.0 " + qtVersionStr, this); + m_showSystemWidget = new QLabel("SDRangel v3.3.1 " + qtVersionStr, this); #endif statusBar()->addPermanentWidget(m_showSystemWidget);