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