Merge branch 'dev'
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
||||
sdrangel (3.8.0-1) unstable; urgency=medium
|
||||
|
||||
* Redesigned the device handling to accomodate multi channel devices like LimeSDR
|
||||
* Refactoring: Separate DeviceAPI from the GUI
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Thu, 02 Nov 2017 18:14:18 +0200
|
||||
|
||||
sdrangel (3.7.8-1) unstable; urgency=medium
|
||||
|
||||
* PlutoSDR: restored and fixed Tx support
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
BIN
doc/img/MainWindow_SDDialog.png
Normal file
After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 976 KiB After Width: | Height: | Size: 977 KiB |
Before Width: | Height: | Size: 975 KiB After Width: | Height: | Size: 975 KiB |
@ -22,8 +22,8 @@ const char *fcd_traits<ProPlus>::displayedName = "FunCube Dongle Pro+";
|
||||
const char *fcd_traits<Pro>::pluginDisplayedName = "FunCube Pro Input";
|
||||
const char *fcd_traits<ProPlus>::pluginDisplayedName = "FunCube Pro+ Input";
|
||||
|
||||
const char *fcd_traits<Pro>::pluginVersion = "3.7.4";
|
||||
const char *fcd_traits<ProPlus>::pluginVersion = "3.7.4";
|
||||
const char *fcd_traits<Pro>::pluginVersion = "3.8.0";
|
||||
const char *fcd_traits<ProPlus>::pluginVersion = "3.8.0";
|
||||
|
||||
const int64_t fcd_traits<Pro>::loLowLimitFreq = 64000000L;
|
||||
const int64_t fcd_traits<ProPlus>::loLowLimitFreq = 150000L;
|
||||
|
@ -1,497 +1,499 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2015 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// 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 as version 3 of the License, or //
|
||||
// //
|
||||
// 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. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "chanalyzergui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include <dsp/downchannelizer.h>
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "dsp/threadedbasebandsamplesink.h"
|
||||
#include "ui_chanalyzergui.h"
|
||||
#include "dsp/spectrumscopecombovis.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "gui/glscope.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingswidget.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "chanalyzer.h"
|
||||
|
||||
const QString ChannelAnalyzerGUI::m_channelID = "org.f4exb.sdrangelove.channel.chanalyzer";
|
||||
|
||||
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
{
|
||||
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceAPI);
|
||||
return gui;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::setName(const QString& name)
|
||||
{
|
||||
setObjectName(name);
|
||||
}
|
||||
|
||||
QString ChannelAnalyzerGUI::getName() const
|
||||
{
|
||||
return objectName();
|
||||
}
|
||||
|
||||
qint64 ChannelAnalyzerGUI::getCenterFrequency() const
|
||||
{
|
||||
return m_channelMarker.getCenterFrequency();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::setCenterFrequency(qint64 centerFrequency)
|
||||
{
|
||||
m_channelMarker.setCenterFrequency(centerFrequency);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::resetToDefaults()
|
||||
{
|
||||
blockApplySettings(true);
|
||||
|
||||
ui->BW->setValue(30);
|
||||
ui->deltaFrequency->setValue(0);
|
||||
ui->spanLog2->setValue(3);
|
||||
|
||||
blockApplySettings(false);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
QByteArray ChannelAnalyzerGUI::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32(1, m_channelMarker.getCenterFrequency());
|
||||
s.writeS32(2, ui->BW->value());
|
||||
s.writeBlob(3, ui->spectrumGUI->serialize());
|
||||
s.writeU32(4, m_channelMarker.getColor().rgb());
|
||||
s.writeS32(5, ui->lowCut->value());
|
||||
s.writeS32(6, ui->spanLog2->value());
|
||||
s.writeBool(7, ui->ssb->isChecked());
|
||||
s.writeBlob(8, ui->scopeGUI->serialize());
|
||||
return s.final();
|
||||
}
|
||||
|
||||
bool ChannelAnalyzerGUI::deserialize(const QByteArray& data)
|
||||
{
|
||||
SimpleDeserializer d(data);
|
||||
|
||||
if(!d.isValid())
|
||||
{
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(d.getVersion() == 1)
|
||||
{
|
||||
QByteArray bytetmp;
|
||||
quint32 u32tmp;
|
||||
qint32 tmp, bw, lowCut;
|
||||
bool tmpBool;
|
||||
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.blockSignals(true);
|
||||
|
||||
d.readS32(1, &tmp, 0);
|
||||
m_channelMarker.setCenterFrequency(tmp);
|
||||
d.readS32(2, &bw, 30);
|
||||
ui->BW->setValue(bw);
|
||||
d.readBlob(3, &bytetmp);
|
||||
ui->spectrumGUI->deserialize(bytetmp);
|
||||
|
||||
if(d.readU32(4, &u32tmp))
|
||||
{
|
||||
m_channelMarker.setColor(u32tmp);
|
||||
}
|
||||
|
||||
d.readS32(5, &lowCut, 3);
|
||||
ui->lowCut->setValue(lowCut);
|
||||
d.readS32(6, &tmp, 20);
|
||||
ui->spanLog2->setValue(tmp);
|
||||
setNewRate(tmp);
|
||||
d.readBool(7, &tmpBool, false);
|
||||
ui->ssb->setChecked(tmpBool);
|
||||
d.readBlob(8, &bytetmp);
|
||||
ui->scopeGUI->deserialize(bytetmp);
|
||||
|
||||
blockApplySettings(false);
|
||||
m_channelMarker.blockSignals(false);
|
||||
|
||||
ui->BW->setValue(bw);
|
||||
ui->lowCut->setValue(lowCut); // does applySettings();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ChannelAnalyzerGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (ChannelAnalyzer::MsgReportChannelSampleRateChanged::match(message))
|
||||
{
|
||||
setNewRate(m_spanLog2);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = getInputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("ChannelAnalyzerGUI::handleInputMessages: message: %s", message->getIdentifier());
|
||||
|
||||
if (handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::viewChanged()
|
||||
{
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::tick()
|
||||
{
|
||||
Real powDb = CalcDb::dbPower(m_channelAnalyzer->getMagSq());
|
||||
m_channelPowerDbAvg.feed(powDb);
|
||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_deltaMinus_toggled(bool minus)
|
||||
{
|
||||
int deltaFrequency = m_channelMarker.getCenterFrequency();
|
||||
bool minusDelta = (deltaFrequency < 0);
|
||||
|
||||
if (minus ^ minusDelta) // sign change
|
||||
{
|
||||
m_channelMarker.setCenterFrequency(-deltaFrequency);
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_deltaFrequency_changed(quint64 value)
|
||||
{
|
||||
if (ui->deltaMinus->isChecked()) {
|
||||
m_channelMarker.setCenterFrequency(-value);
|
||||
} else {
|
||||
m_channelMarker.setCenterFrequency(value);
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_BW_valueChanged(int value)
|
||||
{
|
||||
QString s = QString::number(value/10.0, 'f', 1);
|
||||
ui->BWText->setText(tr("%1k").arg(s));
|
||||
m_channelMarker.setBandwidth(value * 100 * 2);
|
||||
|
||||
if (ui->ssb->isChecked())
|
||||
{
|
||||
if (value < 0) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::lsb);
|
||||
} else {
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
}
|
||||
|
||||
on_lowCut_valueChanged(m_channelMarker.getLowCutoff()/100);
|
||||
}
|
||||
|
||||
int ChannelAnalyzerGUI::getEffectiveLowCutoff(int lowCutoff)
|
||||
{
|
||||
int ssbBW = m_channelMarker.getBandwidth() / 2;
|
||||
int effectiveLowCutoff = lowCutoff;
|
||||
const int guard = 100;
|
||||
|
||||
if (ssbBW < 0) {
|
||||
if (effectiveLowCutoff < ssbBW + guard) {
|
||||
effectiveLowCutoff = ssbBW + guard;
|
||||
}
|
||||
if (effectiveLowCutoff > 0) {
|
||||
effectiveLowCutoff = 0;
|
||||
}
|
||||
} else {
|
||||
if (effectiveLowCutoff > ssbBW - guard) {
|
||||
effectiveLowCutoff = ssbBW - guard;
|
||||
}
|
||||
if (effectiveLowCutoff < 0) {
|
||||
effectiveLowCutoff = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return effectiveLowCutoff;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_lowCut_valueChanged(int value)
|
||||
{
|
||||
int lowCutoff = getEffectiveLowCutoff(value * 100);
|
||||
m_channelMarker.setLowCutoff(lowCutoff);
|
||||
QString s = QString::number(lowCutoff/1000.0, 'f', 1);
|
||||
ui->lowCutText->setText(tr("%1k").arg(s));
|
||||
ui->lowCut->setValue(lowCutoff/100);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_spanLog2_valueChanged(int value)
|
||||
{
|
||||
if (setNewRate(value)) {
|
||||
applySettings();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_ssb_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (ui->BW->value() < 0) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::lsb);
|
||||
} else {
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
}
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(m_rate/4);
|
||||
ui->glSpectrum->setSampleRate(m_rate/2);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
|
||||
on_lowCut_valueChanged(m_channelMarker.getLowCutoff()/100);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(0);
|
||||
ui->glSpectrum->setSampleRate(m_rate);
|
||||
ui->glSpectrum->setSsbSpectrum(false);
|
||||
|
||||
applySettings();
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool rollDown __attribute__((unused)))
|
||||
{
|
||||
/*
|
||||
if((widget == ui->spectrumContainer) && (m_ssbDemod != NULL))
|
||||
m_ssbDemod->setSpectrum(m_threadedSampleSink->getMessageQueue(), rollDown);
|
||||
*/
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::onMenuDoubleClicked()
|
||||
{
|
||||
if(!m_basicSettingsShown) {
|
||||
m_basicSettingsShown = true;
|
||||
BasicChannelSettingsWidget* bcsw = new BasicChannelSettingsWidget(&m_channelMarker, this);
|
||||
bcsw->show();
|
||||
}
|
||||
}
|
||||
|
||||
ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::ChannelAnalyzerGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
m_rate(6000),
|
||||
m_spanLog2(3),
|
||||
m_channelPowerDbAvg(40,0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_spectrumScopeComboVis = new SpectrumScopeComboVis(m_spectrumVis, m_scopeVis);
|
||||
m_channelAnalyzer = new ChannelAnalyzer(m_deviceAPI);
|
||||
m_channelAnalyzer->setSampleSink(m_spectrumScopeComboVis);
|
||||
m_channelAnalyzer->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||
ui->deltaFrequency->setValueRange(7, 0U, 9999999U);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(m_rate/2);
|
||||
ui->glSpectrum->setSampleRate(m_rate);
|
||||
ui->glSpectrum->setDisplayWaterfall(true);
|
||||
ui->glSpectrum->setDisplayMaxHold(true);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
|
||||
ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer());
|
||||
ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
//m_channelMarker = new ChannelMarker(this);
|
||||
m_channelMarker.setColor(Qt::gray);
|
||||
m_channelMarker.setBandwidth(m_rate);
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
m_channelMarker.setCenterFrequency(0);
|
||||
m_channelMarker.setVisible(true);
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
|
||||
|
||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
|
||||
applySettings();
|
||||
setNewRate(m_spanLog2);
|
||||
}
|
||||
|
||||
ChannelAnalyzerGUI::~ChannelAnalyzerGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
delete m_channelAnalyzer;
|
||||
delete m_spectrumVis;
|
||||
delete m_scopeVis;
|
||||
delete m_spectrumScopeComboVis;
|
||||
//delete m_channelMarker;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool ChannelAnalyzerGUI::setNewRate(int spanLog2)
|
||||
{
|
||||
qDebug("ChannelAnalyzerGUI::setNewRate");
|
||||
|
||||
if ((spanLog2 < 0) || (spanLog2 > 6)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_spanLog2 = spanLog2;
|
||||
//m_rate = 48000 / (1<<spanLog2);
|
||||
m_rate = m_channelAnalyzer->getSampleRate() / (1<<spanLog2);
|
||||
|
||||
if (ui->BW->value() < -m_rate/200) {
|
||||
ui->BW->setValue(-m_rate/200);
|
||||
m_channelMarker.setBandwidth(-m_rate*2);
|
||||
} else if (ui->BW->value() > m_rate/200) {
|
||||
ui->BW->setValue(m_rate/200);
|
||||
m_channelMarker.setBandwidth(m_rate*2);
|
||||
}
|
||||
|
||||
if (ui->lowCut->value() < -m_rate/200) {
|
||||
ui->lowCut->setValue(-m_rate/200);
|
||||
m_channelMarker.setLowCutoff(-m_rate);
|
||||
} else if (ui->lowCut->value() > m_rate/200) {
|
||||
ui->lowCut->setValue(m_rate/200);
|
||||
m_channelMarker.setLowCutoff(m_rate);
|
||||
}
|
||||
|
||||
ui->BW->setMinimum(-m_rate/200);
|
||||
ui->lowCut->setMinimum(-m_rate/200);
|
||||
ui->BW->setMaximum(m_rate/200);
|
||||
ui->lowCut->setMaximum(m_rate/200);
|
||||
|
||||
QString s = QString::number(m_rate/1000.0, 'f', 1);
|
||||
ui->spanText->setText(tr("%1k").arg(s));
|
||||
|
||||
if (ui->ssb->isChecked())
|
||||
{
|
||||
if (ui->BW->value() < 0) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::lsb);
|
||||
} else {
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
}
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(m_rate/4);
|
||||
ui->glSpectrum->setSampleRate(m_rate/2);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(0);
|
||||
ui->glSpectrum->setSampleRate(m_rate);
|
||||
ui->glSpectrum->setSsbSpectrum(false);
|
||||
}
|
||||
|
||||
ui->glScope->setSampleRate(m_rate);
|
||||
m_scopeVis->setSampleRate(m_rate);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::blockApplySettings(bool block)
|
||||
{
|
||||
ui->glScope->blockSignals(block);
|
||||
ui->glSpectrum->blockSignals(block);
|
||||
m_doApplySettings = !block;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::applySettings()
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
setTitleColor(m_channelMarker.getColor());
|
||||
ui->deltaFrequency->setValue(abs(m_channelMarker.getCenterFrequency()));
|
||||
ui->deltaMinus->setChecked(m_channelMarker.getCenterFrequency() < 0);
|
||||
|
||||
ChannelAnalyzer::MsgConfigureChannelizer *msg = ChannelAnalyzer::MsgConfigureChannelizer::create(m_channelMarker.getCenterFrequency());
|
||||
m_channelAnalyzer->getInputMessageQueue()->push(msg);
|
||||
|
||||
m_channelAnalyzer->configure(m_channelAnalyzer->getInputMessageQueue(),
|
||||
ui->BW->value() * 100.0,
|
||||
ui->lowCut->value() * 100.0,
|
||||
m_spanLog2,
|
||||
ui->ssb->isChecked());
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.setHighlighted(false);
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::enterEvent(QEvent*)
|
||||
{
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.setHighlighted(true);
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2015 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// 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 as version 3 of the License, or //
|
||||
// //
|
||||
// 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. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "chanalyzergui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/downchannelizer.h>
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "dsp/threadedbasebandsamplesink.h"
|
||||
#include "ui_chanalyzergui.h"
|
||||
#include "dsp/spectrumscopecombovis.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "dsp/scopevis.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "gui/glscope.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingswidget.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "chanalyzer.h"
|
||||
|
||||
const QString ChannelAnalyzerGUI::m_channelID = "org.f4exb.sdrangelove.channel.chanalyzer";
|
||||
|
||||
ChannelAnalyzerGUI* ChannelAnalyzerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::setName(const QString& name)
|
||||
{
|
||||
setObjectName(name);
|
||||
}
|
||||
|
||||
QString ChannelAnalyzerGUI::getName() const
|
||||
{
|
||||
return objectName();
|
||||
}
|
||||
|
||||
qint64 ChannelAnalyzerGUI::getCenterFrequency() const
|
||||
{
|
||||
return m_channelMarker.getCenterFrequency();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::setCenterFrequency(qint64 centerFrequency)
|
||||
{
|
||||
m_channelMarker.setCenterFrequency(centerFrequency);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::resetToDefaults()
|
||||
{
|
||||
blockApplySettings(true);
|
||||
|
||||
ui->BW->setValue(30);
|
||||
ui->deltaFrequency->setValue(0);
|
||||
ui->spanLog2->setValue(3);
|
||||
|
||||
blockApplySettings(false);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
QByteArray ChannelAnalyzerGUI::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32(1, m_channelMarker.getCenterFrequency());
|
||||
s.writeS32(2, ui->BW->value());
|
||||
s.writeBlob(3, ui->spectrumGUI->serialize());
|
||||
s.writeU32(4, m_channelMarker.getColor().rgb());
|
||||
s.writeS32(5, ui->lowCut->value());
|
||||
s.writeS32(6, ui->spanLog2->value());
|
||||
s.writeBool(7, ui->ssb->isChecked());
|
||||
s.writeBlob(8, ui->scopeGUI->serialize());
|
||||
return s.final();
|
||||
}
|
||||
|
||||
bool ChannelAnalyzerGUI::deserialize(const QByteArray& data)
|
||||
{
|
||||
SimpleDeserializer d(data);
|
||||
|
||||
if(!d.isValid())
|
||||
{
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(d.getVersion() == 1)
|
||||
{
|
||||
QByteArray bytetmp;
|
||||
quint32 u32tmp;
|
||||
qint32 tmp, bw, lowCut;
|
||||
bool tmpBool;
|
||||
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.blockSignals(true);
|
||||
|
||||
d.readS32(1, &tmp, 0);
|
||||
m_channelMarker.setCenterFrequency(tmp);
|
||||
d.readS32(2, &bw, 30);
|
||||
ui->BW->setValue(bw);
|
||||
d.readBlob(3, &bytetmp);
|
||||
ui->spectrumGUI->deserialize(bytetmp);
|
||||
|
||||
if(d.readU32(4, &u32tmp))
|
||||
{
|
||||
m_channelMarker.setColor(u32tmp);
|
||||
}
|
||||
|
||||
d.readS32(5, &lowCut, 3);
|
||||
ui->lowCut->setValue(lowCut);
|
||||
d.readS32(6, &tmp, 20);
|
||||
ui->spanLog2->setValue(tmp);
|
||||
setNewRate(tmp);
|
||||
d.readBool(7, &tmpBool, false);
|
||||
ui->ssb->setChecked(tmpBool);
|
||||
d.readBlob(8, &bytetmp);
|
||||
ui->scopeGUI->deserialize(bytetmp);
|
||||
|
||||
blockApplySettings(false);
|
||||
m_channelMarker.blockSignals(false);
|
||||
|
||||
ui->BW->setValue(bw);
|
||||
ui->lowCut->setValue(lowCut); // does applySettings();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ChannelAnalyzerGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (ChannelAnalyzer::MsgReportChannelSampleRateChanged::match(message))
|
||||
{
|
||||
setNewRate(m_spanLog2);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = getInputMessageQueue()->pop()) != 0)
|
||||
{
|
||||
qDebug("ChannelAnalyzerGUI::handleInputMessages: message: %s", message->getIdentifier());
|
||||
|
||||
if (handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::viewChanged()
|
||||
{
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::tick()
|
||||
{
|
||||
Real powDb = CalcDb::dbPower(m_channelAnalyzer->getMagSq());
|
||||
m_channelPowerDbAvg.feed(powDb);
|
||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_deltaMinus_toggled(bool minus)
|
||||
{
|
||||
int deltaFrequency = m_channelMarker.getCenterFrequency();
|
||||
bool minusDelta = (deltaFrequency < 0);
|
||||
|
||||
if (minus ^ minusDelta) // sign change
|
||||
{
|
||||
m_channelMarker.setCenterFrequency(-deltaFrequency);
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_deltaFrequency_changed(quint64 value)
|
||||
{
|
||||
if (ui->deltaMinus->isChecked()) {
|
||||
m_channelMarker.setCenterFrequency(-value);
|
||||
} else {
|
||||
m_channelMarker.setCenterFrequency(value);
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_BW_valueChanged(int value)
|
||||
{
|
||||
QString s = QString::number(value/10.0, 'f', 1);
|
||||
ui->BWText->setText(tr("%1k").arg(s));
|
||||
m_channelMarker.setBandwidth(value * 100 * 2);
|
||||
|
||||
if (ui->ssb->isChecked())
|
||||
{
|
||||
if (value < 0) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::lsb);
|
||||
} else {
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
}
|
||||
|
||||
on_lowCut_valueChanged(m_channelMarker.getLowCutoff()/100);
|
||||
}
|
||||
|
||||
int ChannelAnalyzerGUI::getEffectiveLowCutoff(int lowCutoff)
|
||||
{
|
||||
int ssbBW = m_channelMarker.getBandwidth() / 2;
|
||||
int effectiveLowCutoff = lowCutoff;
|
||||
const int guard = 100;
|
||||
|
||||
if (ssbBW < 0) {
|
||||
if (effectiveLowCutoff < ssbBW + guard) {
|
||||
effectiveLowCutoff = ssbBW + guard;
|
||||
}
|
||||
if (effectiveLowCutoff > 0) {
|
||||
effectiveLowCutoff = 0;
|
||||
}
|
||||
} else {
|
||||
if (effectiveLowCutoff > ssbBW - guard) {
|
||||
effectiveLowCutoff = ssbBW - guard;
|
||||
}
|
||||
if (effectiveLowCutoff < 0) {
|
||||
effectiveLowCutoff = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return effectiveLowCutoff;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_lowCut_valueChanged(int value)
|
||||
{
|
||||
int lowCutoff = getEffectiveLowCutoff(value * 100);
|
||||
m_channelMarker.setLowCutoff(lowCutoff);
|
||||
QString s = QString::number(lowCutoff/1000.0, 'f', 1);
|
||||
ui->lowCutText->setText(tr("%1k").arg(s));
|
||||
ui->lowCut->setValue(lowCutoff/100);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_spanLog2_valueChanged(int value)
|
||||
{
|
||||
if (setNewRate(value)) {
|
||||
applySettings();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::on_ssb_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (ui->BW->value() < 0) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::lsb);
|
||||
} else {
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
}
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(m_rate/4);
|
||||
ui->glSpectrum->setSampleRate(m_rate/2);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
|
||||
on_lowCut_valueChanged(m_channelMarker.getLowCutoff()/100);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(0);
|
||||
ui->glSpectrum->setSampleRate(m_rate);
|
||||
ui->glSpectrum->setSsbSpectrum(false);
|
||||
|
||||
applySettings();
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool rollDown __attribute__((unused)))
|
||||
{
|
||||
/*
|
||||
if((widget == ui->spectrumContainer) && (m_ssbDemod != NULL))
|
||||
m_ssbDemod->setSpectrum(m_threadedSampleSink->getMessageQueue(), rollDown);
|
||||
*/
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::onMenuDoubleClicked()
|
||||
{
|
||||
if(!m_basicSettingsShown) {
|
||||
m_basicSettingsShown = true;
|
||||
BasicChannelSettingsWidget* bcsw = new BasicChannelSettingsWidget(&m_channelMarker, this);
|
||||
bcsw->show();
|
||||
}
|
||||
}
|
||||
|
||||
ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::ChannelAnalyzerGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
// m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
m_rate(6000),
|
||||
m_spanLog2(3),
|
||||
m_channelPowerDbAvg(40,0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_spectrumScopeComboVis = new SpectrumScopeComboVis(m_spectrumVis, m_scopeVis);
|
||||
m_channelAnalyzer = new ChannelAnalyzer(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_channelAnalyzer->setSampleSink(m_spectrumScopeComboVis);
|
||||
m_channelAnalyzer->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||
ui->deltaFrequency->setValueRange(7, 0U, 9999999U);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(m_rate/2);
|
||||
ui->glSpectrum->setSampleRate(m_rate);
|
||||
ui->glSpectrum->setDisplayWaterfall(true);
|
||||
ui->glSpectrum->setDisplayMaxHold(true);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
|
||||
ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer());
|
||||
ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
//m_channelMarker = new ChannelMarker(this);
|
||||
m_channelMarker.setColor(Qt::gray);
|
||||
m_channelMarker.setBandwidth(m_rate);
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
m_channelMarker.setCenterFrequency(0);
|
||||
m_channelMarker.setVisible(true);
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
|
||||
|
||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
|
||||
applySettings();
|
||||
setNewRate(m_spanLog2);
|
||||
}
|
||||
|
||||
ChannelAnalyzerGUI::~ChannelAnalyzerGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_channelAnalyzer;
|
||||
delete m_spectrumVis;
|
||||
delete m_scopeVis;
|
||||
delete m_spectrumScopeComboVis;
|
||||
//delete m_channelMarker;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool ChannelAnalyzerGUI::setNewRate(int spanLog2)
|
||||
{
|
||||
qDebug("ChannelAnalyzerGUI::setNewRate");
|
||||
|
||||
if ((spanLog2 < 0) || (spanLog2 > 6)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_spanLog2 = spanLog2;
|
||||
//m_rate = 48000 / (1<<spanLog2);
|
||||
m_rate = m_channelAnalyzer->getSampleRate() / (1<<spanLog2);
|
||||
|
||||
if (ui->BW->value() < -m_rate/200) {
|
||||
ui->BW->setValue(-m_rate/200);
|
||||
m_channelMarker.setBandwidth(-m_rate*2);
|
||||
} else if (ui->BW->value() > m_rate/200) {
|
||||
ui->BW->setValue(m_rate/200);
|
||||
m_channelMarker.setBandwidth(m_rate*2);
|
||||
}
|
||||
|
||||
if (ui->lowCut->value() < -m_rate/200) {
|
||||
ui->lowCut->setValue(-m_rate/200);
|
||||
m_channelMarker.setLowCutoff(-m_rate);
|
||||
} else if (ui->lowCut->value() > m_rate/200) {
|
||||
ui->lowCut->setValue(m_rate/200);
|
||||
m_channelMarker.setLowCutoff(m_rate);
|
||||
}
|
||||
|
||||
ui->BW->setMinimum(-m_rate/200);
|
||||
ui->lowCut->setMinimum(-m_rate/200);
|
||||
ui->BW->setMaximum(m_rate/200);
|
||||
ui->lowCut->setMaximum(m_rate/200);
|
||||
|
||||
QString s = QString::number(m_rate/1000.0, 'f', 1);
|
||||
ui->spanText->setText(tr("%1k").arg(s));
|
||||
|
||||
if (ui->ssb->isChecked())
|
||||
{
|
||||
if (ui->BW->value() < 0) {
|
||||
m_channelMarker.setSidebands(ChannelMarker::lsb);
|
||||
} else {
|
||||
m_channelMarker.setSidebands(ChannelMarker::usb);
|
||||
}
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(m_rate/4);
|
||||
ui->glSpectrum->setSampleRate(m_rate/2);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_channelMarker.setSidebands(ChannelMarker::dsb);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(0);
|
||||
ui->glSpectrum->setSampleRate(m_rate);
|
||||
ui->glSpectrum->setSsbSpectrum(false);
|
||||
}
|
||||
|
||||
ui->glScope->setSampleRate(m_rate);
|
||||
m_scopeVis->setSampleRate(m_rate);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::blockApplySettings(bool block)
|
||||
{
|
||||
ui->glScope->blockSignals(block);
|
||||
ui->glSpectrum->blockSignals(block);
|
||||
m_doApplySettings = !block;
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::applySettings()
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
setTitleColor(m_channelMarker.getColor());
|
||||
ui->deltaFrequency->setValue(abs(m_channelMarker.getCenterFrequency()));
|
||||
ui->deltaMinus->setChecked(m_channelMarker.getCenterFrequency() < 0);
|
||||
|
||||
ChannelAnalyzer::MsgConfigureChannelizer *msg = ChannelAnalyzer::MsgConfigureChannelizer::create(m_channelMarker.getCenterFrequency());
|
||||
m_channelAnalyzer->getInputMessageQueue()->push(msg);
|
||||
|
||||
m_channelAnalyzer->configure(m_channelAnalyzer->getInputMessageQueue(),
|
||||
ui->BW->value() * 100.0,
|
||||
ui->lowCut->value() * 100.0,
|
||||
m_spanLog2,
|
||||
ui->ssb->isChecked());
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.setHighlighted(false);
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void ChannelAnalyzerGUI::enterEvent(QEvent*)
|
||||
{
|
||||
blockApplySettings(true);
|
||||
m_channelMarker.setHighlighted(true);
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
@ -41,7 +41,7 @@ class ChannelAnalyzerGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ChannelAnalyzerGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static ChannelAnalyzerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -73,7 +73,8 @@ private slots:
|
||||
private:
|
||||
Ui::ChannelAnalyzerGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
// DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
bool m_basicSettingsShown;
|
||||
bool m_doApplySettings;
|
||||
@ -89,7 +90,7 @@ private:
|
||||
ScopeVis* m_scopeVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~ChannelAnalyzerGUI();
|
||||
|
||||
int getEffectiveLowCutoff(int lowCutoff);
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
||||
QString("Channel Analyzer"),
|
||||
QString("2.0.0"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -33,18 +33,18 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(ChannelAnalyzerGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == ChannelAnalyzerGUI::m_channelID)
|
||||
{
|
||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
||||
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceSourceAPI *deviceAPI)
|
||||
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceUISet *deviceUISet)
|
||||
{
|
||||
ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
||||
ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ChannelAnalyzerPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -17,7 +17,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -25,7 +25,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceChannelAnalyzer(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceChannelAnalyzer(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_CHANALYZERPLUGIN_H
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
@ -41,7 +41,7 @@ class ChannelAnalyzerNGGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ChannelAnalyzerNGGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static ChannelAnalyzerNGGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -75,7 +75,7 @@ private slots:
|
||||
private:
|
||||
Ui::ChannelAnalyzerNGGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
bool m_basicSettingsShown;
|
||||
bool m_doApplySettings;
|
||||
@ -91,7 +91,7 @@ private:
|
||||
ScopeVisNG* m_scopeVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit ChannelAnalyzerNGGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~ChannelAnalyzerNGGUI();
|
||||
|
||||
int getRequestedChannelSampleRate();
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
const PluginDescriptor ChannelAnalyzerNGPlugin::m_pluginDescriptor = {
|
||||
QString("Channel Analyzer NG"),
|
||||
QString("3.5.3"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -48,18 +48,18 @@ void ChannelAnalyzerNGPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(ChannelAnalyzerNGGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* ChannelAnalyzerNGPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == ChannelAnalyzerNGGUI::m_channelID)
|
||||
{
|
||||
ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceAPI);
|
||||
ChannelAnalyzerNGGUI* gui = ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelAnalyzerNGPlugin::createInstanceChannelAnalyzer(DeviceSourceAPI *deviceAPI)
|
||||
void ChannelAnalyzerNGPlugin::createInstanceChannelAnalyzer(DeviceUISet *deviceUISet)
|
||||
{
|
||||
ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceAPI);
|
||||
ChannelAnalyzerNGGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ChannelAnalyzerNGPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -42,7 +42,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceChannelAnalyzer(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceChannelAnalyzer(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_CHANALYZERNGPLUGIN_H
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "amdemodgui.h"
|
||||
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
#include "dsp/threadedbasebandsamplesink.h"
|
||||
@ -35,9 +36,9 @@
|
||||
|
||||
const QString AMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.am";
|
||||
|
||||
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
AMDemodGUI* AMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
AMDemodGUI* gui = new AMDemodGUI(pluginAPI, deviceAPI);
|
||||
AMDemodGUI* gui = new AMDemodGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -169,11 +170,11 @@ void AMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::AMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_doApplySettings(true),
|
||||
m_squelchOpen(false),
|
||||
@ -184,7 +185,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_amDemod = new AMDemod(m_deviceAPI);
|
||||
m_amDemod = new AMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
|
||||
|
||||
@ -205,9 +206,9 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
displaySettings();
|
||||
applySettings(true);
|
||||
@ -215,7 +216,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget
|
||||
|
||||
AMDemodGUI::~AMDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_amDemod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "amdemodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
@ -23,7 +23,7 @@ class AMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static AMDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static AMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -55,7 +55,7 @@ private slots:
|
||||
private:
|
||||
Ui::AMDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
AMDemodSettings m_settings;
|
||||
bool m_doApplySettings;
|
||||
@ -67,7 +67,7 @@ private:
|
||||
uint32_t m_tickCount;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~AMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = {
|
||||
QString("AM Demodulator"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -33,18 +33,18 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(AMDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == AMDemodGUI::m_channelID)
|
||||
{
|
||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void AMDemodPlugin::createInstanceDemodAM(DeviceSourceAPI *deviceAPI)
|
||||
void AMDemodPlugin::createInstanceDemodAM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
AMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
AMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class AMDemodPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -33,7 +33,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -41,7 +41,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceDemodAM(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceDemodAM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_AMPLUGIN_H
|
||||
|
@ -24,7 +24,7 @@ Use this button to toggle audio mute for this channel. The button will light up
|
||||
|
||||
Copies audio output to UDP. Audio is set at fixed level and is muted by the mute button (13) and squelch (9) is also applied. Output is mono S16LE samples.
|
||||
|
||||
UDP address and send port are specified in the basic channel settings. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrbase/readme.md#6-channels)
|
||||
UDP address and send port are specified in the basic channel settings. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrgui/readme.md#6-channels)
|
||||
|
||||
<h3>5: Level meter in dB</h3>
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "atvdemodgui.h"
|
||||
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/downchannelizer.h"
|
||||
|
||||
#include "dsp/threadedbasebandsamplesink.h"
|
||||
@ -38,9 +39,9 @@
|
||||
const QString ATVDemodGUI::m_strChannelID = "sdrangel.channel.demodatv";
|
||||
|
||||
ATVDemodGUI* ATVDemodGUI::create(PluginAPI* objPluginAPI,
|
||||
DeviceSourceAPI *objDeviceAPI)
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
ATVDemodGUI* gui = new ATVDemodGUI(objPluginAPI, objDeviceAPI);
|
||||
ATVDemodGUI* gui = new ATVDemodGUI(objPluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -266,12 +267,12 @@ void ATVDemodGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
||||
ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet,
|
||||
QWidget* objParent) :
|
||||
RollupWidget(objParent),
|
||||
ui(new Ui::ATVDemodGUI),
|
||||
m_pluginAPI(objPluginAPI),
|
||||
m_deviceAPI(objDeviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_blnBasicSettingsShown(false),
|
||||
m_blnDoApplySettings(true),
|
||||
@ -284,14 +285,14 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_scopeVis = new ScopeVisNG(ui->glScope);
|
||||
m_atvDemod = new ATVDemod(m_deviceAPI);
|
||||
m_atvDemod = new ATVDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_atvDemod->setScopeSink(m_scopeVis);
|
||||
m_atvDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_atvDemod->setATVScreen(ui->screenTV);
|
||||
|
||||
m_channelizer = new DownChannelizer(m_atvDemod);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceUISet->m_deviceSourceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
|
||||
ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
|
||||
@ -312,9 +313,9 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_strChannelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_strChannelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
//ui->screenTV->connectTimer(m_objPluginAPI->getMainWindow()->getMasterTimer());
|
||||
|
||||
@ -347,8 +348,8 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
||||
|
||||
ATVDemodGUI::~ATVDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
m_deviceUISet->m_deviceSourceAPI->removeThreadedSink(m_threadedChannelizer);
|
||||
delete m_threadedChannelizer;
|
||||
delete m_channelizer;
|
||||
delete m_atvDemod;
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
@ -42,7 +42,7 @@ class ATVDemodGUI : public RollupWidget, public PluginInstanceGUI
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ATVDemodGUI* create(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI);
|
||||
static ATVDemodGUI* create(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& strName);
|
||||
@ -90,7 +90,7 @@ private slots:
|
||||
private:
|
||||
Ui::ATVDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
ThreadedBasebandSampleSink* m_threadedChannelizer;
|
||||
DownChannelizer* m_channelizer;
|
||||
@ -109,7 +109,7 @@ private:
|
||||
int m_rfSliderDivisor;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI, QWidget* objParent = NULL);
|
||||
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, QWidget* objParent = 0);
|
||||
virtual ~ATVDemodGUI();
|
||||
|
||||
void blockApplySettings(bool blnBlock);
|
||||
|
@ -26,7 +26,7 @@
|
||||
const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
|
||||
{
|
||||
QString("ATV Demodulator"),
|
||||
QString("3.7.3"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) F4HKW for F4EXB / SDRAngel"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -53,11 +53,11 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI)
|
||||
m_ptrPluginAPI->registerRxChannel(ATVDemodGUI::m_strChannelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ATVDemodPlugin::createRxChannel(const QString& strChannelName, DeviceSourceAPI *ptrDeviceAPI)
|
||||
PluginInstanceGUI* ATVDemodPlugin::createRxChannel(const QString& strChannelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(strChannelName == ATVDemodGUI::m_strChannelID)
|
||||
{
|
||||
ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, ptrDeviceAPI);
|
||||
ATVDemodGUI* ptrGui = ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet);
|
||||
return ptrGui;
|
||||
}
|
||||
else
|
||||
@ -66,7 +66,7 @@ PluginInstanceGUI* ATVDemodPlugin::createRxChannel(const QString& strChannelName
|
||||
}
|
||||
}
|
||||
|
||||
void ATVDemodPlugin::createInstanceDemodATV(DeviceSourceAPI *ptrDeviceAPI)
|
||||
void ATVDemodPlugin::createInstanceDemodATV(DeviceUISet *deviceUISet)
|
||||
{
|
||||
ATVDemodGUI::create(m_ptrPluginAPI, ptrDeviceAPI);
|
||||
ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ATVDemodPlugin : public QObject, PluginInterface
|
||||
{
|
||||
@ -35,7 +35,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* ptrPluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& strChannelName, DeviceSourceAPI *ptrDeviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& strChannelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_ptrPluginDescriptor;
|
||||
@ -43,7 +43,7 @@ private:
|
||||
PluginAPI* m_ptrPluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceDemodATV(DeviceSourceAPI *ptrDeviceAPI);
|
||||
void createInstanceDemodATV(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_ATVPLUGIN_H
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "bfmdemodgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/downchannelizer.h>
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
@ -44,9 +45,9 @@
|
||||
|
||||
const QString BFMDemodGUI::m_channelID = "sdrangel.channel.bfm";
|
||||
|
||||
BFMDemodGUI* BFMDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
BFMDemodGUI* BFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUIset)
|
||||
{
|
||||
BFMDemodGUI* gui = new BFMDemodGUI(pluginAPI, deviceAPI);
|
||||
BFMDemodGUI* gui = new BFMDemodGUI(pluginAPI, deviceUIset);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -315,11 +316,11 @@ void BFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
}
|
||||
}
|
||||
|
||||
BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::BFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_rdsTimerCount(0),
|
||||
m_channelPowerDbAvg(20,0),
|
||||
@ -337,7 +338,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_bfmDemod = new BFMDemod(m_deviceAPI);
|
||||
m_bfmDemod = new BFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_bfmDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_bfmDemod->setSampleSink(m_spectrumVis);
|
||||
|
||||
@ -363,9 +364,9 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
@ -382,7 +383,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
BFMDemodGUI::~BFMDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_bfmDemod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "bfmdemodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
class RDSParser;
|
||||
|
||||
class ThreadedBasebandSampleSink;
|
||||
@ -42,7 +42,7 @@ class BFMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static BFMDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static BFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -82,7 +82,7 @@ private slots:
|
||||
private:
|
||||
Ui::BFMDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
BFMDemodSettings m_settings;
|
||||
bool m_doApplySettings;
|
||||
@ -96,7 +96,7 @@ private:
|
||||
std::vector<unsigned int> m_g14ComboIndex;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~BFMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
|
||||
QString("Broadcast FM Demodulator"),
|
||||
QString("3.7.5"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -50,18 +50,18 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(BFMDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* BFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* BFMPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == BFMDemodGUI::m_channelID)
|
||||
{
|
||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void BFMPlugin::createInstanceBFM(DeviceSourceAPI *deviceAPI)
|
||||
void BFMPlugin::createInstanceBFM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
BFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
BFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class BFMPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -42,7 +42,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceBFM(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceBFM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_BFMPLUGIN_H
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "dsddemodgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/downchannelizer.h>
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
@ -39,9 +40,9 @@
|
||||
|
||||
const QString DSDDemodGUI::m_channelID = "sdrangel.channel.dsddemod";
|
||||
|
||||
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceAPI);
|
||||
DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -230,11 +231,11 @@ void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::DSDDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_doApplySettings(true),
|
||||
m_signalFormat(signalFormatNone),
|
||||
@ -253,7 +254,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_dsdDemod = new DSDDemod(m_deviceAPI);
|
||||
m_dsdDemod = new DSDDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_dsdDemod->setScopeSink(m_scopeVis);
|
||||
m_dsdDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
@ -280,9 +281,9 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
|
||||
|
||||
@ -297,7 +298,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
DSDDemodGUI::~DSDDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_dsdDemod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "dsddemodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ScopeVis;
|
||||
class DSDDemod;
|
||||
@ -43,7 +43,7 @@ class DSDDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static DSDDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static DSDDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -94,7 +94,7 @@ private:
|
||||
|
||||
Ui::DSDDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
DSDDemodSettings m_settings;
|
||||
bool m_doApplySettings;
|
||||
@ -118,7 +118,7 @@ private:
|
||||
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~DSDDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -15,16 +15,16 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "../../channelrx/demoddsd/dsddemodplugin.h"
|
||||
#include "dsddemodplugin.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include <QtPlugin>
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "../../channelrx/demoddsd/dsddemodgui.h"
|
||||
#include "dsddemodgui.h"
|
||||
|
||||
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
|
||||
QString("DSD Demodulator"),
|
||||
QString("3.7.3"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -50,18 +50,18 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(DSDDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* DSDDemodPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == DSDDemodGUI::m_channelID)
|
||||
{
|
||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void DSDDemodPlugin::createInstanceDSDDemod(DeviceSourceAPI *deviceAPI)
|
||||
void DSDDemodPlugin::createInstanceDSDDemod(DeviceUISet *deviceUISet)
|
||||
{
|
||||
DSDDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
DSDDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class DSDDemodPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -42,7 +42,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceDSDDemod(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceDSDDemod(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_DSDDEMODLUGIN_H
|
||||
|
@ -189,7 +189,7 @@ Copies audio output to UDP. Output is stereo S16LE samples. Depending on which s
|
||||
|
||||
It cannot mix both channels when slot1+2 are active.
|
||||
|
||||
UDP address and send port are specified in the basic channel settings. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrbase/readme.md#6-channels)
|
||||
UDP address and send port are specified in the basic channel settings. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrgui/readme.md#6-channels)
|
||||
|
||||
<h3>20: Format specific status display</h3>
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/downchannelizer.h>
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
@ -17,9 +18,9 @@
|
||||
|
||||
const QString LoRaDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.lora";
|
||||
|
||||
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
LoRaDemodGUI* LoRaDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceAPI);
|
||||
LoRaDemodGUI* gui = new LoRaDemodGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -120,11 +121,11 @@ void LoRaDemodGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::LoRaDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true)
|
||||
@ -135,7 +136,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWi
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_LoRaDemod = new LoRaDemod(m_deviceAPI);
|
||||
m_LoRaDemod = new LoRaDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_LoRaDemod->setSpectrumSink(m_spectrumVis);
|
||||
|
||||
ui->glSpectrum->setCenterFrequency(16000);
|
||||
@ -152,9 +153,9 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWi
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
@ -167,7 +168,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWi
|
||||
|
||||
LoRaDemodGUI::~LoRaDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_LoRaDemod;
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "lorademodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
class LoRaDemod;
|
||||
class SpectrumVis;
|
||||
|
||||
@ -21,7 +21,7 @@ class LoRaDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static LoRaDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static LoRaDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceAPI);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -47,7 +47,7 @@ private slots:
|
||||
private:
|
||||
Ui::LoRaDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
LoRaDemodSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -57,7 +57,7 @@ private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit LoRaDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit LoRaDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = NULL);
|
||||
virtual ~LoRaDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
||||
QString("LoRa Demodulator"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) 2015 John Greb"),
|
||||
QString("http://www.maintech.de"),
|
||||
true,
|
||||
@ -32,18 +32,18 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(LoRaDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* LoRaPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == LoRaDemodGUI::m_channelID)
|
||||
{
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void LoRaPlugin::createInstanceLoRa(DeviceSourceAPI *deviceAPI)
|
||||
void LoRaPlugin::createInstanceLoRa(DeviceUISet *deviceUISet)
|
||||
{
|
||||
LoRaDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
LoRaDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class LoRaPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -17,7 +17,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -25,7 +25,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceLoRa(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceLoRa(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_LoRaPLUGIN_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "nfmdemodgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
#include <QDebug>
|
||||
@ -17,9 +18,9 @@
|
||||
|
||||
const QString NFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.nfm";
|
||||
|
||||
NFMDemodGUI* NFMDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
NFMDemodGUI* NFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
NFMDemodGUI* gui = new NFMDemodGUI(pluginAPI, deviceAPI);
|
||||
NFMDemodGUI* gui = new NFMDemodGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -221,11 +222,11 @@ void NFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::NFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -238,7 +239,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_nfmDemod = new NFMDemod(m_deviceAPI);
|
||||
m_nfmDemod = new NFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_nfmDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -283,9 +284,9 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
QChar delta = QChar(0x94, 0x03);
|
||||
ui->deltaSquelch->setText(delta);
|
||||
@ -298,7 +299,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
NFMDemodGUI::~NFMDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_nfmDemod;
|
||||
//delete m_channelMarker;
|
||||
delete ui;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "nfmdemodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class NFMDemod;
|
||||
|
||||
@ -23,7 +23,7 @@ class NFMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static NFMDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static NFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -61,7 +61,7 @@ private slots:
|
||||
private:
|
||||
Ui::NFMDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
NFMDemodSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -72,7 +72,7 @@ private:
|
||||
uint32_t m_tickCount;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~NFMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
|
||||
QString("NFM Demodulator"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -32,17 +32,17 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(NFMDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* NFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* NFMPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == NFMDemodGUI::m_channelID) {
|
||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void NFMPlugin::createInstanceNFM(DeviceSourceAPI *deviceAPI)
|
||||
void NFMPlugin::createInstanceNFM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
NFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class NFMPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -17,7 +17,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -25,7 +25,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceNFM(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceNFM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_NFMPLUGIN_H
|
||||
|
@ -66,4 +66,4 @@ Use this button to toggle audio mute for this channel. The button will light up
|
||||
|
||||
Copies audio output to UDP. Audio is set at fixed level and is muted by the mute button (13) and squelch is also applied. Output is mono S16LE samples. Note that fixed volume apart this is the exact same audio that is sent to the audio device in particular it is highpass filtered at 300 Hz and thus is not suitable for digital communications. For this purpose you have to use the UDP source plugin instead.
|
||||
|
||||
UDP address and send port are specified in the basic channel settings. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrbase/readme.md#6-channels)
|
||||
UDP address and send port are specified in the basic channel settings. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrgui/readme.md#6-channels)
|
@ -2,6 +2,7 @@
|
||||
#include "ssbdemodgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
|
||||
@ -18,9 +19,9 @@
|
||||
|
||||
const QString SSBDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.ssb";
|
||||
|
||||
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
SSBDemodGUI* SSBDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceAPI);
|
||||
SSBDemodGUI* gui = new SSBDemodGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -286,11 +287,11 @@ void SSBDemodGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::SSBDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -308,7 +309,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_ssbDemod = new SSBDemod(m_deviceAPI);
|
||||
m_ssbDemod = new SSBDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_ssbDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_ssbDemod->setSampleSink(m_spectrumVis);
|
||||
|
||||
@ -330,9 +331,9 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
@ -343,7 +344,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
SSBDemodGUI::~SSBDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_ssbDemod;
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "ssbdemodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class AudioFifo;
|
||||
class SSBDemod;
|
||||
@ -23,7 +23,7 @@ class SSBDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static SSBDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static SSBDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -62,7 +62,7 @@ private slots:
|
||||
private:
|
||||
Ui::SSBDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
SSBDemodSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -80,7 +80,7 @@ private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit SSBDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI* deviceAPI, QWidget* parent = NULL);
|
||||
explicit SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet* deviceUISet, QWidget* parent = 0);
|
||||
virtual ~SSBDemodGUI();
|
||||
|
||||
int getEffectiveLowCutoff(int lowCutoff);
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "../../channelrx/demodssb/ssbplugin.h"
|
||||
#include "ssbplugin.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include <QtPlugin>
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "../../channelrx/demodssb/ssbdemodgui.h"
|
||||
#include "ssbdemodgui.h"
|
||||
|
||||
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
|
||||
QString("SSB Demodulator"),
|
||||
QString("3.7.3"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -33,18 +33,18 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(SSBDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* SSBPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == SSBDemodGUI::m_channelID)
|
||||
{
|
||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void SSBPlugin::createInstanceSSB(DeviceSourceAPI *deviceAPI)
|
||||
void SSBPlugin::createInstanceSSB(DeviceUISet *deviceUISet)
|
||||
{
|
||||
SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
SSBDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class SSBPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -17,7 +17,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -25,7 +25,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceSSB(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceSSB(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SSBPLUGIN_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "wfmdemodgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/downchannelizer.h>
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
@ -19,9 +20,9 @@
|
||||
|
||||
const QString WFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.wfm";
|
||||
|
||||
WFMDemodGUI* WFMDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
WFMDemodGUI* WFMDemodGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
WFMDemodGUI* gui = new WFMDemodGUI(pluginAPI, deviceAPI);
|
||||
WFMDemodGUI* gui = new WFMDemodGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -143,11 +144,11 @@ void WFMDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::WFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_channelPowerDbAvg(20,0)
|
||||
@ -171,7 +172,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_wfmDemod = new WFMDemod(m_deviceAPI);
|
||||
m_wfmDemod = new WFMDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
@ -184,9 +185,9 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
m_settings.setChannelMarker(&m_channelMarker);
|
||||
|
||||
@ -196,7 +197,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
||||
|
||||
WFMDemodGUI::~WFMDemodGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_wfmDemod;
|
||||
//delete m_channelMarker;
|
||||
delete ui;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "wfmdemodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class WFMDemod;
|
||||
|
||||
@ -22,7 +22,7 @@ class WFMDemodGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static WFMDemodGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static WFMDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -53,7 +53,7 @@ private slots:
|
||||
private:
|
||||
Ui::WFMDemodGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
WFMDemodSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -65,7 +65,7 @@ private:
|
||||
MovingAverage<double> m_channelPowerDbAvg;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~WFMDemodGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
const PluginDescriptor WFMPlugin::m_pluginDescriptor = {
|
||||
QString("WFM Demodulator"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -33,18 +33,18 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(WFMDemodGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* WFMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* WFMPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == WFMDemodGUI::m_channelID)
|
||||
{
|
||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void WFMPlugin::createInstanceWFM(DeviceSourceAPI *deviceAPI)
|
||||
void WFMPlugin::createInstanceWFM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
WFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
||||
WFMDemodGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class WFMPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -17,7 +17,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -25,7 +25,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceWFM(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceWFM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_WFMPLUGIN_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "tcpsrcgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "dsp/dspengine.h"
|
||||
@ -13,9 +14,9 @@
|
||||
|
||||
const QString TCPSrcGUI::m_channelID = "sdrangel.channel.tcpsrc";
|
||||
|
||||
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
TCPSrcGUI* TCPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceAPI);
|
||||
TCPSrcGUI* gui = new TCPSrcGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -121,11 +122,11 @@ void TCPSrcGUI::tick()
|
||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||
}
|
||||
|
||||
TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::TCPSrcGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_tcpSrc(0),
|
||||
m_channelMarker(this),
|
||||
m_channelPowerDbAvg(40,0),
|
||||
@ -140,7 +141,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_tcpSrc = new TCPSrc(m_deviceAPI);
|
||||
m_tcpSrc = new TCPSrc(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_tcpSrc->setSpectrum(m_spectrumVis);
|
||||
|
||||
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
|
||||
@ -164,9 +165,9 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
@ -178,7 +179,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
|
||||
|
||||
TCPSrcGUI::~TCPSrcGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_tcpSrc;
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "tcpsrcsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
class TCPSrc;
|
||||
class SpectrumVis;
|
||||
|
||||
@ -25,7 +25,7 @@ class TCPSrcGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static TCPSrcGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static TCPSrcGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -57,7 +57,7 @@ private slots:
|
||||
private:
|
||||
Ui::TCPSrcGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
TCPSrc* m_tcpSrc;
|
||||
ChannelMarker m_channelMarker;
|
||||
MovingAverage<double> m_channelPowerDbAvg;
|
||||
@ -77,7 +77,7 @@ private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit TCPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = 0);
|
||||
explicit TCPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~TCPSrcGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "../../channelrx/tcpsrc/tcpsrcplugin.h"
|
||||
#include "tcpsrcplugin.h"
|
||||
|
||||
#include <QtPlugin>
|
||||
#include "plugin/pluginapi.h"
|
||||
|
||||
#include "../../channelrx/tcpsrc/tcpsrcgui.h"
|
||||
#include "tcpsrcgui.h"
|
||||
|
||||
const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = {
|
||||
QString("TCP Channel Source"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -33,11 +33,11 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(TCPSrcGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == TCPSrcGUI::m_channelID)
|
||||
{
|
||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceUISet);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
@ -46,9 +46,9 @@ PluginInstanceGUI* TCPSrcPlugin::createRxChannel(const QString& channelName, Dev
|
||||
}
|
||||
}
|
||||
|
||||
void TCPSrcPlugin::createInstanceTCPSrc(DeviceSourceAPI *deviceAPI)
|
||||
void TCPSrcPlugin::createInstanceTCPSrc(DeviceUISet *deviceUISet)
|
||||
{
|
||||
TCPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||
TCPSrcGUI::create(m_pluginAPI, deviceUISet);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class TCPSrcPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -17,7 +17,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -25,7 +25,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceTCPSrc(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceTCPSrc(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_TCPSRCPLUGIN_H
|
||||
|
@ -28,7 +28,7 @@ Total power in dB relative to a +/- 1.0 amplitude signal sent over UDP.
|
||||
|
||||
<h3>4: UDP address and ports</h3>
|
||||
|
||||
These parameters are set with the basic channel settings dialog. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrbase/readme.md#6-channels)
|
||||
These parameters are set with the basic channel settings dialog. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrgui/readme.md#6-channels)
|
||||
|
||||
The display is in the format `address:audio port/data port`
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "udpsrcgui.h"
|
||||
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "dsp/dspengine.h"
|
||||
@ -31,9 +32,9 @@
|
||||
|
||||
const QString UDPSrcGUI::m_channelID = "sdrangel.channel.udpsrc";
|
||||
|
||||
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
|
||||
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceAPI);
|
||||
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -131,11 +132,11 @@ void UDPSrcGUI::tick()
|
||||
m_tickCount++;
|
||||
}
|
||||
|
||||
UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::UDPSrcGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_udpSrc(0),
|
||||
m_channelMarker(this),
|
||||
m_channelPowerAvg(4, 1e-10),
|
||||
@ -150,7 +151,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_udpSrc = new UDPSrc(m_deviceAPI);
|
||||
m_udpSrc = new UDPSrc(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_udpSrc->setSpectrum(m_spectrumVis);
|
||||
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
@ -184,9 +185,9 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
@ -197,7 +198,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
|
||||
|
||||
UDPSrcGUI::~UDPSrcGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_udpSrc;
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "udpsrcsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
class UDPSrc;
|
||||
class SpectrumVis;
|
||||
|
||||
@ -41,7 +41,7 @@ class UDPSrcGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static UDPSrcGUI* create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI);
|
||||
static UDPSrcGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -79,7 +79,7 @@ private slots:
|
||||
private:
|
||||
Ui::UDPSrcGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
UDPSrc* m_udpSrc;
|
||||
UDPSrcSettings m_settings;
|
||||
ChannelMarker m_channelMarker;
|
||||
@ -95,7 +95,7 @@ private:
|
||||
// RF path
|
||||
SpectrumVis* m_spectrumVis;
|
||||
|
||||
explicit UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = 0);
|
||||
explicit UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~UDPSrcGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
|
||||
QString("UDP Channel Source"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -50,11 +50,11 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(UDPSrcGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* UDPSrcPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == UDPSrcGUI::m_channelID)
|
||||
{
|
||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||
UDPSrcGUI* gui = UDPSrcGUI::create(m_pluginAPI, deviceUISet);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
@ -63,9 +63,9 @@ PluginInstanceGUI* UDPSrcPlugin::createRxChannel(const QString& channelName, Dev
|
||||
}
|
||||
}
|
||||
|
||||
void UDPSrcPlugin::createInstanceUDPSrc(DeviceSourceAPI *deviceAPI)
|
||||
void UDPSrcPlugin::createInstanceUDPSrc(DeviceUISet *deviceUISet)
|
||||
{
|
||||
UDPSrcGUI::create(m_pluginAPI, deviceAPI);
|
||||
UDPSrcGUI::create(m_pluginAPI, deviceUISet);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class UDPSrcPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI);
|
||||
PluginInstanceGUI* createRxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -42,7 +42,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceUDPSrc(DeviceSourceAPI *deviceAPI);
|
||||
void createInstanceUDPSrc(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_UDPSRCPLUGIN_H
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "ammodgui.h"
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/upchannelizer.h"
|
||||
|
||||
#include "ui_ammodgui.h"
|
||||
@ -35,9 +36,9 @@
|
||||
|
||||
const QString AMModGUI::m_channelID = "sdrangel.channeltx.modam";
|
||||
|
||||
AMModGUI* AMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
||||
AMModGUI* AMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
AMModGUI* gui = new AMModGUI(pluginAPI, deviceAPI);
|
||||
AMModGUI* gui = new AMModGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -267,11 +268,11 @@ void AMModGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::AMModGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -288,7 +289,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_amMod = new AMMod(m_deviceAPI);
|
||||
m_amMod = new AMMod(m_deviceUISet->m_deviceSinkAPI);
|
||||
m_amMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -305,9 +306,9 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->play->setEnabled(false);
|
||||
ui->play->setChecked(false);
|
||||
@ -326,7 +327,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
|
||||
|
||||
AMModGUI::~AMModGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeTxChannelInstance(this);
|
||||
delete m_amMod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "ammodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class AMMod;
|
||||
|
||||
@ -39,7 +39,7 @@ class AMModGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static AMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
||||
static AMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -83,7 +83,7 @@ private slots:
|
||||
private:
|
||||
Ui::AMModGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
AMModSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -101,7 +101,7 @@ private:
|
||||
AMMod::AMModInputAF m_modAFInput;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~AMModGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
|
||||
QString("AM Modulator"),
|
||||
QString("3.5.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -49,18 +49,18 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(AMModGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* AMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* AMModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == AMModGUI::m_channelID)
|
||||
{
|
||||
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceAPI);
|
||||
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void AMModPlugin::createInstanceModAM(DeviceSinkAPI *deviceAPI)
|
||||
void AMModPlugin::createInstanceModAM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
AMModGUI::create(m_pluginAPI, deviceAPI);
|
||||
AMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class AMModPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -28,12 +28,12 @@ class AMModPlugin : public QObject, PluginInterface {
|
||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ammod")
|
||||
|
||||
public:
|
||||
explicit AMModPlugin(QObject* parent = NULL);
|
||||
explicit AMModPlugin(QObject* parent = 0);
|
||||
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -41,7 +41,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceModAM(DeviceSinkAPI *deviceAPI);
|
||||
void createInstanceModAM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_AMMODPLUGIN_H
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "gui/basicchannelsettingswidget.h"
|
||||
@ -36,9 +37,9 @@
|
||||
|
||||
const QString ATVModGUI::m_channelID = "sdrangel.channeltx.modatv";
|
||||
|
||||
ATVModGUI* ATVModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
||||
ATVModGUI* ATVModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
ATVModGUI* gui = new ATVModGUI(pluginAPI, deviceAPI);
|
||||
ATVModGUI* gui = new ATVModGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -586,11 +587,11 @@ void ATVModGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::ATVModGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -608,7 +609,7 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_atvMod = new ATVMod(m_deviceAPI);
|
||||
m_atvMod = new ATVMod(m_deviceUISet->m_deviceSinkAPI);
|
||||
m_atvMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -624,9 +625,9 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
resetToDefaults();
|
||||
|
||||
@ -649,7 +650,7 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
ATVModGUI::~ATVModGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeTxChannelInstance(this);
|
||||
delete m_atvMod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "atvmodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ATVMod;
|
||||
class QMessageBox;
|
||||
@ -40,7 +40,7 @@ class ATVModGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
||||
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -99,7 +99,7 @@ private slots:
|
||||
private:
|
||||
Ui::ATVModGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
ATVModSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -119,7 +119,7 @@ private:
|
||||
int m_rfSliderDivisor;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~ATVModGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
|
||||
QString("ATV Modulator"),
|
||||
QString("3.7.5"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -49,20 +49,20 @@ void ATVModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(ATVModGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* ATVModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* ATVModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == ATVModGUI::m_channelID)
|
||||
{
|
||||
ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceAPI);
|
||||
ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ATVModPlugin::createInstanceModATV(DeviceSinkAPI *deviceAPI)
|
||||
void ATVModPlugin::createInstanceModATV(DeviceUISet *deviceUISet)
|
||||
{
|
||||
ATVModGUI::create(m_pluginAPI, deviceAPI);
|
||||
ATVModGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,12 +28,12 @@ class ATVModPlugin : public QObject, PluginInterface {
|
||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.atvmod")
|
||||
|
||||
public:
|
||||
explicit ATVModPlugin(QObject* parent = NULL);
|
||||
explicit ATVModPlugin(QObject* parent = 0);
|
||||
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -41,7 +41,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceModATV(DeviceSinkAPI *deviceAPI);
|
||||
void createInstanceModATV(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif /* PLUGINS_CHANNELTX_MODATV_ATVMODPLUGIN_H_ */
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
@ -34,9 +35,9 @@
|
||||
const QString NFMModGUI::m_channelID = "sdrangel.channeltx.modnfm";
|
||||
|
||||
|
||||
NFMModGUI* NFMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
||||
NFMModGUI* NFMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
NFMModGUI* gui = new NFMModGUI(pluginAPI, deviceAPI);
|
||||
NFMModGUI* gui = new NFMModGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -284,11 +285,11 @@ void NFMModGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::NFMModGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -316,7 +317,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_nfmMod = new NFMMod(m_deviceAPI);
|
||||
m_nfmMod = new NFMMod(m_deviceUISet->m_deviceSinkAPI);
|
||||
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -330,9 +331,9 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->play->setEnabled(false);
|
||||
ui->play->setChecked(false);
|
||||
@ -358,7 +359,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
NFMModGUI::~NFMModGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeTxChannelInstance(this);
|
||||
delete m_nfmMod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "nfmmodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
class NFMMod;
|
||||
|
||||
namespace Ui {
|
||||
@ -38,7 +38,7 @@ class NFMModGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static NFMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
||||
static NFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -86,7 +86,7 @@ private slots:
|
||||
private:
|
||||
Ui::NFMModGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
NFMModSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -104,7 +104,7 @@ private:
|
||||
NFMMod::NFMModInputAF m_modAFInput;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~NFMModGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
|
||||
QString("NFM Modulator"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -49,18 +49,18 @@ void NFMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(NFMModGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* NFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* NFMModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == NFMModGUI::m_channelID)
|
||||
{
|
||||
NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceAPI);
|
||||
NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void NFMModPlugin::createInstanceModNFM(DeviceSinkAPI *deviceAPI)
|
||||
void NFMModPlugin::createInstanceModNFM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
NFMModGUI::create(m_pluginAPI, deviceAPI);
|
||||
NFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class NFMModPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -28,12 +28,12 @@ class NFMModPlugin : public QObject, PluginInterface {
|
||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.nfmmod")
|
||||
|
||||
public:
|
||||
explicit NFMModPlugin(QObject* parent = NULL);
|
||||
explicit NFMModPlugin(QObject* parent = 0);
|
||||
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -41,7 +41,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceModNFM(DeviceSinkAPI *deviceAPI);
|
||||
void createInstanceModNFM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_NFMMODPLUGIN_H
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "ssbmodgui.h"
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "ui_ssbmodgui.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
@ -34,9 +35,9 @@
|
||||
|
||||
const QString SSBModGUI::m_channelID = "sdrangel.channeltx.modssb";
|
||||
|
||||
SSBModGUI* SSBModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
||||
SSBModGUI* SSBModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
SSBModGUI* gui = new SSBModGUI(pluginAPI, deviceAPI);
|
||||
SSBModGUI* gui = new SSBModGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -439,11 +440,11 @@ void SSBModGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::SSBModGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -462,7 +463,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_ssbMod = new SSBMod(m_deviceAPI, m_spectrumVis);
|
||||
m_ssbMod = new SSBMod(m_deviceUISet->m_deviceSinkAPI, m_spectrumVis);
|
||||
m_ssbMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
resetToDefaults();
|
||||
@ -488,9 +489,9 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->cwKeyerGUI->setBuddies(m_ssbMod->getInputMessageQueue(), m_ssbMod->getCWKeyer());
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
@ -509,7 +510,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
SSBModGUI::~SSBModGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete m_ssbMod;
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "ssbmodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class SSBMod;
|
||||
class SpectrumVis;
|
||||
@ -40,7 +40,7 @@ class SSBModGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static SSBModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
||||
static SSBModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -93,7 +93,7 @@ private slots:
|
||||
private:
|
||||
Ui::SSBModGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
SSBModSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -113,7 +113,7 @@ private:
|
||||
SSBMod::SSBModInputAF m_modAFInput;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~SSBModGUI();
|
||||
|
||||
int getEffectiveLowCutoff(int lowCutoff);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
||||
QString("SSB Modulator"),
|
||||
QString("3.7.5"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -49,18 +49,18 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(SSBModGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* SSBModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* SSBModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == SSBModGUI::m_channelID)
|
||||
{
|
||||
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceAPI);
|
||||
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SSBModPlugin::createInstanceModSSB(DeviceSinkAPI *deviceAPI)
|
||||
void SSBModPlugin::createInstanceModSSB(DeviceUISet *deviceUISet)
|
||||
{
|
||||
SSBModGUI::create(m_pluginAPI, deviceAPI);
|
||||
SSBModGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class SSBModPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -28,12 +28,12 @@ class SSBModPlugin : public QObject, PluginInterface {
|
||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ssbmod")
|
||||
|
||||
public:
|
||||
explicit SSBModPlugin(QObject* parent = NULL);
|
||||
explicit SSBModPlugin(QObject* parent = 0);
|
||||
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -41,7 +41,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceModSSB(DeviceSinkAPI *deviceAPI);
|
||||
void createInstanceModSSB(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SSBMODPLUGIN_H
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/upchannelizer.h"
|
||||
#include "dsp/threadedbasebandsamplesource.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
@ -35,9 +36,9 @@
|
||||
|
||||
const QString WFMModGUI::m_channelID = "sdrangel.channeltx.modwfm";
|
||||
|
||||
WFMModGUI* WFMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
||||
WFMModGUI* WFMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
WFMModGUI* gui = new WFMModGUI(pluginAPI, deviceAPI);
|
||||
WFMModGUI* gui = new WFMModGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -273,11 +274,11 @@ void WFMModGUI::onMenuDoubleClicked()
|
||||
}
|
||||
}
|
||||
|
||||
WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::WFMModGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false),
|
||||
m_doApplySettings(true),
|
||||
@ -305,7 +306,7 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_wfmMod = new WFMMod(m_deviceAPI);
|
||||
m_wfmMod = new WFMMod(m_deviceUISet->m_deviceSinkAPI);
|
||||
m_wfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -319,9 +320,9 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->play->setEnabled(false);
|
||||
ui->play->setChecked(false);
|
||||
@ -342,7 +343,7 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
WFMModGUI::~WFMModGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeTxChannelInstance(this);
|
||||
delete m_wfmMod;
|
||||
delete ui;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "wfmmodsettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class ThreadedBasebandSampleSource;
|
||||
class UpChannelizer;
|
||||
@ -41,7 +41,7 @@ class WFMModGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static WFMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
||||
static WFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -86,7 +86,7 @@ private slots:
|
||||
private:
|
||||
Ui::WFMModGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
WFMModSettings m_settings;
|
||||
bool m_basicSettingsShown;
|
||||
@ -106,7 +106,7 @@ private:
|
||||
WFMMod::WFMModInputAF m_modAFInput;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~WFMModGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
||||
QString("WFM Modulator"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -49,18 +49,18 @@ void WFMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(WFMModGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* WFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* WFMModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == WFMModGUI::m_channelID)
|
||||
{
|
||||
WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceAPI);
|
||||
WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void WFMModPlugin::createInstanceModWFM(DeviceSinkAPI *deviceAPI)
|
||||
void WFMModPlugin::createInstanceModWFM(DeviceUISet *deviceUISet)
|
||||
{
|
||||
WFMModGUI::create(m_pluginAPI, deviceAPI);
|
||||
WFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -41,7 +41,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceModWFM(DeviceSinkAPI *deviceAPI);
|
||||
void createInstanceModWFM(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_NFMMODPLUGIN_H
|
||||
|
@ -30,7 +30,7 @@ Use this button to switch off the RF on the channel. The background of the butto
|
||||
|
||||
<h3>5: UDP address and port</h3>
|
||||
|
||||
These parameters are set with the basic channel settings dialog. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrbase/readme.md#6-channels)
|
||||
These parameters are set with the basic channel settings dialog. See: [here](https://github.com/f4exb/sdrangel/blob/master/sdrgui/readme.md#6-channels)
|
||||
|
||||
The display is in the format `address:data port`
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/simpleserializer.h"
|
||||
@ -28,9 +29,9 @@
|
||||
|
||||
const QString UDPSinkGUI::m_channelID = "sdrangel.channeltx.udpsink";
|
||||
|
||||
UDPSinkGUI* UDPSinkGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
||||
UDPSinkGUI* UDPSinkGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||
{
|
||||
UDPSinkGUI* gui = new UDPSinkGUI(pluginAPI, deviceAPI);
|
||||
UDPSinkGUI* gui = new UDPSinkGUI(pluginAPI, deviceUISet);
|
||||
return gui;
|
||||
}
|
||||
|
||||
@ -102,11 +103,11 @@ void UDPSinkGUI::handleSourceMessages()
|
||||
}
|
||||
}
|
||||
|
||||
UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::UDPSinkGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_channelPowerAvg(4, 1e-10),
|
||||
m_inPowerAvg(4, 1e-10),
|
||||
m_tickCount(0),
|
||||
@ -120,7 +121,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||
m_udpSink = new UDPSink(m_deviceAPI, m_spectrumVis);
|
||||
m_udpSink = new UDPSink(m_deviceUISet->m_deviceSinkAPI, m_spectrumVis);
|
||||
m_udpSink->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
@ -146,9 +147,9 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
|
||||
|
||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||
|
||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
||||
m_deviceAPI->addRollupWidget(this);
|
||||
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||
|
||||
@ -161,7 +162,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
|
||||
|
||||
UDPSinkGUI::~UDPSinkGUI()
|
||||
{
|
||||
m_deviceAPI->removeChannelInstance(this);
|
||||
m_deviceUISet->removeTxChannelInstance(this);
|
||||
delete m_udpSink;
|
||||
delete m_spectrumVis;
|
||||
delete ui;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "udpsinksettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
class UDPSink;
|
||||
class SpectrumVis;
|
||||
|
||||
@ -40,7 +40,7 @@ class UDPSinkGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static UDPSinkGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
||||
static UDPSinkGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -80,7 +80,7 @@ private slots:
|
||||
private:
|
||||
Ui::UDPSinkGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
SpectrumVis* m_spectrumVis;
|
||||
UDPSink* m_udpSink;
|
||||
MovingAverage<double> m_channelPowerAvg;
|
||||
@ -94,7 +94,7 @@ private:
|
||||
bool m_doApplySettings;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = NULL);
|
||||
virtual ~UDPSinkGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = {
|
||||
QString("UDP Channel Sink"),
|
||||
QString("3.7.5"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -50,11 +50,11 @@ void UDPSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(UDPSinkGUI::m_channelID, this);
|
||||
}
|
||||
|
||||
PluginInstanceGUI* UDPSinkPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* UDPSinkPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(channelName == UDPSinkGUI::m_channelID)
|
||||
{
|
||||
UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceAPI);
|
||||
UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceUISet);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
@ -63,9 +63,9 @@ PluginInstanceGUI* UDPSinkPlugin::createTxChannel(const QString& channelName, De
|
||||
}
|
||||
}
|
||||
|
||||
void UDPSinkPlugin::createInstanceUDPSink(DeviceSinkAPI *deviceAPI)
|
||||
void UDPSinkPlugin::createInstanceUDPSink(DeviceUISet *deviceUISet)
|
||||
{
|
||||
UDPSinkGUI::create(m_pluginAPI, deviceAPI);
|
||||
UDPSinkGUI::create(m_pluginAPI, deviceUISet);
|
||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||
// m_pluginAPI->addChannelRollup(gui);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
class UDPSinkPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
@ -34,7 +34,7 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
@ -42,7 +42,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
|
||||
private slots:
|
||||
void createInstanceUDPSink(DeviceSinkAPI *deviceAPI);
|
||||
void createInstanceUDPSink(DeviceUISet *deviceUISet);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_UDPSINKPLUGIN_H
|
||||
|
@ -25,20 +25,21 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "bladerfoutputgui.h"
|
||||
#include "bladerf/devicebladerfvalues.h"
|
||||
|
||||
BladerfOutputGui::BladerfOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
BladerfOutputGui::BladerfOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::BladerfOutputGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_deviceSampleSink(NULL),
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState((DSPDeviceSinkEngine::State)-1)
|
||||
{
|
||||
m_deviceSampleSink = (BladerfOutput*) m_deviceAPI->getSampleSink();
|
||||
m_deviceSampleSink = (BladerfOutput*) m_deviceUISet->m_deviceSinkAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -61,7 +62,7 @@ BladerfOutputGui::BladerfOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
displaySettings();
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceUISet->m_deviceSinkAPI->getDeviceUID());
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
@ -166,8 +167,8 @@ void BladerfOutputGui::handleInputMessages()
|
||||
|
||||
void BladerfOutputGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateLabel->setText(QString("%1k").arg(QString::number(m_sampleRate/1000.0, 'g', 5)));
|
||||
}
|
||||
|
||||
@ -307,15 +308,15 @@ void BladerfOutputGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_deviceAPI->initGeneration())
|
||||
if (m_deviceUISet->m_deviceSinkAPI->initGeneration())
|
||||
{
|
||||
m_deviceAPI->startGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->startGeneration();
|
||||
DSPEngine::instance()->startAudioInput();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceAPI->stopGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->stopGeneration();
|
||||
DSPEngine::instance()->stopAudioInput();
|
||||
}
|
||||
}
|
||||
@ -331,7 +332,7 @@ void BladerfOutputGui::updateHardware()
|
||||
|
||||
void BladerfOutputGui::updateStatus()
|
||||
{
|
||||
int state = m_deviceAPI->state();
|
||||
int state = m_deviceUISet->m_deviceSinkAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -348,7 +349,7 @@ void BladerfOutputGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceSinkEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceSinkAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
#include "bladerfoutput.h"
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceSampleSink;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class BladerfOutputGui;
|
||||
@ -36,7 +36,7 @@ class BladerfOutputGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BladerfOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit BladerfOutputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~BladerfOutputGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
private:
|
||||
Ui::BladerfOutputGui* ui;
|
||||
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
BladeRFOutputSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
const PluginDescriptor BladerfOutputPlugin::m_pluginDescriptor = {
|
||||
QString("BladerRF Output"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -66,7 +66,10 @@ PluginInterface::SamplingDevices BladerfOutputPlugin::enumSampleSinks()
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
QString(devinfo[i].serial),
|
||||
i));
|
||||
i,
|
||||
PluginInterface::SamplingDevice::PhysicalDevice,
|
||||
false,
|
||||
0));
|
||||
}
|
||||
|
||||
if (devinfo)
|
||||
@ -77,11 +80,14 @@ PluginInterface::SamplingDevices BladerfOutputPlugin::enumSampleSinks()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* BladerfOutputPlugin::createSampleSinkPluginInstanceGUI(const QString& sinkId,QWidget **widget, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* BladerfOutputPlugin::createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sinkId == m_deviceTypeID)
|
||||
{
|
||||
BladerfOutputGui* gui = new BladerfOutputGui(deviceAPI);
|
||||
BladerfOutputGui* gui = new BladerfOutputGui(deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,12 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSinks();
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI);
|
||||
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet);
|
||||
|
||||
virtual DeviceSampleSink* createSampleSinkPluginInstanceOutput(const QString& sinkId, DeviceSinkAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -32,12 +32,13 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "filesinkgui.h"
|
||||
|
||||
FileSinkGui::FileSinkGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
FileSinkGui::FileSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FileSinkGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_fileName("./test.sdriq"),
|
||||
@ -59,14 +60,14 @@ FileSinkGui::FileSinkGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
|
||||
ui->fileNameText->setText(m_fileName);
|
||||
|
||||
connect(&(m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
connect(&(m_deviceUISet->m_deviceSinkAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
|
||||
m_deviceSampleSink = (FileSinkOutput*) m_deviceAPI->getSampleSink();
|
||||
m_deviceSampleSink = (FileSinkOutput*) m_deviceUISet->m_deviceSinkAPI->getSampleSink();
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
@ -177,8 +178,8 @@ void FileSinkGui::handleInputMessages()
|
||||
|
||||
void FileSinkGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)(m_sampleRate*(1<<m_settings.m_log2Interp)) / 1000));
|
||||
}
|
||||
|
||||
@ -206,7 +207,7 @@ void FileSinkGui::updateHardware()
|
||||
|
||||
void FileSinkGui::updateStatus()
|
||||
{
|
||||
int state = m_deviceAPI->state();
|
||||
int state = m_deviceUISet->m_deviceSinkAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -223,7 +224,7 @@ void FileSinkGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceSinkEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceSinkAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -260,9 +261,9 @@ void FileSinkGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_deviceAPI->initGeneration())
|
||||
if (m_deviceUISet->m_deviceSinkAPI->initGeneration())
|
||||
{
|
||||
if (!m_deviceAPI->startGeneration())
|
||||
if (!m_deviceUISet->m_deviceSinkAPI->startGeneration())
|
||||
{
|
||||
qDebug("FileSinkGui::on_startStop_toggled: device start failed");
|
||||
}
|
||||
@ -272,7 +273,7 @@ void FileSinkGui::on_startStop_toggled(bool checked)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceAPI->stopGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->stopGeneration();
|
||||
DSPEngine::instance()->stopAudioInput();
|
||||
}
|
||||
}
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include "filesinksettings.h"
|
||||
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceSampleSink;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class FileSinkGui;
|
||||
@ -38,7 +38,7 @@ class FileSinkGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileSinkGui(DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit FileSinkGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~FileSinkGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
private:
|
||||
Ui::FileSinkGui* ui;
|
||||
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
FileSinkSettings m_settings;
|
||||
QString m_fileName;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
const PluginDescriptor FileSinkPlugin::m_pluginDescriptor = {
|
||||
QString("File sink output"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -53,27 +53,28 @@ void FileSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
PluginInterface::SamplingDevices FileSinkPlugin::enumSampleSinks()
|
||||
{
|
||||
SamplingDevices result;
|
||||
int count = 1;
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
QString displayedName(QString("FileSink[%1]").arg(i));
|
||||
|
||||
result.append(SamplingDevice(displayedName,
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
QString::null,
|
||||
i));
|
||||
}
|
||||
result.append(SamplingDevice(
|
||||
"FileSink",
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
QString::null,
|
||||
0,
|
||||
PluginInterface::SamplingDevice::BuiltInDevice,
|
||||
false,
|
||||
0));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* FileSinkPlugin::createSampleSinkPluginInstanceGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* FileSinkPlugin::createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sinkId == m_deviceTypeID)
|
||||
{
|
||||
FileSinkGui* gui = new FileSinkGui(deviceAPI);
|
||||
FileSinkGui* gui = new FileSinkGui(deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -37,7 +37,10 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSinks();
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSink* createSampleSinkPluginInstanceOutput(const QString& sinkId, DeviceSinkAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -27,22 +27,23 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "hackrf/devicehackrfvalues.h"
|
||||
#include "hackrf/devicehackrfshared.h"
|
||||
|
||||
#include "ui_hackrfoutputgui.h"
|
||||
|
||||
HackRFOutputGui::HackRFOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::HackRFOutputGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_deviceSampleSink(0),
|
||||
m_lastEngineState((DSPDeviceSinkEngine::State)-1),
|
||||
m_doApplySettings(true)
|
||||
{
|
||||
m_deviceSampleSink = (HackRFOutput*) m_deviceAPI->getSampleSink();
|
||||
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceSinkAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -180,8 +181,8 @@ void HackRFOutputGui::handleInputMessages()
|
||||
|
||||
void HackRFOutputGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(QString("%1k").arg(QString::number(m_sampleRate/1000.0, 'g', 5)));
|
||||
}
|
||||
|
||||
@ -300,21 +301,21 @@ void HackRFOutputGui::on_startStop_toggled(bool checked)
|
||||
if (checked)
|
||||
{
|
||||
// forcibly stop the Rx if present before starting
|
||||
if (m_deviceAPI->getSourceBuddies().size() > 0)
|
||||
if (m_deviceUISet->m_deviceSinkAPI->getSourceBuddies().size() > 0)
|
||||
{
|
||||
DeviceSourceAPI *buddy = m_deviceAPI->getSourceBuddies()[0];
|
||||
DeviceSourceAPI *buddy = m_deviceUISet->m_deviceSinkAPI->getSourceBuddies()[0];
|
||||
buddy->stopAcquisition();
|
||||
}
|
||||
|
||||
if (m_deviceAPI->initGeneration())
|
||||
if (m_deviceUISet->m_deviceSinkAPI->initGeneration())
|
||||
{
|
||||
m_deviceAPI->startGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->startGeneration();
|
||||
DSPEngine::instance()->startAudioInput();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceAPI->stopGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->stopGeneration();
|
||||
DSPEngine::instance()->startAudioInput();
|
||||
}
|
||||
}
|
||||
@ -333,7 +334,7 @@ void HackRFOutputGui::updateHardware()
|
||||
|
||||
void HackRFOutputGui::updateStatus()
|
||||
{
|
||||
int state = m_deviceAPI->state();
|
||||
int state = m_deviceUISet->m_deviceSinkAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -351,7 +352,7 @@ void HackRFOutputGui::updateStatus()
|
||||
break;
|
||||
case DSPDeviceSinkEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceSinkAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
#define HACKRF_MAX_DEVICE (32)
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceSampleSink;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class HackRFOutputGui;
|
||||
@ -46,7 +46,7 @@ public:
|
||||
HACKRF_IMGREJ_NB
|
||||
} HackRFImgRejValue;
|
||||
|
||||
explicit HackRFOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~HackRFOutputGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
private:
|
||||
Ui::HackRFOutputGui* ui;
|
||||
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
HackRFOutputSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
const PluginDescriptor HackRFOutputPlugin::m_pluginDescriptor = {
|
||||
QString("HackRF Output"),
|
||||
QString("3.7.4"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -97,7 +97,10 @@ PluginInterface::SamplingDevices HackRFOutputPlugin::enumSampleSinks()
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
serial_str,
|
||||
i));
|
||||
i,
|
||||
PluginInterface::SamplingDevice::PhysicalDevice,
|
||||
false,
|
||||
0));
|
||||
|
||||
qDebug("HackRFOutputPlugin::enumSampleSinks: enumerated HackRF device #%d", i);
|
||||
|
||||
@ -116,11 +119,14 @@ PluginInterface::SamplingDevices HackRFOutputPlugin::enumSampleSinks()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* HackRFOutputPlugin::createSampleSinkPluginInstanceGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* HackRFOutputPlugin::createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sinkId == m_deviceTypeID)
|
||||
{
|
||||
HackRFOutputGui* gui = new HackRFOutputGui(deviceAPI);
|
||||
HackRFOutputGui* gui = new HackRFOutputGui(deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,10 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSinks();
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSink* createSampleSinkPluginInstanceOutput(const QString& sinkId, DeviceSinkAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -68,6 +68,8 @@ void LimeSDROutput::destroy()
|
||||
|
||||
bool LimeSDROutput::openDevice()
|
||||
{
|
||||
int requestedChannel = m_deviceAPI->getItemIndex();
|
||||
|
||||
// look for Tx buddies and get reference to common parameters
|
||||
// if there is a channel left take the first available
|
||||
if (m_deviceAPI->getSinkBuddies().size() > 0) // look sink sibling first
|
||||
@ -98,7 +100,8 @@ bool LimeSDROutput::openDevice()
|
||||
qDebug("LimeSDROutput::openDevice: at least one more Tx channel is available in device");
|
||||
}
|
||||
|
||||
// look for unused channel number
|
||||
// check if the requested channel is busy and abort if so (should not happen if device management is working correctly)
|
||||
|
||||
char *busyChannels = new char[deviceParams->m_nbTxChannels];
|
||||
memset(busyChannels, 0, deviceParams->m_nbTxChannels);
|
||||
|
||||
@ -107,21 +110,14 @@ bool LimeSDROutput::openDevice()
|
||||
DeviceSinkAPI *buddy = m_deviceAPI->getSinkBuddies()[i];
|
||||
DeviceLimeSDRShared *buddyShared = (DeviceLimeSDRShared *) buddy->getBuddySharedPtr();
|
||||
|
||||
if (buddyShared->m_channel >= 0) {
|
||||
busyChannels[buddyShared->m_channel] = 1;
|
||||
if (buddyShared->m_channel == requestedChannel)
|
||||
{
|
||||
qCritical("LimeSDROutput::openDevice: cannot open busy channel %u", requestedChannel);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::size_t ch = 0;
|
||||
|
||||
for (;ch < deviceParams->m_nbTxChannels; ch++)
|
||||
{
|
||||
if (busyChannels[ch] == 0) {
|
||||
break; // first available is the good one
|
||||
}
|
||||
}
|
||||
|
||||
m_deviceShared.m_channel = ch;
|
||||
m_deviceShared.m_channel = requestedChannel; // acknowledge the requested channel
|
||||
delete[] busyChannels;
|
||||
}
|
||||
// look for Rx buddies and get reference to common parameters
|
||||
@ -143,7 +139,7 @@ bool LimeSDROutput::openDevice()
|
||||
qDebug("LimeSDROutput::openDevice: getting device parameters from Rx buddy");
|
||||
}
|
||||
|
||||
m_deviceShared.m_channel = 0; // take first channel
|
||||
m_deviceShared.m_channel = requestedChannel; // acknowledge the requested channel
|
||||
}
|
||||
// There are no buddies then create the first LimeSDR common parameters
|
||||
// open the device this will also populate common fields
|
||||
@ -156,7 +152,7 @@ bool LimeSDROutput::openDevice()
|
||||
char serial[256];
|
||||
strcpy(serial, qPrintable(m_deviceAPI->getSampleSinkSerial()));
|
||||
m_deviceShared.m_deviceParams->open(serial);
|
||||
m_deviceShared.m_channel = 0; // take first channel
|
||||
m_deviceShared.m_channel = requestedChannel; // acknowledge the requested channel
|
||||
}
|
||||
|
||||
m_deviceAPI->setBuddySharedPtr(&m_deviceShared); // propagate common parameters to API
|
||||
|
@ -23,12 +23,13 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "limesdroutputgui.h"
|
||||
|
||||
LimeSDROutputGUI::LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::LimeSDROutputGUI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_settings(),
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState((DSPDeviceSinkEngine::State)-1),
|
||||
@ -37,7 +38,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
m_limeSDROutput = (LimeSDROutput*) m_deviceAPI->getSampleSink();
|
||||
m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceSinkAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -72,7 +73,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
||||
displaySettings();
|
||||
|
||||
char recFileNameCStr[30];
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
|
||||
sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceUISet->m_deviceSinkAPI->getDeviceUID());
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
|
||||
@ -238,8 +239,8 @@ void LimeSDROutputGUI::handleInputMessages()
|
||||
|
||||
void LimeSDROutputGUI::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateLabel->setText(tr("%1k").arg(QString::number(m_sampleRate / 1000.0f, 'g', 5)));
|
||||
}
|
||||
|
||||
@ -309,7 +310,7 @@ void LimeSDROutputGUI::updateHardware()
|
||||
|
||||
void LimeSDROutputGUI::updateStatus()
|
||||
{
|
||||
int state = m_deviceAPI->state();
|
||||
int state = m_deviceUISet->m_deviceSinkAPI->state();
|
||||
|
||||
if(m_lastEngineState != state)
|
||||
{
|
||||
@ -326,7 +327,7 @@ void LimeSDROutputGUI::updateStatus()
|
||||
break;
|
||||
case DSPDeviceSinkEngine::StError:
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
QMessageBox::information(this, tr("Message"), m_deviceAPI->errorMessage());
|
||||
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceSinkAPI->errorMessage());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -352,7 +353,7 @@ void LimeSDROutputGUI::updateStatus()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_deviceAPI->isBuddyLeader())
|
||||
if (m_deviceUISet->m_deviceSinkAPI->isBuddyLeader())
|
||||
{
|
||||
LimeSDROutput::MsgGetDeviceInfo* message = LimeSDROutput::MsgGetDeviceInfo::create();
|
||||
m_limeSDROutput->getInputMessageQueue()->push(message);
|
||||
@ -371,15 +372,15 @@ void LimeSDROutputGUI::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (m_deviceAPI->initGeneration())
|
||||
if (m_deviceUISet->m_deviceSinkAPI->initGeneration())
|
||||
{
|
||||
m_deviceAPI->startGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->startGeneration();
|
||||
DSPEngine::instance()->startAudioInput();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceAPI->stopGeneration();
|
||||
m_deviceUISet->m_deviceSinkAPI->stopGeneration();
|
||||
DSPEngine::instance()->stopAudioInput();
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
#include "limesdroutput.h"
|
||||
|
||||
class DeviceSinkAPI;
|
||||
class DeviceSampleSink;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class LimeSDROutputGUI;
|
||||
@ -36,7 +36,7 @@ class LimeSDROutputGUI : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LimeSDROutputGUI(DeviceSinkAPI *deviceAPI, QWidget* parent = 0);
|
||||
explicit LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~LimeSDROutputGUI();
|
||||
virtual void destroy();
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
private:
|
||||
Ui::LimeSDROutputGUI* ui;
|
||||
|
||||
DeviceSinkAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
LimeSDROutput* m_limeSDROutput; //!< Same object as above but gives easy access to LimeSDROutput methods and attributes that are used intensively
|
||||
LimeSDROutputSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -24,13 +24,14 @@
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "limesdr/devicelimesdrparam.h"
|
||||
|
||||
#include "limesdroutputgui.h"
|
||||
#include "limesdroutputplugin.h"
|
||||
|
||||
const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
|
||||
QString("LimeSDR Output"),
|
||||
QString("3.7.8"),
|
||||
QString("3.8.0"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
@ -82,13 +83,23 @@ PluginInterface::SamplingDevices LimeSDROutputPlugin::enumSampleSinks()
|
||||
std::string serial("N/D");
|
||||
findSerial((const char *) deviceList[i], serial);
|
||||
|
||||
qDebug("LimeSDROutputPlugin::enumSampleSources: device #%d: %s", i, (char *) deviceList[i]);
|
||||
QString displayedName(QString("LimeSDR[%1] %2").arg(i).arg(serial.c_str()));
|
||||
result.append(SamplingDevice(displayedName,
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
QString(deviceList[i]),
|
||||
i));
|
||||
DeviceLimeSDRParams limeSDRParams;
|
||||
limeSDRParams.open(deviceList[i]);
|
||||
limeSDRParams.close();
|
||||
|
||||
for (unsigned int j = 0; j < limeSDRParams.m_nbTxChannels; j++)
|
||||
{
|
||||
qDebug("LimeSDROutputPlugin::enumSampleSources: device #%d channel %u: %s", i, j, (char *) deviceList[i]);
|
||||
QString displayedName(QString("LimeSDR[%1:%2] %3").arg(i).arg(j).arg(serial.c_str()));
|
||||
result.append(SamplingDevice(displayedName,
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
QString(deviceList[i]),
|
||||
i,
|
||||
PluginInterface::SamplingDevice::PhysicalDevice,
|
||||
false,
|
||||
j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,11 +107,14 @@ PluginInterface::SamplingDevices LimeSDROutputPlugin::enumSampleSinks()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* LimeSDROutputPlugin::createSampleSinkPluginInstanceGUI(const QString& sinkId,QWidget **widget, DeviceSinkAPI *deviceAPI)
|
||||
PluginInstanceGUI* LimeSDROutputPlugin::createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sinkId == m_deviceTypeID)
|
||||
{
|
||||
LimeSDROutputGUI* gui = new LimeSDROutputGUI(deviceAPI);
|
||||
LimeSDROutputGUI* gui = new LimeSDROutputGUI(deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,10 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSinks();
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(const QString& sinkId, QWidget **widget, DeviceSinkAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSinkPluginInstanceGUI(
|
||||
const QString& sinkId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSink* createSampleSinkPluginInstanceOutput(const QString& sinkId, DeviceSinkAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|