diff --git a/Readme.md b/Readme.md index 6fee11eac..f0f299c33 100644 --- a/Readme.md +++ b/Readme.md @@ -21,13 +21,6 @@ These plugins come from the parent code base and have been maintained so that th - lora - tcpsrc (although it has evolved please use the udpsrc plugin instead) -

Unsupported plugins

- -These plugins come from the parent code base and are still present in the source tree but are not part of the build: - -- Channels: - - tetra -

Supported hardware

Multiple device support

diff --git a/plugins/channel/demodtetra/CMakeLists.txt b/plugins/channel/demodtetra/CMakeLists.txt deleted file mode 100644 index f46c2bb57..000000000 --- a/plugins/channel/demodtetra/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -project(tetra) - -set(tetra_SOURCES - tetrademod.cpp - tetrademodgui.cpp - tetraplugin.cpp -) - -set(tetra_HEADERS - tetrademod.h - tetrademodgui.h - tetraplugin.h -) - -set(tetra_FORMS - tetrademodgui.ui -) - -include_directories( - . - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/include-gpl - ${OPENGL_INCLUDE_DIR} -) - -#include(${QT_USE_FILE}) -add_definitions(${QT_DEFINITIONS}) -add_definitions(-DQT_PLUGIN) -add_definitions(-DQT_SHARED) - -#qt5_wrap_cpp(tetra_HEADERS_MOC ${tetra_HEADERS}) -qt5_wrap_ui(tetra_FORMS_HEADERS ${tetra_FORMS}) - -add_library(demodtetra SHARED - ${tetra_SOURCES} - ${tetra_HEADERS_MOC} - ${tetra_FORMS_HEADERS} -) - -target_link_libraries(demodtetra - ${QT_LIBRARIES} - ${OPENGL_LIBRARIES} - sdrbase -) - -qt5_use_modules(demodtetra Core Widgets OpenGL Multimedia) diff --git a/plugins/channel/demodtetra/tetrademod.cpp b/plugins/channel/demodtetra/tetrademod.cpp deleted file mode 100644 index c6027ad40..000000000 --- a/plugins/channel/demodtetra/tetrademod.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany // -// written by Christian Daniel // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#include -#include "tetrademod.h" -#include "dsp/dspcommands.h" - -MessageRegistrator TetraDemod::MsgConfigureTetraDemod::ID("MsgConfigureTetraDemod"); - -static FILE* f = NULL; - -TetraDemod::TetraDemod(SampleSink* sampleSink) : - m_sampleSink(sampleSink) -{ - m_sampleRate = 500000; - m_frequency = 0; - - m_nco.setFreq(m_frequency, m_sampleRate); - m_interpolator.create(32, 32 * m_sampleRate, 36000); - m_sampleDistanceRemain = (Real)m_sampleRate / 36000.0; -} - -TetraDemod::~TetraDemod() -{ -} - -void TetraDemod::configure(MessageQueue* messageQueue) -{ - Message* cmd = MsgConfigureTetraDemod::create(); - cmd->submit(messageQueue, this); -} - -void TetraDemod::feed(SampleVector::const_iterator begin, SampleVector::const_iterator end, bool positiveOnly) -{ - size_t count = end - begin; - - Complex ci; - bool consumed; - - for(SampleVector::const_iterator it = begin; it < end; ++it) { - Complex c(it->real() / 32768.0, it->imag() / 32768.0); - c *= m_nco.nextIQ(); - - consumed = false; - if(m_interpolator.interpolate(&m_sampleDistanceRemain, c, &consumed, &ci)) { - m_sampleBuffer.push_back(Sample(ci.real() * 32768.0, ci.imag() * 32768.0)); - - m_sampleDistanceRemain += (Real)m_sampleRate / 36000.0; - } - } - - if(f != NULL) { - fwrite(&m_sampleBuffer[0], m_sampleBuffer.size(), sizeof(m_sampleBuffer[0]), f); - } - - if(m_sampleSink != NULL) - m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), positiveOnly); - m_sampleBuffer.clear(); -} - -void TetraDemod::start() -{ -} - -void TetraDemod::stop() -{ -} - -bool TetraDemod::handleMessage(Message* cmd) -{ - if(cmd->id() == DSPSignalNotification::ID()) { - DSPSignalNotification* signal = (DSPSignalNotification*)cmd; - qDebug("%d samples/sec, %lld Hz offset", signal->getSampleRate(), signal->getFrequencyOffset()); - m_sampleRate = signal->getSampleRate(); - m_nco.setFreq(-signal->getFrequencyOffset(), m_sampleRate); - m_interpolator.create(32, m_sampleRate, 25000 / 2); - m_sampleDistanceRemain = m_sampleRate / 36000.0; - cmd->completed(); - return true; - } else if(cmd->id() == MsgConfigureTetraDemod::ID()) { - if(f == NULL) { - f = fopen("/tmp/tetra.iq", "wb"); - qDebug("started writing samples"); - } else { - fclose(f); - f = NULL; - qDebug("stopped writing samples"); - } - } else { - return false; - } -} diff --git a/plugins/channel/demodtetra/tetrademod.h b/plugins/channel/demodtetra/tetrademod.h deleted file mode 100644 index b031b58c1..000000000 --- a/plugins/channel/demodtetra/tetrademod.h +++ /dev/null @@ -1,67 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany // -// written by Christian Daniel // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDE_TETRADEMOD_H -#define INCLUDE_TETRADEMOD_H - -#include "dsp/samplesink.h" -#include "dsp/nco.h" -#include "dsp/interpolator.h" -#include "util/message.h" - -class MessageQueue; - -class TetraDemod : public SampleSink { -public: - TetraDemod(SampleSink* sampleSink); - ~TetraDemod(); - - void configure(MessageQueue* messageQueue); - - void feed(SampleVector::const_iterator begin, SampleVector::const_iterator end, bool positiveOnly); - void start(); - void stop(); - bool handleMessage(Message* cmd); - -private: - class MsgConfigureTetraDemod : public Message { - public: - static MessageRegistrator ID; - - static MsgConfigureTetraDemod* create() - { - return new MsgConfigureTetraDemod(); - } - - private: - MsgConfigureTetraDemod() : - Message(ID()) - { } - }; - - int m_sampleRate; - int m_frequency; - - NCO m_nco; - Interpolator m_interpolator; - Real m_sampleDistanceRemain; - - SampleSink* m_sampleSink; - SampleVector m_sampleBuffer; -}; - -#endif // INCLUDE_TETRADEMOD_H diff --git a/plugins/channel/demodtetra/tetrademodgui.cpp b/plugins/channel/demodtetra/tetrademodgui.cpp deleted file mode 100644 index 978f4f7a3..000000000 --- a/plugins/channel/demodtetra/tetrademodgui.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include -#include "tetrademodgui.h" -#include "ui_tetrademodgui.h" -#include "dsp/threadedsamplesink.h" -#include "dsp/channelizer.h" -#include "tetrademod.h" -#include "dsp/spectrumvis.h" -#include "gui/glspectrum.h" -#include "plugin/pluginapi.h" - -TetraDemodGUI* TetraDemodGUI::create(PluginAPI* pluginAPI) -{ - QDockWidget* dock = pluginAPI->createMainWindowDock(Qt::RightDockWidgetArea, tr("Tetra Demodulator")); - dock->setObjectName(QString::fromUtf8("Tetra Demodulator")); - TetraDemodGUI* gui = new TetraDemodGUI(pluginAPI, dock); - dock->setWidget(gui); - return gui; -} - -void TetraDemodGUI::destroy() -{ - delete m_dockWidget; -} - -void TetraDemodGUI::setWidgetName(const QString& name) -{ - m_dockWidget->setObjectName(name); -} - -void TetraDemodGUI::resetToDefaults() -{ -} - -QByteArray TetraDemodGUI::serializeGeneral() const -{ - return QByteArray(); -} - -bool TetraDemodGUI::deserializeGeneral(const QByteArray& data) -{ - return false; -} - -QByteArray TetraDemodGUI::serialize() const -{ - return QByteArray(); -} - -bool TetraDemodGUI::deserialize(const QByteArray& data) -{ - return false; -} - -bool TetraDemodGUI::handleMessage(Message* message) -{ - return false; -} - -void TetraDemodGUI::viewChanged() -{ - m_channelizer->configure(m_threadedSampleSink->getMessageQueue(), 36000, m_channelMarker->getCenterFrequency()); -} - -TetraDemodGUI::TetraDemodGUI(PluginAPI* pluginAPI, QDockWidget* dockWidget, QWidget* parent) : - PluginGUI(parent), - ui(new Ui::TetraDemodGUI), - m_pluginAPI(pluginAPI), - m_dockWidget(dockWidget) -{ - ui->setupUi(this); - - m_spectrumVis = new SpectrumVis(ui->glSpectrum); - m_tetraDemod = new TetraDemod(m_spectrumVis); - m_channelizer = new Channelizer(m_tetraDemod); - m_threadedSampleSink = new ThreadedSampleSink(m_channelizer); - m_pluginAPI->addSampleSink(m_threadedSampleSink); - - ui->glSpectrum->setCenterFrequency(0); - ui->glSpectrum->setSampleRate(36000); - ui->glSpectrum->setDisplayWaterfall(true); - ui->glSpectrum->setDisplayMaxHold(true); - m_spectrumVis->configure(m_threadedSampleSink->getMessageQueue(), 64, 10, FFTWindow::BlackmanHarris); - - m_channelMarker = new ChannelMarker(this); - m_channelMarker->setColor(Qt::darkGreen); - m_channelMarker->setBandwidth(25000); - m_channelMarker->setCenterFrequency(0); - m_channelMarker->setVisible(true); - connect(m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged())); - m_pluginAPI->addChannelMarker(m_channelMarker); - - viewChanged(); -} - -TetraDemodGUI::~TetraDemodGUI() -{ - m_pluginAPI->removeSampleSink(m_threadedSampleSink); - delete m_threadedSampleSink; - delete m_channelizer; - delete m_tetraDemod; - delete m_spectrumVis; - delete m_channelMarker; - delete ui; -} - -void TetraDemodGUI::on_test_clicked() -{ - m_tetraDemod->configure(m_threadedSampleSink->getMessageQueue()); -} diff --git a/plugins/channel/demodtetra/tetrademodgui.h b/plugins/channel/demodtetra/tetrademodgui.h deleted file mode 100644 index 9eacae61f..000000000 --- a/plugins/channel/demodtetra/tetrademodgui.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef INCLUDE_TETRADEMODGUI_H -#define INCLUDE_TETRADEMODGUI_H - -#include "plugin/plugingui.h" - -class QDockWidget; - -class PluginAPI; -class ChannelMarker; - -class ThreadedSampleSink; -class Channelizer; -class TetraDemod; -class SpectrumVis; - -namespace Ui { - class TetraDemodGUI; -} - -class TetraDemodGUI : public PluginGUI { - Q_OBJECT - -public: - static TetraDemodGUI* create(PluginAPI* pluginAPI); - void destroy(); - - void setWidgetName(const QString& name); - - void resetToDefaults(); - QByteArray serializeGeneral() const; - bool deserializeGeneral(const QByteArray& data); - QByteArray serialize() const; - bool deserialize(const QByteArray& data); - - bool handleMessage(Message* message); - -private slots: - void on_test_clicked(); - void viewChanged(); - -private: - explicit TetraDemodGUI(PluginAPI* pluginAPI, QDockWidget* dockWidget, QWidget* parent = NULL); - ~TetraDemodGUI(); - - Ui::TetraDemodGUI* ui; - PluginAPI* m_pluginAPI; - QDockWidget* m_dockWidget; - ChannelMarker* m_channelMarker; - - ThreadedSampleSink* m_threadedSampleSink; - Channelizer* m_channelizer; - TetraDemod* m_tetraDemod; - SpectrumVis* m_spectrumVis; -}; - -#endif // INCLUDE_TETRADEMODGUI_H diff --git a/plugins/channel/demodtetra/tetrademodgui.ui b/plugins/channel/demodtetra/tetrademodgui.ui deleted file mode 100644 index 620dae5a9..000000000 --- a/plugins/channel/demodtetra/tetrademodgui.ui +++ /dev/null @@ -1,71 +0,0 @@ - - - TetraDemodGUI - - - - 0 - 0 - 200 - 184 - - - - - Sans Serif - 9 - - - - Form - - - - 3 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 200 - 150 - - - - - - - - - - - - - - - - - - - - GLSpectrum - QWidget -
gui/glspectrum.h
- 1 -
-
- - -
diff --git a/plugins/channel/demodtetra/tetraplugin.cpp b/plugins/channel/demodtetra/tetraplugin.cpp deleted file mode 100644 index 9dc48cc3f..000000000 --- a/plugins/channel/demodtetra/tetraplugin.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include "plugin/pluginapi.h" -#include "tetraplugin.h" -#include "tetrademodgui.h" - -const PluginDescriptor TetraPlugin::m_pluginDescriptor = { - QString("Tetra Demodulator"), - QString("---"), - QString("(c) maintech GmbH (written by Christian Daniel)"), - QString("http://www.maintech.de"), - true, - QString("http://www.maintech.de") -}; - -TetraPlugin::TetraPlugin(QObject* parent) : - QObject(parent) -{ -} - -const PluginDescriptor& TetraPlugin::getPluginDescriptor() const -{ - return m_pluginDescriptor; -} - -void TetraPlugin::initPlugin(PluginAPI* pluginAPI) -{ - m_pluginAPI = pluginAPI; - - // register Tetra demodulator - QAction* action = new QAction(tr("&Tetra"), this); - connect(action, SIGNAL(triggered()), this, SLOT(createInstanceTetra())); - m_pluginAPI->registerDemodulator("de.maintech.sdrangelove.demod.tetra", this, action); -} - -PluginGUI* TetraPlugin::createDemod(const QString& demodName) -{ - if(demodName == "de.maintech.sdrangelove.demod.tetra") { - PluginGUI* gui = TetraDemodGUI::create(m_pluginAPI); - m_pluginAPI->registerDemodulatorInstance("de.maintech.sdrangelove.demod.tetra", gui); - return gui; - } else { - return NULL; - } -} - -void TetraPlugin::createInstanceTetra() -{ - m_pluginAPI->registerDemodulatorInstance("de.maintech.sdrangelove.demod.tetra", TetraDemodGUI::create(m_pluginAPI)); -} diff --git a/plugins/channel/demodtetra/tetraplugin.h b/plugins/channel/demodtetra/tetraplugin.h deleted file mode 100644 index ec94a18c4..000000000 --- a/plugins/channel/demodtetra/tetraplugin.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef INCLUDE_TETRAPLUGIN_H -#define INCLUDE_TETRAPLUGIN_H - -#include -#include "plugin/plugininterface.h" - -class TetraPlugin : public QObject, PluginInterface { - Q_OBJECT - Q_INTERFACES(PluginInterface) - Q_PLUGIN_METADATA(IID "de.maintech.sdrangelove.demod.tetra") - -public: - explicit TetraPlugin(QObject* parent = NULL); - - const PluginDescriptor& getPluginDescriptor() const; - void initPlugin(PluginAPI* pluginAPI); - - PluginGUI* createDemod(const QString& demodName); - -private: - static const PluginDescriptor m_pluginDescriptor; - - PluginAPI* m_pluginAPI; - -private slots: - void createInstanceTetra(); -}; - -#endif // INCLUDE_TETRAPLUGIN_H