diff --git a/.gitignore b/.gitignore index c00a34bf7..0d43e28ba 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,5 @@ debian/files debian/sdrangel.debhelper.log debian/debhelper-build-stamp obj-x86_64-linux-gnu/* -**/venv/ +**/venv*/ *.pyc diff --git a/app/main.cpp b/app/main.cpp index 004a66ab5..7dd1b8854 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo */ QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangel"); - QCoreApplication::setApplicationVersion("4.5.1"); + QCoreApplication::setApplicationVersion("4.5.2"); #if QT_VERSION >= 0x050600 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps diff --git a/appbench/main.cpp b/appbench/main.cpp index aeafcad9b..357c43735 100644 --- a/appbench/main.cpp +++ b/appbench/main.cpp @@ -57,7 +57,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangelBench"); - QCoreApplication::setApplicationVersion("4.5.1"); + QCoreApplication::setApplicationVersion("4.5.2"); int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP}; std::vector vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int)); diff --git a/appsrv/main.cpp b/appsrv/main.cpp index 2d192d845..5f95a99aa 100644 --- a/appsrv/main.cpp +++ b/appsrv/main.cpp @@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangelSrv"); - QCoreApplication::setApplicationVersion("4.5.1"); + QCoreApplication::setApplicationVersion("4.5.2"); int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP}; std::vector vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int)); diff --git a/debian/changelog b/debian/changelog index 5aec66590..7e8b5bb31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sdrangel (4.5.2-1) unstable; urgency=medium + + * Send device and channel index in reverse API. Implements issue #312. + + -- Edouard Griffiths, F4EXB Sat, 30 Mar 2019 20:14:18 +0100 + sdrangel (4.5.1-1) unstable; urgency=medium * DATV demod: implemented audio processing diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index c3c733777..17c0b33a0 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -718,6 +718,8 @@ void AMDemod::webapiReverseSendSettings(QList& channelSettingsKeys, con { SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); swgChannelSettings->setTx(0); + swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); + swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); swgChannelSettings->setChannelType(new QString("AMDemod")); swgChannelSettings->setAmDemodSettings(new SWGSDRangel::SWGAMDemodSettings()); SWGSDRangel::SWGAMDemodSettings *swgAMDemodSettings = swgChannelSettings->getAmDemodSettings(); diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index fb36f8fc9..7198ba782 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -9,7 +9,7 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = { QString("AM Demodulator"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 39f9680ee..770228200 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -779,6 +779,8 @@ void AMMod::webapiReverseSendSettings(QList& channelSettingsKeys, const { SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); swgChannelSettings->setTx(1); + swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); + swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); swgChannelSettings->setChannelType(new QString("AMMod")); swgChannelSettings->setAmModSettings(new SWGSDRangel::SWGAMModSettings()); SWGSDRangel::SWGAMModSettings *swgAMModSettings = swgChannelSettings->getAmModSettings(); diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index e41cfab52..a762c3d5d 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -25,7 +25,7 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = { QString("AM Modulator"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesink/limesdroutput/limesdroutput.cpp b/plugins/samplesink/limesdroutput/limesdroutput.cpp index ee5b64287..7688caa98 100644 --- a/plugins/samplesink/limesdroutput/limesdroutput.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutput.cpp @@ -1435,6 +1435,7 @@ void LimeSDROutput::webapiReverseSendSettings(QList& deviceSettingsKeys { SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings(); swgDeviceSettings->setTx(1); + swgDeviceSettings->setOriginatorIndex(m_deviceAPI->getDeviceSetIndex()); swgDeviceSettings->setDeviceHwType(new QString("LimeSDR")); swgDeviceSettings->setLimeSdrOutputSettings(new SWGSDRangel::SWGLimeSdrOutputSettings()); SWGSDRangel::SWGLimeSdrOutputSettings *swgLimeSdrOutputSettings = swgDeviceSettings->getLimeSdrOutputSettings(); diff --git a/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp b/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp index 80dc81946..9efa2322c 100644 --- a/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp @@ -34,7 +34,7 @@ const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = { QString("LimeSDR Output"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index f180309b0..bc573d993 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -763,6 +763,7 @@ void RTLSDRInput::webapiReverseSendSettings(QList& deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings(); swgDeviceSettings->setTx(0); swgDeviceSettings->setDeviceHwType(new QString("RTLSDR")); + swgDeviceSettings->setOriginatorIndex(m_deviceAPI->getDeviceSetIndex()); swgDeviceSettings->setRtlSdrSettings(new SWGSDRangel::SWGRtlSdrSettings()); SWGSDRangel::SWGRtlSdrSettings *swgRtlSdrSettings = swgDeviceSettings->getRtlSdrSettings(); diff --git a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp index 71d94126b..d590d4e31 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp @@ -14,7 +14,7 @@ const PluginDescriptor RTLSDRPlugin::m_pluginDescriptor = { QString("RTL-SDR Input"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/sdrbase/channel/channelsinkapi.h b/sdrbase/channel/channelsinkapi.h index ebebe1adf..6b904132a 100644 --- a/sdrbase/channel/channelsinkapi.h +++ b/sdrbase/channel/channelsinkapi.h @@ -76,6 +76,8 @@ public: int getIndexInDeviceSet() const { return m_indexInDeviceSet; } void setIndexInDeviceSet(int indexInDeviceSet) { m_indexInDeviceSet = indexInDeviceSet; } + int getDeviceSetIndex() const { return m_deviceSetIndex; } + void setDeviceSetIndex(int deviceSetIndex) { m_deviceSetIndex = deviceSetIndex; } uint64_t getUID() const { return m_uid; } private: @@ -85,6 +87,7 @@ private: QString m_name; int m_indexInDeviceSet; + int m_deviceSetIndex; uint64_t m_uid; }; diff --git a/sdrbase/channel/channelsourceapi.h b/sdrbase/channel/channelsourceapi.h index 48d02c108..32e0c8888 100644 --- a/sdrbase/channel/channelsourceapi.h +++ b/sdrbase/channel/channelsourceapi.h @@ -75,6 +75,8 @@ public: int getIndexInDeviceSet() const { return m_indexInDeviceSet; } void setIndexInDeviceSet(int indexInDeviceSet) { m_indexInDeviceSet = indexInDeviceSet; } + int getDeviceSetIndex() const { return m_deviceSetIndex; } + void setDeviceSetIndex(int deviceSetIndex) { m_deviceSetIndex = deviceSetIndex; } uint64_t getUID() const { return m_uid; } private: @@ -84,6 +86,7 @@ private: QString m_name; int m_indexInDeviceSet; + int m_deviceSetIndex; uint64_t m_uid; }; diff --git a/sdrbase/device/devicesinkapi.cpp b/sdrbase/device/devicesinkapi.cpp index 1e816a8ea..a3e7fdea7 100644 --- a/sdrbase/device/devicesinkapi.cpp +++ b/sdrbase/device/devicesinkapi.cpp @@ -98,8 +98,10 @@ ChannelSourceAPI *DeviceSinkAPI::getChanelAPIAt(int index) void DeviceSinkAPI::renumerateChannels() { - for (int i = 0; i < m_channelAPIs.size(); ++i) { + for (int i = 0; i < m_channelAPIs.size(); ++i) + { m_channelAPIs.at(i)->setIndexInDeviceSet(i); + m_channelAPIs.at(i)->setDeviceSetIndex(m_deviceTabIndex); } } diff --git a/sdrbase/device/devicesinkapi.h b/sdrbase/device/devicesinkapi.h index 1467dd64b..a59e7bd1d 100644 --- a/sdrbase/device/devicesinkapi.h +++ b/sdrbase/device/devicesinkapi.h @@ -81,6 +81,7 @@ public: uint32_t getSampleSinkSequence() const { return m_sampleSinkSequence; } uint32_t getNbItems() const { return m_nbItems; } uint32_t getItemIndex() const { return m_itemIndex; } + int getDeviceSetIndex() const { return m_deviceTabIndex; } PluginInterface *getPluginInterface() { return m_pluginInterface; } PluginInstanceGUI *getSampleSinkPluginInstanceGUI() { return m_sampleSinkPluginInstanceUI; } void getDeviceEngineStateStr(QString& state); diff --git a/sdrbase/device/devicesourceapi.cpp b/sdrbase/device/devicesourceapi.cpp index dc0e2584a..884210f9c 100644 --- a/sdrbase/device/devicesourceapi.cpp +++ b/sdrbase/device/devicesourceapi.cpp @@ -88,8 +88,10 @@ ChannelSinkAPI *DeviceSourceAPI::getChanelAPIAt(int index) void DeviceSourceAPI::renumerateChannels() { - for (int i = 0; i < m_channelAPIs.size(); ++i) { + for (int i = 0; i < m_channelAPIs.size(); ++i) + { m_channelAPIs.at(i)->setIndexInDeviceSet(i); + m_channelAPIs.at(i)->setDeviceSetIndex(m_deviceTabIndex); } } diff --git a/sdrbase/device/devicesourceapi.h b/sdrbase/device/devicesourceapi.h index 72286b7ec..6cf5a1f0b 100644 --- a/sdrbase/device/devicesourceapi.h +++ b/sdrbase/device/devicesourceapi.h @@ -81,6 +81,7 @@ public: uint32_t getSampleSourceSequence() const { return m_sampleSourceSequence; } uint32_t getNbItems() const { return m_nbItems; } uint32_t getItemIndex() const { return m_itemIndex; } + int getDeviceSetIndex() const { return m_deviceTabIndex; } PluginInterface *getPluginInterface() { return m_pluginInterface; } PluginInstanceGUI *getSampleSourcePluginInstanceGUI() { return m_sampleSourcePluginInstanceUI; } void getDeviceEngineStateStr(QString& state); @@ -107,7 +108,7 @@ public: const QTimer& getMasterTimer() const { return m_masterTimer; } //!< This is the DSPEngine master timer protected: - int m_deviceTabIndex; + int m_deviceTabIndex; //!< This is the tab index in the GUI and also the device set index DSPDeviceSourceEngine *m_deviceSourceEngine; QString m_hardwareId; //!< The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...) diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 87024274d..81c572e48 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1806,6 +1806,14 @@ margin-bottom: 20px; "type" : "integer", "description" : "Not zero if it is a tx channel else it is a rx channel" }, + "originatorDeviceSetIndex" : { + "type" : "integer", + "description" : "Optional for reverse API. This is the device set index from where the message comes from." + }, + "originatorChannelIndex" : { + "type" : "integer", + "description" : "Optional for reverse API. This is the channel index from where the message comes from." + }, "AMDemodSettings" : { "$ref" : "#/definitions/AMDemodSettings" }, @@ -2230,6 +2238,10 @@ margin-bottom: 20px; "type" : "integer", "description" : "Not zero if it is a tx device else it is a rx device" }, + "originatorIndex" : { + "type" : "integer", + "description" : "Optional for reverse API. This is the device set index from where the message comes from." + }, "airspySettings" : { "$ref" : "#/definitions/AirspySettings" }, @@ -5666,7 +5678,7 @@ margin-bottom: 20px;