diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index bc2fa2c04..735ab1a3d 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -8,7 +8,7 @@ const PluginDescriptor WFMPlugin::m_pluginDescriptor = { QString("WFM Demodulator"), - QString("3.14.5"), + QString("4.0.0"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.cpp b/plugins/channelrx/udpsrc/udpsrcplugin.cpp index c6e52b8f9..d623733eb 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.cpp +++ b/plugins/channelrx/udpsrc/udpsrcplugin.cpp @@ -25,7 +25,7 @@ const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = { QString("UDP Channel Source"), - QString("3.14.5"), + QString("4.0.0"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index 1bda2b1c8..a1517425a 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -56,6 +56,7 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) : m_rates = ((AirspyInput*) m_sampleSource)->getSampleRates(); displaySampleRates(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); sendSettings(); } diff --git a/plugins/samplesource/airspy/airspyinput.cpp b/plugins/samplesource/airspy/airspyinput.cpp index 6a5321718..b6ceca4b9 100644 --- a/plugins/samplesource/airspy/airspyinput.cpp +++ b/plugins/samplesource/airspy/airspyinput.cpp @@ -616,3 +616,110 @@ int AirspyInput::webapiRun( return 200; } +int AirspyInput::webapiSettingsGet( + SWGSDRangel::SWGDeviceSettings& response, + QString& errorMessage __attribute__((unused))) +{ + response.setAirspySettings(new SWGSDRangel::SWGAirspySettings()); + response.getAirspySettings()->init(); + webapiFormatDeviceSettings(response, m_settings); + return 200; +} + +int AirspyInput::webapiSettingsPutPatch( + bool force, + const QStringList& deviceSettingsKeys, + SWGSDRangel::SWGDeviceSettings& response, // query + response + QString& errorMessage __attribute__((unused))) +{ + AirspySettings settings = m_settings; + + if (deviceSettingsKeys.contains("centerFrequency")) { + settings.m_centerFrequency = response.getAirspySettings()->getCenterFrequency(); + } + if (deviceSettingsKeys.contains("LOppmTenths")) { + settings.m_LOppmTenths = response.getAirspySettings()->getLOppmTenths(); + } + if (deviceSettingsKeys.contains("devSampleRateIndex")) { + settings.m_devSampleRateIndex = response.getAirspySettings()->getDevSampleRateIndex(); + } + if (deviceSettingsKeys.contains("lnaGain")) { + settings.m_lnaGain = response.getAirspySettings()->getLnaGain(); + } + if (deviceSettingsKeys.contains("mixerGain")) { + settings.m_mixerGain = response.getAirspySettings()->getMixerGain(); + } + if (deviceSettingsKeys.contains("vgaGain")) { + settings.m_vgaGain = response.getAirspySettings()->getVgaGain(); + } + if (deviceSettingsKeys.contains("vgaGain")) { + settings.m_vgaGain = response.getAirspySettings()->getVgaGain(); + } + if (deviceSettingsKeys.contains("lnaAGC")) { + settings.m_lnaAGC = response.getAirspySettings()->getLnaAgc() != 0; + } + if (deviceSettingsKeys.contains("mixerAGC")) { + settings.m_mixerAGC = response.getAirspySettings()->getMixerAgc() != 0; + } + if (deviceSettingsKeys.contains("log2Decim")) { + settings.m_log2Decim = response.getAirspySettings()->getLog2Decim(); + } + if (deviceSettingsKeys.contains("fcPos")) { + settings.m_fcPos = (AirspySettings::fcPos_t) response.getAirspySettings()->getFcPos(); + } + if (deviceSettingsKeys.contains("biasT")) { + settings.m_biasT = response.getAirspySettings()->getBiasT() != 0; + } + if (deviceSettingsKeys.contains("dcBlock")) { + settings.m_dcBlock = response.getAirspySettings()->getDcBlock() != 0; + } + if (deviceSettingsKeys.contains("iqCorrection")) { + settings.m_iqCorrection = response.getAirspySettings()->getIqCorrection() != 0; + } + if (deviceSettingsKeys.contains("transverterDeltaFrequency")) { + settings.m_transverterDeltaFrequency = response.getAirspySettings()->getTransverterDeltaFrequency(); + } + if (deviceSettingsKeys.contains("transverterMode")) { + settings.m_transverterMode = response.getAirspySettings()->getTransverterMode() != 0; + } + if (deviceSettingsKeys.contains("fileRecordName")) { + settings.m_fileRecordName = *response.getAirspySettings()->getFileRecordName(); + } + + MsgConfigureAirspy *msg = MsgConfigureAirspy::create(settings, force); + m_inputMessageQueue.push(msg); + + if (m_guiMessageQueue) // forward to GUI if any + { + MsgConfigureAirspy *msgToGUI = MsgConfigureAirspy::create(settings, force); + m_guiMessageQueue->push(msgToGUI); + } + + webapiFormatDeviceSettings(response, settings); + return 200; +} + +void AirspyInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const AirspySettings& settings) +{ + response.getAirspySettings()->setCenterFrequency(settings.m_centerFrequency); + response.getAirspySettings()->setLOppmTenths(settings.m_LOppmTenths); + response.getAirspySettings()->setDevSampleRateIndex(settings.m_devSampleRateIndex); + response.getAirspySettings()->setLnaGain(settings.m_lnaGain); + response.getAirspySettings()->setMixerGain(settings.m_mixerGain); + response.getAirspySettings()->setVgaGain(settings.m_vgaGain); + response.getAirspySettings()->setLnaAgc(settings.m_lnaAGC ? 1 : 0); + response.getAirspySettings()->setMixerAgc(settings.m_mixerAGC ? 1 : 0); + response.getAirspySettings()->setLog2Decim(settings.m_log2Decim); + response.getAirspySettings()->setFcPos((int) settings.m_fcPos); + response.getAirspySettings()->setBiasT(settings.m_biasT ? 1 : 0); + response.getAirspySettings()->setDcBlock(settings.m_dcBlock ? 1 : 0); + response.getAirspySettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0); + response.getAirspySettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency); + response.getAirspySettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0); + + if (response.getAirspySettings()->getFileRecordName()) { + *response.getAirspySettings()->getFileRecordName() = settings.m_fileRecordName; + } else { + response.getAirspySettings()->setFileRecordName(new QString(settings.m_fileRecordName)); + } +} diff --git a/plugins/samplesource/airspy/airspyinput.h b/plugins/samplesource/airspy/airspyinput.h index d120c155d..33bf6552e 100644 --- a/plugins/samplesource/airspy/airspyinput.h +++ b/plugins/samplesource/airspy/airspyinput.h @@ -111,6 +111,16 @@ public: virtual bool handleMessage(const Message& message); + virtual int webapiSettingsGet( + SWGSDRangel::SWGDeviceSettings& response, + QString& errorMessage); + + virtual int webapiSettingsPutPatch( + bool force, + const QStringList& deviceSettingsKeys, + SWGSDRangel::SWGDeviceSettings& response, // query + response + QString& errorMessage); + virtual int webapiRunGet( SWGSDRangel::SWGDeviceState& response, QString& errorMessage); @@ -129,6 +139,7 @@ private: bool applySettings(const AirspySettings& settings, bool force); struct airspy_device *open_airspy_from_sequence(int sequence); void setDeviceCenterFrequency(quint64 freq); + void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const AirspySettings& settings); DeviceSourceAPI *m_deviceAPI; QMutex m_mutex; diff --git a/plugins/samplesource/airspyhf/airspyhfgui.cpp b/plugins/samplesource/airspyhf/airspyhfgui.cpp index 745e3951b..3ce6e2e57 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.cpp +++ b/plugins/samplesource/airspyhf/airspyhfgui.cpp @@ -55,6 +55,7 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) : m_rates = ((AirspyHFInput*) m_sampleSource)->getSampleRates(); displaySampleRates(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); sendSettings(); } diff --git a/plugins/samplesource/bladerfinput/bladerfinputgui.cpp b/plugins/samplesource/bladerfinput/bladerfinputgui.cpp index c3b264b80..1e4b8979d 100644 --- a/plugins/samplesource/bladerfinput/bladerfinputgui.cpp +++ b/plugins/samplesource/bladerfinput/bladerfinputgui.cpp @@ -63,6 +63,7 @@ BladerfInputGui::BladerfInputGui(DeviceUISet *deviceUISet, QWidget* parent) : displaySettings(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); sendSettings(); } diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index 16692ce68..d2bd2765e 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -146,6 +146,7 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) : displaySettings(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } FCDProGui::~FCDProGui() diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp index 77bd5aa17..2a67120a1 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp @@ -64,6 +64,7 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) : displaySettings(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } FCDProPlusGui::~FCDProPlusGui() diff --git a/plugins/samplesource/filesource/filesourcegui.cpp b/plugins/samplesource/filesource/filesourcegui.cpp index 918eff372..23f27a956 100644 --- a/plugins/samplesource/filesource/filesourcegui.cpp +++ b/plugins/samplesource/filesource/filesourcegui.cpp @@ -71,6 +71,7 @@ FileSourceGui::FileSourceGui(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleSource = m_deviceUISet->m_deviceSourceAPI->getSampleSource(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } FileSourceGui::~FileSourceGui() diff --git a/plugins/samplesource/hackrfinput/hackrfinputgui.cpp b/plugins/samplesource/hackrfinput/hackrfinputgui.cpp index f45962dd6..9868313f2 100644 --- a/plugins/samplesource/hackrfinput/hackrfinputgui.cpp +++ b/plugins/samplesource/hackrfinput/hackrfinputgui.cpp @@ -59,6 +59,7 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) : displayBandwidths(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); sendSettings(); } diff --git a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp index 10a930672..dc243470f 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp @@ -76,6 +76,7 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : displaySettings(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_limeSDRInput->setMessageQueueToGUI(&m_inputMessageQueue); } LimeSDRInputGUI::~LimeSDRInputGUI() diff --git a/plugins/samplesource/perseus/perseusgui.cpp b/plugins/samplesource/perseus/perseusgui.cpp index f25f30afd..b2764a2eb 100644 --- a/plugins/samplesource/perseus/perseusgui.cpp +++ b/plugins/samplesource/perseus/perseusgui.cpp @@ -53,6 +53,7 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) : m_rates = m_sampleSource->getSampleRates(); displaySampleRates(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); sendSettings(); } diff --git a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp index 302f2a882..af07995d1 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp @@ -68,6 +68,7 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_statusTimer.start(500); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } PlutoSDRInputGui::~PlutoSDRInputGui() diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index 8b2c72963..d5db76d98 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -62,6 +62,7 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : displayGains(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } RTLSDRGui::~RTLSDRGui() diff --git a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourcegui.cpp b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourcegui.cpp index a6cc54129..86510b77a 100644 --- a/plugins/samplesource/sdrdaemonsource/sdrdaemonsourcegui.cpp +++ b/plugins/samplesource/sdrdaemonsource/sdrdaemonsourcegui.cpp @@ -96,6 +96,7 @@ SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceUISet *deviceUISet, QWidget* parent m_sampleSource = (SDRdaemonSourceInput*) m_deviceUISet->m_deviceSourceAPI->getSampleSource(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); m_eventsTime.start(); displayEventCounts(); diff --git a/plugins/samplesource/sdrplay/sdrplaygui.cpp b/plugins/samplesource/sdrplay/sdrplaygui.cpp index 21c0392c2..b7fa82e93 100644 --- a/plugins/samplesource/sdrplay/sdrplaygui.cpp +++ b/plugins/samplesource/sdrplay/sdrplaygui.cpp @@ -73,6 +73,7 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) : displaySettings(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } SDRPlayGui::~SDRPlayGui() diff --git a/plugins/samplesource/testsource/testsourcegui.cpp b/plugins/samplesource/testsource/testsourcegui.cpp index f228c686f..7fbc84f32 100644 --- a/plugins/samplesource/testsource/testsourcegui.cpp +++ b/plugins/samplesource/testsource/testsourcegui.cpp @@ -65,6 +65,7 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) : m_statusTimer.start(500); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); } TestSourceGui::~TestSourceGui() diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 686abdb6c..1a93cd249 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -942,6 +942,65 @@ margin-bottom: 20px; } }, "description" : "AirspyHF" +}; + defs.AirspySettings = { + "properties" : { + "centerFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "LOppmTenths" : { + "type" : "integer" + }, + "devSampleRateIndex" : { + "type" : "integer" + }, + "lnaGain" : { + "type" : "integer" + }, + "mixerGain" : { + "type" : "integer" + }, + "vgaGain" : { + "type" : "integer" + }, + "lnaAGC" : { + "type" : "integer", + "description" : "LNA AGC (1 if active else 0)" + }, + "mixerAGC" : { + "type" : "integer", + "description" : "Mixer AGC (1 if active else 0)" + }, + "log2Decim" : { + "type" : "integer" + }, + "fcPos" : { + "type" : "integer", + "description" : "0=Infra 1=Supra 2=Center" + }, + "biasT" : { + "type" : "integer", + "description" : "Bias tee (1 if active else 0)" + }, + "dcBlock" : { + "type" : "integer" + }, + "iqCorrection" : { + "type" : "integer" + }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "fileRecordName" : { + "type" : "string" + } + }, + "description" : "Airspy" }; defs.AudioDevices = { "required" : [ "nbInputDevices", "nbOutputDevices" ], @@ -1657,6 +1716,9 @@ margin-bottom: 20px; "type" : "integer", "description" : "Not zero if it is a tx device else it is a rx device" }, + "airspySettings" : { + "$ref" : "#/definitions/AirspySettings" + }, "airspyHFSettings" : { "$ref" : "#/definitions/AirspyHFSettings" }, @@ -21118,7 +21180,7 @@ except ApiException as e:
- Generated 2018-05-25T10:44:21.402+02:00 + Generated 2018-05-25T18:55:39.036+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/Airspy.yaml b/sdrbase/resources/webapi/doc/swagger/include/Airspy.yaml new file mode 100644 index 000000000..f3c28a03c --- /dev/null +++ b/sdrbase/resources/webapi/doc/swagger/include/Airspy.yaml @@ -0,0 +1,42 @@ +AirspySettings: + description: Airspy + properties: + centerFrequency: + type: integer + format: int64 + LOppmTenths: + type: integer + devSampleRateIndex: + type: integer + lnaGain: + type: integer + mixerGain: + type: integer + vgaGain: + type: integer + lnaAGC: + description: LNA AGC (1 if active else 0) + type: integer + mixerAGC: + description: Mixer AGC (1 if active else 0) + type: integer + log2Decim: + type: integer + fcPos: + description: 0=Infra 1=Supra 2=Center + type: integer + biasT: + description: Bias tee (1 if active else 0) + type: integer + dcBlock: + type: integer + iqCorrection: + type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 + fileRecordName: + type: string + \ No newline at end of file diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index c1bad45d9..bb7a84212 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1713,6 +1713,8 @@ definitions: tx: description: Not zero if it is a tx device else it is a rx device type: integer + airspySettings: + $ref: "/doc/swagger/include/Airspy.yaml#/AirspySettings" airspyHFSettings: $ref: "/doc/swagger/include/AirspyHF.yaml#/AirspyHFSettings" bladeRFInputSettings: diff --git a/swagger/sdrangel/api/swagger/include/Airspy.yaml b/swagger/sdrangel/api/swagger/include/Airspy.yaml new file mode 100644 index 000000000..f3c28a03c --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/Airspy.yaml @@ -0,0 +1,42 @@ +AirspySettings: + description: Airspy + properties: + centerFrequency: + type: integer + format: int64 + LOppmTenths: + type: integer + devSampleRateIndex: + type: integer + lnaGain: + type: integer + mixerGain: + type: integer + vgaGain: + type: integer + lnaAGC: + description: LNA AGC (1 if active else 0) + type: integer + mixerAGC: + description: Mixer AGC (1 if active else 0) + type: integer + log2Decim: + type: integer + fcPos: + description: 0=Infra 1=Supra 2=Center + type: integer + biasT: + description: Bias tee (1 if active else 0) + type: integer + dcBlock: + type: integer + iqCorrection: + type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 + fileRecordName: + type: string + \ No newline at end of file diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 55214e17c..e31ea9c19 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1713,6 +1713,8 @@ definitions: tx: description: Not zero if it is a tx device else it is a rx device type: integer + airspySettings: + $ref: "http://localhost:8081/api/swagger/include/Airspy.yaml#/AirspySettings" airspyHFSettings: $ref: "http://localhost:8081/api/swagger/include/AirspyHF.yaml#/AirspyHFSettings" bladeRFInputSettings: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 686abdb6c..1a93cd249 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -942,6 +942,65 @@ margin-bottom: 20px; } }, "description" : "AirspyHF" +}; + defs.AirspySettings = { + "properties" : { + "centerFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "LOppmTenths" : { + "type" : "integer" + }, + "devSampleRateIndex" : { + "type" : "integer" + }, + "lnaGain" : { + "type" : "integer" + }, + "mixerGain" : { + "type" : "integer" + }, + "vgaGain" : { + "type" : "integer" + }, + "lnaAGC" : { + "type" : "integer", + "description" : "LNA AGC (1 if active else 0)" + }, + "mixerAGC" : { + "type" : "integer", + "description" : "Mixer AGC (1 if active else 0)" + }, + "log2Decim" : { + "type" : "integer" + }, + "fcPos" : { + "type" : "integer", + "description" : "0=Infra 1=Supra 2=Center" + }, + "biasT" : { + "type" : "integer", + "description" : "Bias tee (1 if active else 0)" + }, + "dcBlock" : { + "type" : "integer" + }, + "iqCorrection" : { + "type" : "integer" + }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "fileRecordName" : { + "type" : "string" + } + }, + "description" : "Airspy" }; defs.AudioDevices = { "required" : [ "nbInputDevices", "nbOutputDevices" ], @@ -1657,6 +1716,9 @@ margin-bottom: 20px; "type" : "integer", "description" : "Not zero if it is a tx device else it is a rx device" }, + "airspySettings" : { + "$ref" : "#/definitions/AirspySettings" + }, "airspyHFSettings" : { "$ref" : "#/definitions/AirspyHFSettings" }, @@ -21118,7 +21180,7 @@ except ApiException as e:
- Generated 2018-05-25T10:44:21.402+02:00 + Generated 2018-05-25T18:55:39.036+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGAirspySettings.cpp b/swagger/sdrangel/code/qt5/client/SWGAirspySettings.cpp new file mode 100644 index 000000000..2d7ed1d52 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGAirspySettings.cpp @@ -0,0 +1,423 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGAirspySettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGAirspySettings::SWGAirspySettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGAirspySettings::SWGAirspySettings() { + center_frequency = 0L; + m_center_frequency_isSet = false; + l_oppm_tenths = 0; + m_l_oppm_tenths_isSet = false; + dev_sample_rate_index = 0; + m_dev_sample_rate_index_isSet = false; + lna_gain = 0; + m_lna_gain_isSet = false; + mixer_gain = 0; + m_mixer_gain_isSet = false; + vga_gain = 0; + m_vga_gain_isSet = false; + lna_agc = 0; + m_lna_agc_isSet = false; + mixer_agc = 0; + m_mixer_agc_isSet = false; + log2_decim = 0; + m_log2_decim_isSet = false; + fc_pos = 0; + m_fc_pos_isSet = false; + bias_t = 0; + m_bias_t_isSet = false; + dc_block = 0; + m_dc_block_isSet = false; + iq_correction = 0; + m_iq_correction_isSet = false; + transverter_mode = 0; + m_transverter_mode_isSet = false; + transverter_delta_frequency = 0L; + m_transverter_delta_frequency_isSet = false; + file_record_name = nullptr; + m_file_record_name_isSet = false; +} + +SWGAirspySettings::~SWGAirspySettings() { + this->cleanup(); +} + +void +SWGAirspySettings::init() { + center_frequency = 0L; + m_center_frequency_isSet = false; + l_oppm_tenths = 0; + m_l_oppm_tenths_isSet = false; + dev_sample_rate_index = 0; + m_dev_sample_rate_index_isSet = false; + lna_gain = 0; + m_lna_gain_isSet = false; + mixer_gain = 0; + m_mixer_gain_isSet = false; + vga_gain = 0; + m_vga_gain_isSet = false; + lna_agc = 0; + m_lna_agc_isSet = false; + mixer_agc = 0; + m_mixer_agc_isSet = false; + log2_decim = 0; + m_log2_decim_isSet = false; + fc_pos = 0; + m_fc_pos_isSet = false; + bias_t = 0; + m_bias_t_isSet = false; + dc_block = 0; + m_dc_block_isSet = false; + iq_correction = 0; + m_iq_correction_isSet = false; + transverter_mode = 0; + m_transverter_mode_isSet = false; + transverter_delta_frequency = 0L; + m_transverter_delta_frequency_isSet = false; + file_record_name = new QString(""); + m_file_record_name_isSet = false; +} + +void +SWGAirspySettings::cleanup() { + + + + + + + + + + + + + + + + if(file_record_name != nullptr) { + delete file_record_name; + } +} + +SWGAirspySettings* +SWGAirspySettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGAirspySettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", ""); + + ::SWGSDRangel::setValue(&l_oppm_tenths, pJson["LOppmTenths"], "qint32", ""); + + ::SWGSDRangel::setValue(&dev_sample_rate_index, pJson["devSampleRateIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&lna_gain, pJson["lnaGain"], "qint32", ""); + + ::SWGSDRangel::setValue(&mixer_gain, pJson["mixerGain"], "qint32", ""); + + ::SWGSDRangel::setValue(&vga_gain, pJson["vgaGain"], "qint32", ""); + + ::SWGSDRangel::setValue(&lna_agc, pJson["lnaAGC"], "qint32", ""); + + ::SWGSDRangel::setValue(&mixer_agc, pJson["mixerAGC"], "qint32", ""); + + ::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", ""); + + ::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", ""); + + ::SWGSDRangel::setValue(&bias_t, pJson["biasT"], "qint32", ""); + + ::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", ""); + + ::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", ""); + + ::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", ""); + + ::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", ""); + + ::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString"); + +} + +QString +SWGAirspySettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGAirspySettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_center_frequency_isSet){ + obj->insert("centerFrequency", QJsonValue(center_frequency)); + } + if(m_l_oppm_tenths_isSet){ + obj->insert("LOppmTenths", QJsonValue(l_oppm_tenths)); + } + if(m_dev_sample_rate_index_isSet){ + obj->insert("devSampleRateIndex", QJsonValue(dev_sample_rate_index)); + } + if(m_lna_gain_isSet){ + obj->insert("lnaGain", QJsonValue(lna_gain)); + } + if(m_mixer_gain_isSet){ + obj->insert("mixerGain", QJsonValue(mixer_gain)); + } + if(m_vga_gain_isSet){ + obj->insert("vgaGain", QJsonValue(vga_gain)); + } + if(m_lna_agc_isSet){ + obj->insert("lnaAGC", QJsonValue(lna_agc)); + } + if(m_mixer_agc_isSet){ + obj->insert("mixerAGC", QJsonValue(mixer_agc)); + } + if(m_log2_decim_isSet){ + obj->insert("log2Decim", QJsonValue(log2_decim)); + } + if(m_fc_pos_isSet){ + obj->insert("fcPos", QJsonValue(fc_pos)); + } + if(m_bias_t_isSet){ + obj->insert("biasT", QJsonValue(bias_t)); + } + if(m_dc_block_isSet){ + obj->insert("dcBlock", QJsonValue(dc_block)); + } + if(m_iq_correction_isSet){ + obj->insert("iqCorrection", QJsonValue(iq_correction)); + } + if(m_transverter_mode_isSet){ + obj->insert("transverterMode", QJsonValue(transverter_mode)); + } + if(m_transverter_delta_frequency_isSet){ + obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency)); + } + if(file_record_name != nullptr && *file_record_name != QString("")){ + toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString")); + } + + return obj; +} + +qint64 +SWGAirspySettings::getCenterFrequency() { + return center_frequency; +} +void +SWGAirspySettings::setCenterFrequency(qint64 center_frequency) { + this->center_frequency = center_frequency; + this->m_center_frequency_isSet = true; +} + +qint32 +SWGAirspySettings::getLOppmTenths() { + return l_oppm_tenths; +} +void +SWGAirspySettings::setLOppmTenths(qint32 l_oppm_tenths) { + this->l_oppm_tenths = l_oppm_tenths; + this->m_l_oppm_tenths_isSet = true; +} + +qint32 +SWGAirspySettings::getDevSampleRateIndex() { + return dev_sample_rate_index; +} +void +SWGAirspySettings::setDevSampleRateIndex(qint32 dev_sample_rate_index) { + this->dev_sample_rate_index = dev_sample_rate_index; + this->m_dev_sample_rate_index_isSet = true; +} + +qint32 +SWGAirspySettings::getLnaGain() { + return lna_gain; +} +void +SWGAirspySettings::setLnaGain(qint32 lna_gain) { + this->lna_gain = lna_gain; + this->m_lna_gain_isSet = true; +} + +qint32 +SWGAirspySettings::getMixerGain() { + return mixer_gain; +} +void +SWGAirspySettings::setMixerGain(qint32 mixer_gain) { + this->mixer_gain = mixer_gain; + this->m_mixer_gain_isSet = true; +} + +qint32 +SWGAirspySettings::getVgaGain() { + return vga_gain; +} +void +SWGAirspySettings::setVgaGain(qint32 vga_gain) { + this->vga_gain = vga_gain; + this->m_vga_gain_isSet = true; +} + +qint32 +SWGAirspySettings::getLnaAgc() { + return lna_agc; +} +void +SWGAirspySettings::setLnaAgc(qint32 lna_agc) { + this->lna_agc = lna_agc; + this->m_lna_agc_isSet = true; +} + +qint32 +SWGAirspySettings::getMixerAgc() { + return mixer_agc; +} +void +SWGAirspySettings::setMixerAgc(qint32 mixer_agc) { + this->mixer_agc = mixer_agc; + this->m_mixer_agc_isSet = true; +} + +qint32 +SWGAirspySettings::getLog2Decim() { + return log2_decim; +} +void +SWGAirspySettings::setLog2Decim(qint32 log2_decim) { + this->log2_decim = log2_decim; + this->m_log2_decim_isSet = true; +} + +qint32 +SWGAirspySettings::getFcPos() { + return fc_pos; +} +void +SWGAirspySettings::setFcPos(qint32 fc_pos) { + this->fc_pos = fc_pos; + this->m_fc_pos_isSet = true; +} + +qint32 +SWGAirspySettings::getBiasT() { + return bias_t; +} +void +SWGAirspySettings::setBiasT(qint32 bias_t) { + this->bias_t = bias_t; + this->m_bias_t_isSet = true; +} + +qint32 +SWGAirspySettings::getDcBlock() { + return dc_block; +} +void +SWGAirspySettings::setDcBlock(qint32 dc_block) { + this->dc_block = dc_block; + this->m_dc_block_isSet = true; +} + +qint32 +SWGAirspySettings::getIqCorrection() { + return iq_correction; +} +void +SWGAirspySettings::setIqCorrection(qint32 iq_correction) { + this->iq_correction = iq_correction; + this->m_iq_correction_isSet = true; +} + +qint32 +SWGAirspySettings::getTransverterMode() { + return transverter_mode; +} +void +SWGAirspySettings::setTransverterMode(qint32 transverter_mode) { + this->transverter_mode = transverter_mode; + this->m_transverter_mode_isSet = true; +} + +qint64 +SWGAirspySettings::getTransverterDeltaFrequency() { + return transverter_delta_frequency; +} +void +SWGAirspySettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequency) { + this->transverter_delta_frequency = transverter_delta_frequency; + this->m_transverter_delta_frequency_isSet = true; +} + +QString* +SWGAirspySettings::getFileRecordName() { + return file_record_name; +} +void +SWGAirspySettings::setFileRecordName(QString* file_record_name) { + this->file_record_name = file_record_name; + this->m_file_record_name_isSet = true; +} + + +bool +SWGAirspySettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_center_frequency_isSet){ isObjectUpdated = true; break;} + if(m_l_oppm_tenths_isSet){ isObjectUpdated = true; break;} + if(m_dev_sample_rate_index_isSet){ isObjectUpdated = true; break;} + if(m_lna_gain_isSet){ isObjectUpdated = true; break;} + if(m_mixer_gain_isSet){ isObjectUpdated = true; break;} + if(m_vga_gain_isSet){ isObjectUpdated = true; break;} + if(m_lna_agc_isSet){ isObjectUpdated = true; break;} + if(m_mixer_agc_isSet){ isObjectUpdated = true; break;} + if(m_log2_decim_isSet){ isObjectUpdated = true; break;} + if(m_fc_pos_isSet){ isObjectUpdated = true; break;} + if(m_bias_t_isSet){ isObjectUpdated = true; break;} + if(m_dc_block_isSet){ isObjectUpdated = true; break;} + if(m_iq_correction_isSet){ isObjectUpdated = true; break;} + if(m_transverter_mode_isSet){ isObjectUpdated = true; break;} + if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;} + if(file_record_name != nullptr && *file_record_name != QString("")){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGAirspySettings.h b/swagger/sdrangel/code/qt5/client/SWGAirspySettings.h new file mode 100644 index 000000000..f9d30f809 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGAirspySettings.h @@ -0,0 +1,149 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGAirspySettings.h + * + * Airspy + */ + +#ifndef SWGAirspySettings_H_ +#define SWGAirspySettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGAirspySettings: public SWGObject { +public: + SWGAirspySettings(); + SWGAirspySettings(QString* json); + virtual ~SWGAirspySettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGAirspySettings* fromJson(QString &jsonString) override; + + qint64 getCenterFrequency(); + void setCenterFrequency(qint64 center_frequency); + + qint32 getLOppmTenths(); + void setLOppmTenths(qint32 l_oppm_tenths); + + qint32 getDevSampleRateIndex(); + void setDevSampleRateIndex(qint32 dev_sample_rate_index); + + qint32 getLnaGain(); + void setLnaGain(qint32 lna_gain); + + qint32 getMixerGain(); + void setMixerGain(qint32 mixer_gain); + + qint32 getVgaGain(); + void setVgaGain(qint32 vga_gain); + + qint32 getLnaAgc(); + void setLnaAgc(qint32 lna_agc); + + qint32 getMixerAgc(); + void setMixerAgc(qint32 mixer_agc); + + qint32 getLog2Decim(); + void setLog2Decim(qint32 log2_decim); + + qint32 getFcPos(); + void setFcPos(qint32 fc_pos); + + qint32 getBiasT(); + void setBiasT(qint32 bias_t); + + qint32 getDcBlock(); + void setDcBlock(qint32 dc_block); + + qint32 getIqCorrection(); + void setIqCorrection(qint32 iq_correction); + + qint32 getTransverterMode(); + void setTransverterMode(qint32 transverter_mode); + + qint64 getTransverterDeltaFrequency(); + void setTransverterDeltaFrequency(qint64 transverter_delta_frequency); + + QString* getFileRecordName(); + void setFileRecordName(QString* file_record_name); + + + virtual bool isSet() override; + +private: + qint64 center_frequency; + bool m_center_frequency_isSet; + + qint32 l_oppm_tenths; + bool m_l_oppm_tenths_isSet; + + qint32 dev_sample_rate_index; + bool m_dev_sample_rate_index_isSet; + + qint32 lna_gain; + bool m_lna_gain_isSet; + + qint32 mixer_gain; + bool m_mixer_gain_isSet; + + qint32 vga_gain; + bool m_vga_gain_isSet; + + qint32 lna_agc; + bool m_lna_agc_isSet; + + qint32 mixer_agc; + bool m_mixer_agc_isSet; + + qint32 log2_decim; + bool m_log2_decim_isSet; + + qint32 fc_pos; + bool m_fc_pos_isSet; + + qint32 bias_t; + bool m_bias_t_isSet; + + qint32 dc_block; + bool m_dc_block_isSet; + + qint32 iq_correction; + bool m_iq_correction_isSet; + + qint32 transverter_mode; + bool m_transverter_mode_isSet; + + qint64 transverter_delta_frequency; + bool m_transverter_delta_frequency_isSet; + + QString* file_record_name; + bool m_file_record_name_isSet; + +}; + +} + +#endif /* SWGAirspySettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp index d798ead5b..50b53fc35 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp @@ -32,6 +32,8 @@ SWGDeviceSettings::SWGDeviceSettings() { m_device_hw_type_isSet = false; tx = 0; m_tx_isSet = false; + airspy_settings = nullptr; + m_airspy_settings_isSet = false; airspy_hf_settings = nullptr; m_airspy_hf_settings_isSet = false; blade_rf_input_settings = nullptr; @@ -62,6 +64,8 @@ SWGDeviceSettings::init() { m_device_hw_type_isSet = false; tx = 0; m_tx_isSet = false; + airspy_settings = new SWGAirspySettings(); + m_airspy_settings_isSet = false; airspy_hf_settings = new SWGAirspyHFSettings(); m_airspy_hf_settings_isSet = false; blade_rf_input_settings = new SWGBladeRFInputSettings(); @@ -88,6 +92,9 @@ SWGDeviceSettings::cleanup() { delete device_hw_type; } + if(airspy_settings != nullptr) { + delete airspy_settings; + } if(airspy_hf_settings != nullptr) { delete airspy_hf_settings; } @@ -132,6 +139,8 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", ""); + ::SWGSDRangel::setValue(&airspy_settings, pJson["airspySettings"], "SWGAirspySettings", "SWGAirspySettings"); + ::SWGSDRangel::setValue(&airspy_hf_settings, pJson["airspyHFSettings"], "SWGAirspyHFSettings", "SWGAirspyHFSettings"); ::SWGSDRangel::setValue(&blade_rf_input_settings, pJson["bladeRFInputSettings"], "SWGBladeRFInputSettings", "SWGBladeRFInputSettings"); @@ -172,6 +181,9 @@ SWGDeviceSettings::asJsonObject() { if(m_tx_isSet){ obj->insert("tx", QJsonValue(tx)); } + if((airspy_settings != nullptr) && (airspy_settings->isSet())){ + toJsonValue(QString("airspySettings"), airspy_settings, obj, QString("SWGAirspySettings")); + } if((airspy_hf_settings != nullptr) && (airspy_hf_settings->isSet())){ toJsonValue(QString("airspyHFSettings"), airspy_hf_settings, obj, QString("SWGAirspyHFSettings")); } @@ -223,6 +235,16 @@ SWGDeviceSettings::setTx(qint32 tx) { this->m_tx_isSet = true; } +SWGAirspySettings* +SWGDeviceSettings::getAirspySettings() { + return airspy_settings; +} +void +SWGDeviceSettings::setAirspySettings(SWGAirspySettings* airspy_settings) { + this->airspy_settings = airspy_settings; + this->m_airspy_settings_isSet = true; +} + SWGAirspyHFSettings* SWGDeviceSettings::getAirspyHfSettings() { return airspy_hf_settings; @@ -320,6 +342,7 @@ SWGDeviceSettings::isSet(){ do{ if(device_hw_type != nullptr && *device_hw_type != QString("")){ isObjectUpdated = true; break;} if(m_tx_isSet){ isObjectUpdated = true; break;} + if(airspy_settings != nullptr && airspy_settings->isSet()){ isObjectUpdated = true; break;} if(airspy_hf_settings != nullptr && airspy_hf_settings->isSet()){ isObjectUpdated = true; break;} if(blade_rf_input_settings != nullptr && blade_rf_input_settings->isSet()){ isObjectUpdated = true; break;} if(blade_rf_output_settings != nullptr && blade_rf_output_settings->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h index c9ec69600..2c38ac566 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h @@ -23,6 +23,7 @@ #include "SWGAirspyHFSettings.h" +#include "SWGAirspySettings.h" #include "SWGBladeRFInputSettings.h" #include "SWGBladeRFOutputSettings.h" #include "SWGFileSourceSettings.h" @@ -57,6 +58,9 @@ public: qint32 getTx(); void setTx(qint32 tx); + SWGAirspySettings* getAirspySettings(); + void setAirspySettings(SWGAirspySettings* airspy_settings); + SWGAirspyHFSettings* getAirspyHfSettings(); void setAirspyHfSettings(SWGAirspyHFSettings* airspy_hf_settings); @@ -94,6 +98,9 @@ private: qint32 tx; bool m_tx_isSet; + SWGAirspySettings* airspy_settings; + bool m_airspy_settings_isSet; + SWGAirspyHFSettings* airspy_hf_settings; bool m_airspy_hf_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 853f9bb66..c8f0a18b1 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -21,6 +21,7 @@ #include "SWGATVModReport.h" #include "SWGATVModSettings.h" #include "SWGAirspyHFSettings.h" +#include "SWGAirspySettings.h" #include "SWGAudioDevices.h" #include "SWGAudioInputDevice.h" #include "SWGAudioOutputDevice.h" @@ -105,6 +106,9 @@ namespace SWGSDRangel { if(QString("SWGAirspyHFSettings").compare(type) == 0) { return new SWGAirspyHFSettings(); } + if(QString("SWGAirspySettings").compare(type) == 0) { + return new SWGAirspySettings(); + } if(QString("SWGAudioDevices").compare(type) == 0) { return new SWGAudioDevices(); }