diff --git a/sdrbase/dsp/dspengine.cpp b/sdrbase/dsp/dspengine.cpp index 9c4960887..0de1bfe22 100644 --- a/sdrbase/dsp/dspengine.cpp +++ b/sdrbase/dsp/dspengine.cpp @@ -31,6 +31,7 @@ DSPEngine::DSPEngine() : m_audioOutputDeviceIndex(-1) // default device { m_dvSerialSupport = false; + m_mimoSupport = false; m_masterTimer.start(50); } diff --git a/sdrbase/dsp/dspengine.h b/sdrbase/dsp/dspengine.h index e509cf858..2a5da338e 100644 --- a/sdrbase/dsp/dspengine.h +++ b/sdrbase/dsp/dspengine.h @@ -75,6 +75,8 @@ public: AudioFifo *audioFifo); const QTimer& getMasterTimer() const { return m_masterTimer; } + void setMIMOSupport(bool mimoSupport) { m_mimoSupport = mimoSupport; } + bool getMIMOSupport() const { return m_mimoSupport; } private: std::vector m_deviceSourceEngines; @@ -86,6 +88,7 @@ private: int m_audioOutputDeviceIndex; QTimer m_masterTimer; bool m_dvSerialSupport; + bool m_mimoSupport; #ifdef DSD_USE_SERIALDV DVSerialEngine m_dvSerialEngine; #endif diff --git a/sdrbase/mainparser.cpp b/sdrbase/mainparser.cpp index b7b383ec5..b1e935ea2 100644 --- a/sdrbase/mainparser.cpp +++ b/sdrbase/mainparser.cpp @@ -30,10 +30,12 @@ MainParser::MainParser() : m_serverPortOption(QStringList() << "p" << "api-port", "Web API server port.", "port", - "8091") + "8091"), + m_mimoOption("mimo", "Activate MIMO functionality") { m_serverAddress = "127.0.0.1"; m_serverPort = 8091; + m_mimoOption.setFlags(QCommandLineOption::HiddenFromHelp); m_parser.setApplicationDescription("Software Defined Radio application"); m_parser.addHelpOption(); @@ -41,6 +43,7 @@ MainParser::MainParser() : m_parser.addOption(m_serverAddressOption); m_parser.addOption(m_serverPortOption); + m_parser.addOption(m_mimoOption); } MainParser::~MainParser() @@ -80,4 +83,8 @@ void MainParser::parse(const QCoreApplication& app) } else { qWarning() << "MainParser::parse: server port invalid. Defaulting to " << m_serverPort; } + + // MIMO + + m_mimoSupport = m_parser.isSet(m_mimoOption); } diff --git a/sdrbase/mainparser.h b/sdrbase/mainparser.h index 130153c91..197eb19eb 100644 --- a/sdrbase/mainparser.h +++ b/sdrbase/mainparser.h @@ -34,14 +34,17 @@ public: const QString& getServerAddress() const { return m_serverAddress; } uint16_t getServerPort() const { return m_serverPort; } + bool getMIMOSupport() const { return m_mimoSupport; } private: QString m_serverAddress; uint16_t m_serverPort; + bool m_mimoSupport; QCommandLineParser m_parser; QCommandLineOption m_serverAddressOption; QCommandLineOption m_serverPortOption; + QCommandLineOption m_mimoOption; }; diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index ffc5c376e..d161d6b42 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -215,6 +215,8 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse m_commandKeyReceiver->setRelease(true); this->installEventFilter(m_commandKeyReceiver); + m_dspEngine->setMIMOSupport(parser.getMIMOSupport()); + qDebug() << "MainWindow::MainWindow: end"; } diff --git a/sdrsrv/maincore.cpp b/sdrsrv/maincore.cpp index d31e68f58..a6b2e0c45 100644 --- a/sdrsrv/maincore.cpp +++ b/sdrsrv/maincore.cpp @@ -84,6 +84,8 @@ MainCore::MainCore(qtwebapp::LoggerWithFile *logger, const MainParser& parser, Q m_apiServer = new WebAPIServer(parser.getServerAddress(), parser.getServerPort(), m_requestMapper); m_apiServer->start(); + m_dspEngine->setMIMOSupport(parser.getMIMOSupport()); + qDebug() << "MainCore::MainCore: end"; }