From b95fa98e5a0bdd44eb1c3767c9ba0277ab0bfe9b Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 1 Aug 2019 08:49:35 +0200 Subject: [PATCH] REST API: config: GET (2) presets channels and devices loop --- sdrbase/resources/webapi/doc/html2/index.html | 21 +++--- .../doc/swagger/include/Preferences.yaml | 8 +-- .../webapi/doc/swagger/include/Preset.yaml | 5 +- sdrbase/settings/preset.h | 7 +- sdrbase/webapi/webapiadapterbase.cpp | 24 ++++++- .../sdrangel/api/swagger/include/Preset.yaml | 3 - swagger/sdrangel/code/html2/index.html | 21 +++--- .../code/qt5/client/SWGChannelConfig.cpp | 23 ------- .../code/qt5/client/SWGChannelConfig.h | 6 -- .../code/qt5/client/SWGPreferences.cpp | 65 ++++++------------- .../sdrangel/code/qt5/client/SWGPreferences.h | 18 ++--- .../sdrangel/code/qt5/client/SWGPreset.cpp | 30 ++++----- swagger/sdrangel/code/qt5/client/SWGPreset.h | 8 +-- 13 files changed, 92 insertions(+), 147 deletions(-) diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index bea0b2ace..7196efa58 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1765,10 +1765,6 @@ margin-bottom: 20px; "type" : "string", "description" : "Channel type ID in URI form" }, - "channelId" : { - "type" : "string", - "description" : "Channel type ID in short form from object name" - }, "config" : { "$ref" : "#/definitions/ChannelSettings" } @@ -4340,11 +4336,13 @@ margin-bottom: 20px; }; defs.Preferences = { "properties" : { - "sourceType" : { - "type" : "string" - }, "sourceDevice" : { - "type" : "string" + "type" : "string", + "description" : "Identification of the source used in R0 tab (GUI flavor) at startup" + }, + "sourceIndex" : { + "type" : "integer", + "description" : "Index of the source used in R0 tab (GUI flavor) at startup" }, "audioType" : { "type" : "string" @@ -4352,9 +4350,6 @@ margin-bottom: 20px; "audioDevice" : { "type" : "string" }, - "sourceIndex" : { - "type" : "integer" - }, "latitude" : { "type" : "number", "format" : "float" @@ -4397,7 +4392,7 @@ margin-bottom: 20px; "type" : "integer", "format" : "int64" }, - "m_spectrumConfig" : { + "spectrumConfig" : { "$ref" : "#/definitions/GLSpectrum" }, "dcOffsetCorrection" : { @@ -26960,7 +26955,7 @@ except ApiException as e:
- Generated 2019-07-31T23:30:54.359+02:00 + Generated 2019-08-01T08:47:20.086+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/Preferences.yaml b/sdrbase/resources/webapi/doc/swagger/include/Preferences.yaml index 96b1c9289..271ddd6f3 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/Preferences.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/Preferences.yaml @@ -1,16 +1,16 @@ Preferences: description: Repreents a Prefernce object properties: - sourceType: - type: string sourceDevice: + description: Identification of the source used in R0 tab (GUI flavor) at startup type: string + sourceIndex: + description: Index of the source used in R0 tab (GUI flavor) at startup + type: integer audioType: type: string audioDevice: type: string - sourceIndex: - type: integer latitude: type: number format: float diff --git a/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml b/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml index 9d70461af..a64cd500b 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/Preset.yaml @@ -16,9 +16,6 @@ ChannelConfig: channelIdURI: description: Channel type ID in URI form type: string - channelId: - description: Channel type ID in short form from object name - type: string config: $ref: "/doc/swagger/include/ChannelSettings.yaml#/ChannelSettings" @@ -35,7 +32,7 @@ Preset: centerFrequency: type: integer format: int64 - m_spectrumConfig: + spectrumConfig: $ref: "/doc/swagger/include/GLSpectrum.yaml#/GLSpectrum" dcOffsetCorrection: description: boolean diff --git a/sdrbase/settings/preset.h b/sdrbase/settings/preset.h index 2d50f5670..c2e3e8658 100644 --- a/sdrbase/settings/preset.h +++ b/sdrbase/settings/preset.h @@ -29,7 +29,6 @@ class SDRBASE_API Preset { public: struct ChannelConfig { QString m_channelIdURI; //!< Channel type ID in URI form - QString m_channelId; //!< Channel type ID in short form from object name TODO: use in the future QByteArray m_config; ChannelConfig(const QString& channelIdURI, const QByteArray& config) : @@ -86,10 +85,12 @@ public: int getChannelCount() const { return m_channelConfigs.count(); } const ChannelConfig& getChannelConfig(int index) const { return m_channelConfigs.at(index); } - void setDeviceConfig(const QString& deviceId, const QString& deviceSerial, int deviceSequence, const QByteArray& config) - { + void clearDevices() { m_deviceConfigs.clear(); } + void setDeviceConfig(const QString& deviceId, const QString& deviceSerial, int deviceSequence, const QByteArray& config) { addOrUpdateDeviceConfig(deviceId, deviceSerial, deviceSequence, config); } + int getDeviceCount() const { return m_deviceConfigs.count(); } + const DeviceConfig& getDeviceConfig(int index) const { return m_deviceConfigs.at(index); } void addOrUpdateDeviceConfig(const QString& deviceId, const QString& deviceSerial, diff --git a/sdrbase/webapi/webapiadapterbase.cpp b/sdrbase/webapi/webapiadapterbase.cpp index af844ac12..ed8019f86 100644 --- a/sdrbase/webapi/webapiadapterbase.cpp +++ b/sdrbase/webapi/webapiadapterbase.cpp @@ -46,9 +46,27 @@ void WebAPIAdapterBase::webapiFormatPreset( apiPreset->setGroup(new QString(preset.m_group)); apiPreset->setDescription(new QString(preset.m_description)); apiPreset->setCenterFrequency(preset.m_centerFrequency); - apiPreset->getMSpectrumConfig()->init(); // TODO when spectrum config is extracted to sdrbase + apiPreset->getSpectrumConfig()->init(); // TODO when spectrum config is extracted to sdrbase apiPreset->setDcOffsetCorrection(preset.m_dcOffsetCorrection ? 1 : 0); apiPreset->setIqImbalanceCorrection(preset.m_iqImbalanceCorrection ? 1 : 0); - // TODO: channel configs - // TODO: device configs + + int nbChannels = preset.getChannelCount(); + for (int i = 0; i < nbChannels; i++) + { + const Preset::ChannelConfig& channelConfig = preset.getChannelConfig(i); + QList *swgChannelConfigs = apiPreset->getChannelConfigs(); + swgChannelConfigs->append(new SWGSDRangel::SWGChannelConfig); + swgChannelConfigs->back()->setChannelIdUri(new QString(channelConfig.m_channelIdURI)); + } + + int nbDevices = preset.getDeviceCount(); + for (int i = 0; i < nbDevices; i++) + { + const Preset::DeviceConfig& deviceConfig = preset.getDeviceConfig(i); + QList *swgdeviceConfigs = apiPreset->getDeviceConfigs(); + swgdeviceConfigs->append(new SWGSDRangel::SWGDeviceConfig); + swgdeviceConfigs->back()->setDeviceId(new QString(deviceConfig.m_deviceId)); + swgdeviceConfigs->back()->setDeviceSerial(new QString(deviceConfig.m_deviceSerial)); + swgdeviceConfigs->back()->setDeviceSequence(deviceConfig.m_deviceSequence); + } } diff --git a/swagger/sdrangel/api/swagger/include/Preset.yaml b/swagger/sdrangel/api/swagger/include/Preset.yaml index dce204508..5a81993a5 100644 --- a/swagger/sdrangel/api/swagger/include/Preset.yaml +++ b/swagger/sdrangel/api/swagger/include/Preset.yaml @@ -16,9 +16,6 @@ ChannelConfig: channelIdURI: description: Channel type ID in URI form type: string - channelId: - description: Channel type ID in short form from object name - type: string config: $ref: "http://localhost:8081/api/swagger/include/ChannelSettings.yaml#/ChannelSettings" diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index bea0b2ace..7196efa58 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1765,10 +1765,6 @@ margin-bottom: 20px; "type" : "string", "description" : "Channel type ID in URI form" }, - "channelId" : { - "type" : "string", - "description" : "Channel type ID in short form from object name" - }, "config" : { "$ref" : "#/definitions/ChannelSettings" } @@ -4340,11 +4336,13 @@ margin-bottom: 20px; }; defs.Preferences = { "properties" : { - "sourceType" : { - "type" : "string" - }, "sourceDevice" : { - "type" : "string" + "type" : "string", + "description" : "Identification of the source used in R0 tab (GUI flavor) at startup" + }, + "sourceIndex" : { + "type" : "integer", + "description" : "Index of the source used in R0 tab (GUI flavor) at startup" }, "audioType" : { "type" : "string" @@ -4352,9 +4350,6 @@ margin-bottom: 20px; "audioDevice" : { "type" : "string" }, - "sourceIndex" : { - "type" : "integer" - }, "latitude" : { "type" : "number", "format" : "float" @@ -4397,7 +4392,7 @@ margin-bottom: 20px; "type" : "integer", "format" : "int64" }, - "m_spectrumConfig" : { + "spectrumConfig" : { "$ref" : "#/definitions/GLSpectrum" }, "dcOffsetCorrection" : { @@ -26960,7 +26955,7 @@ except ApiException as e:
- Generated 2019-07-31T23:30:54.359+02:00 + Generated 2019-08-01T08:47:20.086+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelConfig.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelConfig.cpp index 5a3f6e48d..790a0e5e2 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelConfig.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelConfig.cpp @@ -30,8 +30,6 @@ SWGChannelConfig::SWGChannelConfig(QString* json) { SWGChannelConfig::SWGChannelConfig() { channel_id_uri = nullptr; m_channel_id_uri_isSet = false; - channel_id = nullptr; - m_channel_id_isSet = false; config = nullptr; m_config_isSet = false; } @@ -44,8 +42,6 @@ void SWGChannelConfig::init() { channel_id_uri = new QString(""); m_channel_id_uri_isSet = false; - channel_id = new QString(""); - m_channel_id_isSet = false; config = new SWGChannelSettings(); m_config_isSet = false; } @@ -55,9 +51,6 @@ SWGChannelConfig::cleanup() { if(channel_id_uri != nullptr) { delete channel_id_uri; } - if(channel_id != nullptr) { - delete channel_id; - } if(config != nullptr) { delete config; } @@ -76,8 +69,6 @@ void SWGChannelConfig::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&channel_id_uri, pJson["channelIdURI"], "QString", "QString"); - ::SWGSDRangel::setValue(&channel_id, pJson["channelId"], "QString", "QString"); - ::SWGSDRangel::setValue(&config, pJson["config"], "SWGChannelSettings", "SWGChannelSettings"); } @@ -99,9 +90,6 @@ SWGChannelConfig::asJsonObject() { if(channel_id_uri != nullptr && *channel_id_uri != QString("")){ toJsonValue(QString("channelIdURI"), channel_id_uri, obj, QString("QString")); } - if(channel_id != nullptr && *channel_id != QString("")){ - toJsonValue(QString("channelId"), channel_id, obj, QString("QString")); - } if((config != nullptr) && (config->isSet())){ toJsonValue(QString("config"), config, obj, QString("SWGChannelSettings")); } @@ -119,16 +107,6 @@ SWGChannelConfig::setChannelIdUri(QString* channel_id_uri) { this->m_channel_id_uri_isSet = true; } -QString* -SWGChannelConfig::getChannelId() { - return channel_id; -} -void -SWGChannelConfig::setChannelId(QString* channel_id) { - this->channel_id = channel_id; - this->m_channel_id_isSet = true; -} - SWGChannelSettings* SWGChannelConfig::getConfig() { return config; @@ -145,7 +123,6 @@ SWGChannelConfig::isSet(){ bool isObjectUpdated = false; do{ if(channel_id_uri != nullptr && *channel_id_uri != QString("")){ isObjectUpdated = true; break;} - if(channel_id != nullptr && *channel_id != QString("")){ isObjectUpdated = true; break;} if(config != nullptr && config->isSet()){ isObjectUpdated = true; break;} }while(false); return isObjectUpdated; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelConfig.h b/swagger/sdrangel/code/qt5/client/SWGChannelConfig.h index 14431703e..5d09021d5 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelConfig.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelConfig.h @@ -46,9 +46,6 @@ public: QString* getChannelIdUri(); void setChannelIdUri(QString* channel_id_uri); - QString* getChannelId(); - void setChannelId(QString* channel_id); - SWGChannelSettings* getConfig(); void setConfig(SWGChannelSettings* config); @@ -59,9 +56,6 @@ private: QString* channel_id_uri; bool m_channel_id_uri_isSet; - QString* channel_id; - bool m_channel_id_isSet; - SWGChannelSettings* config; bool m_config_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGPreferences.cpp b/swagger/sdrangel/code/qt5/client/SWGPreferences.cpp index d53c81b97..bbaaa8f38 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPreferences.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGPreferences.cpp @@ -28,16 +28,14 @@ SWGPreferences::SWGPreferences(QString* json) { } SWGPreferences::SWGPreferences() { - source_type = nullptr; - m_source_type_isSet = false; source_device = nullptr; m_source_device_isSet = false; + source_index = 0; + m_source_index_isSet = false; audio_type = nullptr; m_audio_type_isSet = false; audio_device = nullptr; m_audio_device_isSet = false; - source_index = 0; - m_source_index_isSet = false; latitude = 0.0f; m_latitude_isSet = false; longitude = 0.0f; @@ -58,16 +56,14 @@ SWGPreferences::~SWGPreferences() { void SWGPreferences::init() { - source_type = new QString(""); - m_source_type_isSet = false; source_device = new QString(""); m_source_device_isSet = false; + source_index = 0; + m_source_index_isSet = false; audio_type = new QString(""); m_audio_type_isSet = false; audio_device = new QString(""); m_audio_device_isSet = false; - source_index = 0; - m_source_index_isSet = false; latitude = 0.0f; m_latitude_isSet = false; longitude = 0.0f; @@ -84,12 +80,10 @@ SWGPreferences::init() { void SWGPreferences::cleanup() { - if(source_type != nullptr) { - delete source_type; - } if(source_device != nullptr) { delete source_device; } + if(audio_type != nullptr) { delete audio_type; } @@ -100,7 +94,6 @@ SWGPreferences::cleanup() { - if(log_file_name != nullptr) { delete log_file_name; } @@ -118,16 +111,14 @@ SWGPreferences::fromJson(QString &json) { void SWGPreferences::fromJsonObject(QJsonObject &pJson) { - ::SWGSDRangel::setValue(&source_type, pJson["sourceType"], "QString", "QString"); - ::SWGSDRangel::setValue(&source_device, pJson["sourceDevice"], "QString", "QString"); + ::SWGSDRangel::setValue(&source_index, pJson["sourceIndex"], "qint32", ""); + ::SWGSDRangel::setValue(&audio_type, pJson["audioType"], "QString", "QString"); ::SWGSDRangel::setValue(&audio_device, pJson["audioDevice"], "QString", "QString"); - ::SWGSDRangel::setValue(&source_index, pJson["sourceIndex"], "qint32", ""); - ::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", ""); ::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", ""); @@ -156,21 +147,18 @@ SWGPreferences::asJson () QJsonObject* SWGPreferences::asJsonObject() { QJsonObject* obj = new QJsonObject(); - if(source_type != nullptr && *source_type != QString("")){ - toJsonValue(QString("sourceType"), source_type, obj, QString("QString")); - } if(source_device != nullptr && *source_device != QString("")){ toJsonValue(QString("sourceDevice"), source_device, obj, QString("QString")); } + if(m_source_index_isSet){ + obj->insert("sourceIndex", QJsonValue(source_index)); + } if(audio_type != nullptr && *audio_type != QString("")){ toJsonValue(QString("audioType"), audio_type, obj, QString("QString")); } if(audio_device != nullptr && *audio_device != QString("")){ toJsonValue(QString("audioDevice"), audio_device, obj, QString("QString")); } - if(m_source_index_isSet){ - obj->insert("sourceIndex", QJsonValue(source_index)); - } if(m_latitude_isSet){ obj->insert("latitude", QJsonValue(latitude)); } @@ -193,16 +181,6 @@ SWGPreferences::asJsonObject() { return obj; } -QString* -SWGPreferences::getSourceType() { - return source_type; -} -void -SWGPreferences::setSourceType(QString* source_type) { - this->source_type = source_type; - this->m_source_type_isSet = true; -} - QString* SWGPreferences::getSourceDevice() { return source_device; @@ -213,6 +191,16 @@ SWGPreferences::setSourceDevice(QString* source_device) { this->m_source_device_isSet = true; } +qint32 +SWGPreferences::getSourceIndex() { + return source_index; +} +void +SWGPreferences::setSourceIndex(qint32 source_index) { + this->source_index = source_index; + this->m_source_index_isSet = true; +} + QString* SWGPreferences::getAudioType() { return audio_type; @@ -233,16 +221,6 @@ SWGPreferences::setAudioDevice(QString* audio_device) { this->m_audio_device_isSet = true; } -qint32 -SWGPreferences::getSourceIndex() { - return source_index; -} -void -SWGPreferences::setSourceIndex(qint32 source_index) { - this->source_index = source_index; - this->m_source_index_isSet = true; -} - float SWGPreferences::getLatitude() { return latitude; @@ -308,11 +286,10 @@ bool SWGPreferences::isSet(){ bool isObjectUpdated = false; do{ - if(source_type != nullptr && *source_type != QString("")){ isObjectUpdated = true; break;} if(source_device != nullptr && *source_device != QString("")){ isObjectUpdated = true; break;} + if(m_source_index_isSet){ isObjectUpdated = true; break;} if(audio_type != nullptr && *audio_type != QString("")){ isObjectUpdated = true; break;} if(audio_device != nullptr && *audio_device != QString("")){ isObjectUpdated = true; break;} - if(m_source_index_isSet){ isObjectUpdated = true; break;} if(m_latitude_isSet){ isObjectUpdated = true; break;} if(m_longitude_isSet){ isObjectUpdated = true; break;} if(m_console_min_log_level_isSet){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGPreferences.h b/swagger/sdrangel/code/qt5/client/SWGPreferences.h index f87bc1447..8616e2609 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPreferences.h +++ b/swagger/sdrangel/code/qt5/client/SWGPreferences.h @@ -42,21 +42,18 @@ public: virtual void fromJsonObject(QJsonObject &json) override; virtual SWGPreferences* fromJson(QString &jsonString) override; - QString* getSourceType(); - void setSourceType(QString* source_type); - QString* getSourceDevice(); void setSourceDevice(QString* source_device); + qint32 getSourceIndex(); + void setSourceIndex(qint32 source_index); + QString* getAudioType(); void setAudioType(QString* audio_type); QString* getAudioDevice(); void setAudioDevice(QString* audio_device); - qint32 getSourceIndex(); - void setSourceIndex(qint32 source_index); - float getLatitude(); void setLatitude(float latitude); @@ -79,21 +76,18 @@ public: virtual bool isSet() override; private: - QString* source_type; - bool m_source_type_isSet; - QString* source_device; bool m_source_device_isSet; + qint32 source_index; + bool m_source_index_isSet; + QString* audio_type; bool m_audio_type_isSet; QString* audio_device; bool m_audio_device_isSet; - qint32 source_index; - bool m_source_index_isSet; - float latitude; bool m_latitude_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGPreset.cpp b/swagger/sdrangel/code/qt5/client/SWGPreset.cpp index 178b3eae4..e4fb7e95b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPreset.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGPreset.cpp @@ -36,8 +36,8 @@ SWGPreset::SWGPreset() { m_description_isSet = false; center_frequency = 0L; m_center_frequency_isSet = false; - m_spectrum_config = nullptr; - m_m_spectrum_config_isSet = false; + spectrum_config = nullptr; + m_spectrum_config_isSet = false; dc_offset_correction = 0; m_dc_offset_correction_isSet = false; iq_imbalance_correction = 0; @@ -64,8 +64,8 @@ SWGPreset::init() { m_description_isSet = false; center_frequency = 0L; m_center_frequency_isSet = false; - m_spectrum_config = new SWGGLSpectrum(); - m_m_spectrum_config_isSet = false; + spectrum_config = new SWGGLSpectrum(); + m_spectrum_config_isSet = false; dc_offset_correction = 0; m_dc_offset_correction_isSet = false; iq_imbalance_correction = 0; @@ -88,8 +88,8 @@ SWGPreset::cleanup() { delete description; } - if(m_spectrum_config != nullptr) { - delete m_spectrum_config; + if(spectrum_config != nullptr) { + delete spectrum_config; } @@ -131,7 +131,7 @@ SWGPreset::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", ""); - ::SWGSDRangel::setValue(&m_spectrum_config, pJson["m_spectrumConfig"], "SWGGLSpectrum", "SWGGLSpectrum"); + ::SWGSDRangel::setValue(&spectrum_config, pJson["spectrumConfig"], "SWGGLSpectrum", "SWGGLSpectrum"); ::SWGSDRangel::setValue(&dc_offset_correction, pJson["dcOffsetCorrection"], "qint32", ""); @@ -171,8 +171,8 @@ SWGPreset::asJsonObject() { if(m_center_frequency_isSet){ obj->insert("centerFrequency", QJsonValue(center_frequency)); } - if((m_spectrum_config != nullptr) && (m_spectrum_config->isSet())){ - toJsonValue(QString("m_spectrumConfig"), m_spectrum_config, obj, QString("SWGGLSpectrum")); + if((spectrum_config != nullptr) && (spectrum_config->isSet())){ + toJsonValue(QString("spectrumConfig"), spectrum_config, obj, QString("SWGGLSpectrum")); } if(m_dc_offset_correction_isSet){ obj->insert("dcOffsetCorrection", QJsonValue(dc_offset_correction)); @@ -234,13 +234,13 @@ SWGPreset::setCenterFrequency(qint64 center_frequency) { } SWGGLSpectrum* -SWGPreset::getMSpectrumConfig() { - return m_spectrum_config; +SWGPreset::getSpectrumConfig() { + return spectrum_config; } void -SWGPreset::setMSpectrumConfig(SWGGLSpectrum* m_spectrum_config) { - this->m_spectrum_config = m_spectrum_config; - this->m_m_spectrum_config_isSet = true; +SWGPreset::setSpectrumConfig(SWGGLSpectrum* spectrum_config) { + this->spectrum_config = spectrum_config; + this->m_spectrum_config_isSet = true; } qint32 @@ -302,7 +302,7 @@ SWGPreset::isSet(){ if(group != nullptr && *group != QString("")){ isObjectUpdated = true; break;} if(description != nullptr && *description != QString("")){ isObjectUpdated = true; break;} if(m_center_frequency_isSet){ isObjectUpdated = true; break;} - if(m_spectrum_config != nullptr && m_spectrum_config->isSet()){ isObjectUpdated = true; break;} + if(spectrum_config != nullptr && spectrum_config->isSet()){ isObjectUpdated = true; break;} if(m_dc_offset_correction_isSet){ isObjectUpdated = true; break;} if(m_iq_imbalance_correction_isSet){ isObjectUpdated = true; break;} if(channel_configs->size() > 0){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGPreset.h b/swagger/sdrangel/code/qt5/client/SWGPreset.h index ab4803902..6fdc6c574 100644 --- a/swagger/sdrangel/code/qt5/client/SWGPreset.h +++ b/swagger/sdrangel/code/qt5/client/SWGPreset.h @@ -58,8 +58,8 @@ public: qint64 getCenterFrequency(); void setCenterFrequency(qint64 center_frequency); - SWGGLSpectrum* getMSpectrumConfig(); - void setMSpectrumConfig(SWGGLSpectrum* m_spectrum_config); + SWGGLSpectrum* getSpectrumConfig(); + void setSpectrumConfig(SWGGLSpectrum* spectrum_config); qint32 getDcOffsetCorrection(); void setDcOffsetCorrection(qint32 dc_offset_correction); @@ -92,8 +92,8 @@ private: qint64 center_frequency; bool m_center_frequency_isSet; - SWGGLSpectrum* m_spectrum_config; - bool m_m_spectrum_config_isSet; + SWGGLSpectrum* spectrum_config; + bool m_spectrum_config_isSet; qint32 dc_offset_correction; bool m_dc_offset_correction_isSet;