diff --git a/plugins/samplesource/fcdpro/fcdproinput.cpp b/plugins/samplesource/fcdpro/fcdproinput.cpp index 89750e2fe..e9f93ba56 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.cpp +++ b/plugins/samplesource/fcdpro/fcdproinput.cpp @@ -919,6 +919,12 @@ int FCDProInput::webapiSettingsPutPatch( if (deviceSettingsKeys.contains("gain6Index")) { settings.m_gain6Index = response.getFcdProSettings()->getGain6Index(); } + if (deviceSettingsKeys.contains("log2Decim")) { + settings.m_log2Decim = response.getFcdProSettings()->getLog2Decim(); + } + if (deviceSettingsKeys.contains("fcPos")) { + settings.m_fcPos = (FCDProSettings::fcPos_t) response.getFcdProSettings()->getFcPos(); + } if (deviceSettingsKeys.contains("rcFilterIndex")) { settings.m_rcFilterIndex = response.getFcdProSettings()->getRcFilterIndex(); } @@ -972,6 +978,8 @@ void FCDProInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res response.getFcdProSettings()->setGain4Index(settings.m_gain4Index); response.getFcdProSettings()->setGain5Index(settings.m_gain5Index); response.getFcdProSettings()->setGain6Index(settings.m_gain6Index); + response.getFcdProSettings()->setLog2Decim(settings.m_log2Decim); + response.getFcdProSettings()->setFcPos((int) settings.m_fcPos); response.getFcdProSettings()->setRcFilterIndex(settings.m_rcFilterIndex); response.getFcdProSettings()->setIfFilterIndex(settings.m_ifFilterIndex); response.getFcdProSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0); @@ -1044,6 +1052,12 @@ void FCDProInput::webapiReverseSendSettings(QList& deviceSettingsKeys, if (deviceSettingsKeys.contains("gain6Index") || force) { swgFCDProSettings->setGain6Index(settings.m_gain6Index); } + if (deviceSettingsKeys.contains("log2Decim") || force) { + swgFCDProSettings->setLog2Decim(settings.m_log2Decim); + } + if (deviceSettingsKeys.contains("fcPos") || force) { + swgFCDProSettings->setFcPos(settings.m_fcPos); + } if (deviceSettingsKeys.contains("rcFilterIndex") || force) { swgFCDProSettings->setRcFilterIndex(settings.m_rcFilterIndex); } diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp index a91643858..c2fde686e 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp @@ -601,6 +601,12 @@ int FCDProPlusInput::webapiSettingsPutPatch( if (deviceSettingsKeys.contains("centerFrequency")) { settings.m_centerFrequency = response.getFcdProPlusSettings()->getCenterFrequency(); } + if (deviceSettingsKeys.contains("log2Decim")) { + settings.m_log2Decim = response.getFcdProPlusSettings()->getLog2Decim(); + } + if (deviceSettingsKeys.contains("fcPos")) { + settings.m_fcPos = (FCDProPlusSettings::fcPos_t) response.getFcdProPlusSettings()->getFcPos(); + } if (deviceSettingsKeys.contains("rangeLow")) { settings.m_rangeLow = response.getFcdProPlusSettings()->getRangeLow() != 0; } @@ -657,6 +663,8 @@ int FCDProPlusInput::webapiSettingsPutPatch( void FCDProPlusInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const FCDProPlusSettings& settings) { response.getFcdProPlusSettings()->setCenterFrequency(settings.m_centerFrequency); + response.getFcdProPlusSettings()->setLog2Decim(settings.m_log2Decim); + response.getFcdProPlusSettings()->setFcPos((int) settings.m_fcPos); response.getFcdProPlusSettings()->setRangeLow(settings.m_rangeLow ? 1 : 0); response.getFcdProPlusSettings()->setLnaGain(settings.m_lnaGain ? 1 : 0); response.getFcdProPlusSettings()->setMixGain(settings.m_mixGain ? 1 : 0); @@ -690,6 +698,12 @@ void FCDProPlusInput::webapiReverseSendSettings(QList& deviceSettingsKe if (deviceSettingsKeys.contains("centerFrequency") || force) { swgFCDProPlusSettings->setCenterFrequency(settings.m_centerFrequency); } + if (deviceSettingsKeys.contains("log2Decim") || force) { + swgFCDProPlusSettings->setLog2Decim(settings.m_log2Decim); + } + if (deviceSettingsKeys.contains("fcPos") || force) { + swgFCDProPlusSettings->setFcPos((int) settings.m_fcPos); + } if (deviceSettingsKeys.contains("rangeLow") || force) { swgFCDProPlusSettings->setRangeLow(settings.m_rangeLow ? 1 : 0); } diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 6a66de5a0..d19df8b9e 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -2344,6 +2344,12 @@ margin-bottom: 20px; "type" : "integer", "format" : "int64" }, + "log2Decim" : { + "type" : "integer" + }, + "fcPos" : { + "type" : "integer" + }, "rangeLow" : { "type" : "integer", "description" : "Range select (1 if low else 0)" @@ -2448,6 +2454,12 @@ margin-bottom: 20px; "gain6Index" : { "type" : "integer" }, + "log2Decim" : { + "type" : "integer" + }, + "fcPos" : { + "type" : "integer" + }, "dcBlock" : { "type" : "integer" }, @@ -24088,7 +24100,7 @@ except ApiException as e:
- Generated 2019-01-02T09:02:53.799+01:00 + Generated 2019-01-05T09:23:57.596+01:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml b/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml index 5eb4072b3..856b15d8a 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml @@ -38,6 +38,10 @@ FCDProSettings: type: integer gain6Index: type: integer + log2Decim: + type: integer + fcPos: + type: integer dcBlock: type: integer iqCorrection: @@ -46,7 +50,7 @@ FCDProSettings: type: integer transverterDeltaFrequency: type: integer - format: int64 + format: int64 fileRecordName: type: string diff --git a/sdrbase/resources/webapi/doc/swagger/include/FCDProPlus.yaml b/sdrbase/resources/webapi/doc/swagger/include/FCDProPlus.yaml index 581f1e051..fa4aa3600 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/FCDProPlus.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/FCDProPlus.yaml @@ -4,6 +4,10 @@ FCDProPlusSettings: centerFrequency: type: integer format: int64 + log2Decim: + type: integer + fcPos: + type: integer rangeLow: description: Range select (1 if low else 0) type: integer @@ -32,6 +36,6 @@ FCDProPlusSettings: type: integer transverterDeltaFrequency: type: integer - format: int64 + format: int64 fileRecordName: type: string diff --git a/swagger/sdrangel/api/swagger/include/FCDPro.yaml b/swagger/sdrangel/api/swagger/include/FCDPro.yaml index 5eb4072b3..856b15d8a 100644 --- a/swagger/sdrangel/api/swagger/include/FCDPro.yaml +++ b/swagger/sdrangel/api/swagger/include/FCDPro.yaml @@ -38,6 +38,10 @@ FCDProSettings: type: integer gain6Index: type: integer + log2Decim: + type: integer + fcPos: + type: integer dcBlock: type: integer iqCorrection: @@ -46,7 +50,7 @@ FCDProSettings: type: integer transverterDeltaFrequency: type: integer - format: int64 + format: int64 fileRecordName: type: string diff --git a/swagger/sdrangel/api/swagger/include/FCDProPlus.yaml b/swagger/sdrangel/api/swagger/include/FCDProPlus.yaml index 581f1e051..fa4aa3600 100644 --- a/swagger/sdrangel/api/swagger/include/FCDProPlus.yaml +++ b/swagger/sdrangel/api/swagger/include/FCDProPlus.yaml @@ -4,6 +4,10 @@ FCDProPlusSettings: centerFrequency: type: integer format: int64 + log2Decim: + type: integer + fcPos: + type: integer rangeLow: description: Range select (1 if low else 0) type: integer @@ -32,6 +36,6 @@ FCDProPlusSettings: type: integer transverterDeltaFrequency: type: integer - format: int64 + format: int64 fileRecordName: type: string diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 6a66de5a0..d19df8b9e 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -2344,6 +2344,12 @@ margin-bottom: 20px; "type" : "integer", "format" : "int64" }, + "log2Decim" : { + "type" : "integer" + }, + "fcPos" : { + "type" : "integer" + }, "rangeLow" : { "type" : "integer", "description" : "Range select (1 if low else 0)" @@ -2448,6 +2454,12 @@ margin-bottom: 20px; "gain6Index" : { "type" : "integer" }, + "log2Decim" : { + "type" : "integer" + }, + "fcPos" : { + "type" : "integer" + }, "dcBlock" : { "type" : "integer" }, @@ -24088,7 +24100,7 @@ except ApiException as e:
- Generated 2019-01-02T09:02:53.799+01:00 + Generated 2019-01-05T09:23:57.596+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.cpp index 3536568cc..39f47fd79 100644 --- a/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.cpp @@ -30,6 +30,10 @@ SWGFCDProPlusSettings::SWGFCDProPlusSettings(QString* json) { SWGFCDProPlusSettings::SWGFCDProPlusSettings() { center_frequency = 0L; m_center_frequency_isSet = false; + log2_decim = 0; + m_log2_decim_isSet = false; + fc_pos = 0; + m_fc_pos_isSet = false; range_low = 0; m_range_low_isSet = false; lna_gain = 0; @@ -66,6 +70,10 @@ void SWGFCDProPlusSettings::init() { center_frequency = 0L; m_center_frequency_isSet = false; + log2_decim = 0; + m_log2_decim_isSet = false; + fc_pos = 0; + m_fc_pos_isSet = false; range_low = 0; m_range_low_isSet = false; lna_gain = 0; @@ -109,6 +117,8 @@ SWGFCDProPlusSettings::cleanup() { + + if(file_record_name != nullptr) { delete file_record_name; } @@ -127,6 +137,10 @@ void SWGFCDProPlusSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", ""); + ::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", ""); + + ::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", ""); + ::SWGSDRangel::setValue(&range_low, pJson["rangeLow"], "qint32", ""); ::SWGSDRangel::setValue(&lna_gain, pJson["lnaGain"], "qint32", ""); @@ -172,6 +186,12 @@ SWGFCDProPlusSettings::asJsonObject() { if(m_center_frequency_isSet){ obj->insert("centerFrequency", QJsonValue(center_frequency)); } + if(m_log2_decim_isSet){ + obj->insert("log2Decim", QJsonValue(log2_decim)); + } + if(m_fc_pos_isSet){ + obj->insert("fcPos", QJsonValue(fc_pos)); + } if(m_range_low_isSet){ obj->insert("rangeLow", QJsonValue(range_low)); } @@ -225,6 +245,26 @@ SWGFCDProPlusSettings::setCenterFrequency(qint64 center_frequency) { this->m_center_frequency_isSet = true; } +qint32 +SWGFCDProPlusSettings::getLog2Decim() { + return log2_decim; +} +void +SWGFCDProPlusSettings::setLog2Decim(qint32 log2_decim) { + this->log2_decim = log2_decim; + this->m_log2_decim_isSet = true; +} + +qint32 +SWGFCDProPlusSettings::getFcPos() { + return fc_pos; +} +void +SWGFCDProPlusSettings::setFcPos(qint32 fc_pos) { + this->fc_pos = fc_pos; + this->m_fc_pos_isSet = true; +} + qint32 SWGFCDProPlusSettings::getRangeLow() { return range_low; @@ -361,6 +401,8 @@ SWGFCDProPlusSettings::isSet(){ bool isObjectUpdated = false; do{ if(m_center_frequency_isSet){ isObjectUpdated = true; break;} + if(m_log2_decim_isSet){ isObjectUpdated = true; break;} + if(m_fc_pos_isSet){ isObjectUpdated = true; break;} if(m_range_low_isSet){ isObjectUpdated = true; break;} if(m_lna_gain_isSet){ isObjectUpdated = true; break;} if(m_mix_gain_isSet){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.h b/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.h index a9f40360f..89eb12d6e 100644 --- a/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGFCDProPlusSettings.h @@ -45,6 +45,12 @@ public: qint64 getCenterFrequency(); void setCenterFrequency(qint64 center_frequency); + qint32 getLog2Decim(); + void setLog2Decim(qint32 log2_decim); + + qint32 getFcPos(); + void setFcPos(qint32 fc_pos); + qint32 getRangeLow(); void setRangeLow(qint32 range_low); @@ -91,6 +97,12 @@ private: qint64 center_frequency; bool m_center_frequency_isSet; + qint32 log2_decim; + bool m_log2_decim_isSet; + + qint32 fc_pos; + bool m_fc_pos_isSet; + qint32 range_low; bool m_range_low_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp index 2aa0a4e7f..bf3be33b8 100644 --- a/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp @@ -64,6 +64,10 @@ SWGFCDProSettings::SWGFCDProSettings() { m_gain5_index_isSet = false; gain6_index = 0; m_gain6_index_isSet = false; + log2_decim = 0; + m_log2_decim_isSet = false; + fc_pos = 0; + m_fc_pos_isSet = false; dc_block = 0; m_dc_block_isSet = false; iq_correction = 0; @@ -118,6 +122,10 @@ SWGFCDProSettings::init() { m_gain5_index_isSet = false; gain6_index = 0; m_gain6_index_isSet = false; + log2_decim = 0; + m_log2_decim_isSet = false; + fc_pos = 0; + m_fc_pos_isSet = false; dc_block = 0; m_dc_block_isSet = false; iq_correction = 0; @@ -151,6 +159,8 @@ SWGFCDProSettings::cleanup() { + + @@ -206,6 +216,10 @@ SWGFCDProSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&gain6_index, pJson["gain6Index"], "qint32", ""); + ::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", ""); + + ::SWGSDRangel::setValue(&fc_pos, pJson["fcPos"], "qint32", ""); + ::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", ""); ::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", ""); @@ -286,6 +300,12 @@ SWGFCDProSettings::asJsonObject() { if(m_gain6_index_isSet){ obj->insert("gain6Index", QJsonValue(gain6_index)); } + if(m_log2_decim_isSet){ + obj->insert("log2Decim", QJsonValue(log2_decim)); + } + if(m_fc_pos_isSet){ + obj->insert("fcPos", QJsonValue(fc_pos)); + } if(m_dc_block_isSet){ obj->insert("dcBlock", QJsonValue(dc_block)); } @@ -485,6 +505,26 @@ SWGFCDProSettings::setGain6Index(qint32 gain6_index) { this->m_gain6_index_isSet = true; } +qint32 +SWGFCDProSettings::getLog2Decim() { + return log2_decim; +} +void +SWGFCDProSettings::setLog2Decim(qint32 log2_decim) { + this->log2_decim = log2_decim; + this->m_log2_decim_isSet = true; +} + +qint32 +SWGFCDProSettings::getFcPos() { + return fc_pos; +} +void +SWGFCDProSettings::setFcPos(qint32 fc_pos) { + this->fc_pos = fc_pos; + this->m_fc_pos_isSet = true; +} + qint32 SWGFCDProSettings::getDcBlock() { return dc_block; @@ -558,6 +598,8 @@ SWGFCDProSettings::isSet(){ if(m_if_filter_index_isSet){ isObjectUpdated = true; break;} if(m_gain5_index_isSet){ isObjectUpdated = true; break;} if(m_gain6_index_isSet){ isObjectUpdated = true; break;} + if(m_log2_decim_isSet){ isObjectUpdated = true; break;} + if(m_fc_pos_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;} diff --git a/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h index a035c46b7..39c652357 100644 --- a/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h @@ -96,6 +96,12 @@ public: qint32 getGain6Index(); void setGain6Index(qint32 gain6_index); + qint32 getLog2Decim(); + void setLog2Decim(qint32 log2_decim); + + qint32 getFcPos(); + void setFcPos(qint32 fc_pos); + qint32 getDcBlock(); void setDcBlock(qint32 dc_block); @@ -169,6 +175,12 @@ private: qint32 gain6_index; bool m_gain6_index_isSet; + qint32 log2_decim; + bool m_log2_decim_isSet; + + qint32 fc_pos; + bool m_fc_pos_isSet; + qint32 dc_block; bool m_dc_block_isSet;