From c579d66b5902e3000d30e253b9db4fb6f82ef1b1 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 3 Oct 2018 06:14:26 +0200 Subject: [PATCH] BladeRF2: implemented transverter mode --- .../bladerf2output/bladerf2output.cpp | 18 +++++++- .../bladerf2output/bladerf2outputgui.cpp | 36 ++++++++++++++++ .../bladerf2output/bladerf2outputgui.h | 3 ++ .../bladerf2output/bladerf2outputgui.ui | 43 ++++++++++++++----- .../bladerf2output/bladerf2outputsettings.cpp | 6 +++ .../bladerf2output/bladerf2outputsettings.h | 2 + .../limesdroutput/limesdroutput.cpp | 9 ++-- .../bladerf2input/bladerf2input.cpp | 17 +++++++- .../bladerf2input/bladerf2inputgui.cpp | 36 ++++++++++++++++ .../bladerf2input/bladerf2inputgui.h | 3 ++ .../bladerf2input/bladerf2inputgui.ui | 29 +++++++++++-- .../bladerf2input/bladerf2inputsettings.cpp | 6 +++ .../bladerf2input/bladerf2inputsettings.h | 2 + sdrbase/resources/webapi/doc/html2/index.html | 16 ++++++- .../webapi/doc/swagger/include/BladeRF2.yaml | 10 +++++ .../api/swagger/include/BladeRF2.yaml | 10 +++++ swagger/sdrangel/code/html2/index.html | 16 ++++++- .../qt5/client/SWGBladeRF2InputSettings.cpp | 42 ++++++++++++++++++ .../qt5/client/SWGBladeRF2InputSettings.h | 12 ++++++ .../qt5/client/SWGBladeRF2OutputSettings.cpp | 42 ++++++++++++++++++ .../qt5/client/SWGBladeRF2OutputSettings.h | 12 ++++++ 21 files changed, 348 insertions(+), 22 deletions(-) diff --git a/plugins/samplesink/bladerf2output/bladerf2output.cpp b/plugins/samplesink/bladerf2output/bladerf2output.cpp index 39aba7956..6b00b07b3 100644 --- a/plugins/samplesink/bladerf2output/bladerf2output.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2output.cpp @@ -686,6 +686,9 @@ bool BladeRF2Output::applySettings(const BladeRF2OutputSettings& settings, bool struct bladerf *dev = m_deviceShared.m_dev->getDev(); int requestedChannel = m_deviceAPI->getItemIndex(); int nbChannels = getNbChannels(); + qint64 deviceCenterFrequency = settings.m_centerFrequency; + deviceCenterFrequency -= settings.m_transverterMode ? settings.m_transverterDeltaFrequency : 0; + deviceCenterFrequency = deviceCenterFrequency < 0 ? 0 : deviceCenterFrequency; if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || (m_settings.m_log2Interp != settings.m_log2Interp) || force) { @@ -778,6 +781,8 @@ bool BladeRF2Output::applySettings(const BladeRF2OutputSettings& settings, bool } if ((m_settings.m_centerFrequency != settings.m_centerFrequency) + || (m_settings.m_transverterMode != settings.m_transverterMode) + || (m_settings.m_transverterDeltaFrequency != settings.m_transverterDeltaFrequency) || (m_settings.m_LOppmTenths != settings.m_LOppmTenths) || (m_settings.m_devSampleRate != settings.m_devSampleRate) || force) { @@ -786,7 +791,7 @@ bool BladeRF2Output::applySettings(const BladeRF2OutputSettings& settings, bool if (dev != 0) { - if (setDeviceCenterFrequency(dev, requestedChannel, settings.m_centerFrequency)) + if (setDeviceCenterFrequency(dev, requestedChannel, deviceCenterFrequency)) { if (getMessageQueueToGUI()) { @@ -869,6 +874,9 @@ bool BladeRF2Output::applySettings(const BladeRF2OutputSettings& settings, bool m_settings = settings; qDebug() << "BladeRF2Output::applySettings: " + << " m_transverterMode: " << m_settings.m_transverterMode + << " m_transverterDeltaFrequency: " << m_settings.m_transverterDeltaFrequency + << " deviceCenterFrequency: " << deviceCenterFrequency << " m_centerFrequency: " << m_settings.m_centerFrequency << " Hz" << " m_LOppmTenths: " << m_settings.m_LOppmTenths << " m_bandwidth: " << m_settings.m_bandwidth @@ -931,6 +939,12 @@ int BladeRF2Output::webapiSettingsPutPatch( if (deviceSettingsKeys.contains("globalGain")) { settings.m_globalGain = response.getBladeRf2OutputSettings()->getGlobalGain(); } + if (deviceSettingsKeys.contains("transverterDeltaFrequency")) { + settings.m_transverterDeltaFrequency = response.getBladeRf2OutputSettings()->getTransverterDeltaFrequency(); + } + if (deviceSettingsKeys.contains("transverterMode")) { + settings.m_transverterMode = response.getBladeRf2OutputSettings()->getTransverterMode() != 0; + } MsgConfigureBladeRF2 *msg = MsgConfigureBladeRF2::create(settings, force); m_inputMessageQueue.push(msg); @@ -962,6 +976,8 @@ void BladeRF2Output::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response.getBladeRf2OutputSettings()->setLog2Interp(settings.m_log2Interp); response.getBladeRf2OutputSettings()->setBiasTee(settings.m_biasTee ? 1 : 0); response.getBladeRf2OutputSettings()->setGlobalGain(settings.m_globalGain); + response.getBladeRf2OutputSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency); + response.getBladeRf2OutputSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0); } void BladeRF2Output::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response) diff --git a/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp b/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp index a8e47c13f..283a68cb0 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp @@ -134,6 +134,32 @@ bool BladeRF2OutputGui::deserialize(const QByteArray& data) } } +void BladeRF2OutputGui::updateFrequencyLimits() +{ + // values in kHz + uint64_t f_min, f_max; + int step; + qint64 deltaFrequency = m_settings.m_transverterMode ? m_settings.m_transverterDeltaFrequency/1000 : 0; + m_sampleSink->getFrequencyRange(f_min, f_max, step); + qint64 minLimit = f_min/1000 + deltaFrequency; + qint64 maxLimit = f_max/1000 + deltaFrequency; + + minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit; + maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit; + + qDebug("BladeRF2OutputGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit); + + ui->centerFrequency->setValueRange(7, minLimit, maxLimit); +} + +void BladeRF2OutputGui::setCenterFrequencySetting(uint64_t kHzValue) +{ + int64_t centerFrequency = kHzValue*1000; + + m_settings.m_centerFrequency = centerFrequency < 0 ? 0 : (uint64_t) centerFrequency; + ui->centerFrequency->setToolTip(QString("Main center frequency in kHz (LO: %1 kHz)").arg(centerFrequency/1000)); +} + bool BladeRF2OutputGui::handleMessage(const Message& message) { if (BladeRF2Output::MsgConfigureBladeRF2::match(message)) @@ -282,6 +308,16 @@ void BladeRF2OutputGui::on_gain_valueChanged(int value) sendSettings(); } +void BladeRF2OutputGui::on_transverter_clicked() +{ + m_settings.m_transverterMode = ui->transverter->getDeltaFrequencyAcive(); + m_settings.m_transverterDeltaFrequency = ui->transverter->getDeltaFrequency(); + qDebug("LimeSDRInputGUI::on_transverter_clicked: %lld Hz %s", m_settings.m_transverterDeltaFrequency, m_settings.m_transverterMode ? "on" : "off"); + updateFrequencyLimits(); + setCenterFrequencySetting(ui->centerFrequency->getValueNew()); + sendSettings(); +} + void BladeRF2OutputGui::on_startStop_toggled(bool checked) { if (m_doApplySettings) diff --git a/plugins/samplesink/bladerf2output/bladerf2outputgui.h b/plugins/samplesink/bladerf2output/bladerf2outputgui.h index 7027c1bc3..edbc35496 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputgui.h +++ b/plugins/samplesink/bladerf2output/bladerf2outputgui.h @@ -70,6 +70,8 @@ private: void displaySettings(); void sendSettings(); void updateSampleRateAndFrequency(); + void updateFrequencyLimits(); + void setCenterFrequencySetting(uint64_t kHzValue); private slots: void handleInputMessages(); @@ -81,6 +83,7 @@ private slots: void on_interp_currentIndexChanged(int index); void on_gain_valueChanged(int value); void on_startStop_toggled(bool checked); + void on_transverter_clicked(); void updateHardware(); void updateStatus(); }; diff --git a/plugins/samplesink/bladerf2output/bladerf2outputgui.ui b/plugins/samplesink/bladerf2output/bladerf2outputgui.ui index 2e754dead..697d5e909 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputgui.ui +++ b/plugins/samplesink/bladerf2output/bladerf2outputgui.ui @@ -261,16 +261,6 @@ - - - - Bias Tee - - - BT - - - @@ -284,6 +274,22 @@ + + + + + 24 + 24 + + + + Transverter frequency translation dialog + + + X + + + @@ -411,7 +417,7 @@ - + 3 @@ -448,6 +454,16 @@ + + + + Bias Tee + + + BT + + + @@ -488,6 +504,11 @@ QToolButton
gui/buttonswitch.h
+ + TransverterButton + QPushButton +
gui/transverterbutton.h
+
diff --git a/plugins/samplesink/bladerf2output/bladerf2outputsettings.cpp b/plugins/samplesink/bladerf2output/bladerf2outputsettings.cpp index f78fa0375..2ea428ef5 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputsettings.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2outputsettings.cpp @@ -34,6 +34,8 @@ void BladeRF2OutputSettings::resetToDefaults() m_globalGain = -3; m_biasTee = false; m_log2Interp = 0; + m_transverterMode = false; + m_transverterDeltaFrequency = 0; } QByteArray BladeRF2OutputSettings::serialize() const @@ -46,6 +48,8 @@ QByteArray BladeRF2OutputSettings::serialize() const s.writeS32(4, m_globalGain); s.writeBool(5, m_biasTee); s.writeU32(6, m_log2Interp); + s.writeBool(7, m_transverterMode); + s.writeS64(8, m_transverterDeltaFrequency); return s.final(); } @@ -68,6 +72,8 @@ bool BladeRF2OutputSettings::deserialize(const QByteArray& data) d.readS32(4, &m_globalGain); d.readBool(5, &m_biasTee); d.readU32(6, &m_log2Interp); + d.readBool(7, &m_transverterMode, false); + d.readS64(8, &m_transverterDeltaFrequency, 0); return true; } diff --git a/plugins/samplesink/bladerf2output/bladerf2outputsettings.h b/plugins/samplesink/bladerf2output/bladerf2outputsettings.h index 92f7111ba..b1385be41 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputsettings.h +++ b/plugins/samplesink/bladerf2output/bladerf2outputsettings.h @@ -28,6 +28,8 @@ struct BladeRF2OutputSettings { int m_globalGain; bool m_biasTee; quint32 m_log2Interp; + bool m_transverterMode; + qint64 m_transverterDeltaFrequency; BladeRF2OutputSettings(); void resetToDefaults(); diff --git a/plugins/samplesink/limesdroutput/limesdroutput.cpp b/plugins/samplesink/limesdroutput/limesdroutput.cpp index 657864a44..a166d488c 100644 --- a/plugins/samplesink/limesdroutput/limesdroutput.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutput.cpp @@ -590,9 +590,12 @@ bool LimeSDROutput::handleMessage(const Message& message) m_settings.m_extClock = report.getExtClock(); m_settings.m_extClockFreq = report.getExtClockFeq(); - DeviceLimeSDRShared::MsgReportClockSourceChange *reportToGUI = DeviceLimeSDRShared::MsgReportClockSourceChange::create( - m_settings.m_extClock, m_settings.m_extClockFreq); - getMessageQueueToGUI()->push(reportToGUI); + if (getMessageQueueToGUI()) + { + DeviceLimeSDRShared::MsgReportClockSourceChange *reportToGUI = DeviceLimeSDRShared::MsgReportClockSourceChange::create( + m_settings.m_extClock, m_settings.m_extClockFreq); + getMessageQueueToGUI()->push(reportToGUI); + } return true; } diff --git a/plugins/samplesource/bladerf2input/bladerf2input.cpp b/plugins/samplesource/bladerf2input/bladerf2input.cpp index 53a25f04c..60387f70d 100644 --- a/plugins/samplesource/bladerf2input/bladerf2input.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2input.cpp @@ -749,6 +749,9 @@ bool BladeRF2Input::applySettings(const BladeRF2InputSettings& settings, bool fo struct bladerf *dev = m_deviceShared.m_dev->getDev(); int requestedChannel = m_deviceAPI->getItemIndex(); + qint64 xlatedDeviceCenterFrequency = settings.m_centerFrequency; + xlatedDeviceCenterFrequency -= settings.m_transverterMode ? settings.m_transverterDeltaFrequency : 0; + xlatedDeviceCenterFrequency = xlatedDeviceCenterFrequency < 0 ? 0 : xlatedDeviceCenterFrequency; if ((m_settings.m_dcBlock != settings.m_dcBlock) || (m_settings.m_iqCorrection != settings.m_iqCorrection) || force) @@ -824,13 +827,15 @@ bool BladeRF2Input::applySettings(const BladeRF2InputSettings& settings, bool fo } if ((m_settings.m_centerFrequency != settings.m_centerFrequency) + || (m_settings.m_transverterMode != settings.m_transverterMode) + || (m_settings.m_transverterDeltaFrequency != settings.m_transverterDeltaFrequency) || (m_settings.m_LOppmTenths != settings.m_LOppmTenths) || (m_settings.m_devSampleRate != settings.m_devSampleRate) || (m_settings.m_fcPos != settings.m_fcPos) || (m_settings.m_log2Decim != settings.m_log2Decim) || force) { qint64 deviceCenterFrequency = DeviceSampleSource::calculateDeviceCenterFrequency( - settings.m_centerFrequency, + xlatedDeviceCenterFrequency, 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, @@ -943,6 +948,8 @@ bool BladeRF2Input::applySettings(const BladeRF2InputSettings& settings, bool fo m_settings = settings; qDebug() << "BladeRF2Input::applySettings: " + << " m_transverterMode: " << m_settings.m_transverterMode + << " m_transverterDeltaFrequency: " << m_settings.m_transverterDeltaFrequency << " m_centerFrequency: " << m_settings.m_centerFrequency << " Hz" << " m_LOppmTenths: " << m_settings.m_LOppmTenths << " m_bandwidth: " << m_settings.m_bandwidth @@ -1009,6 +1016,12 @@ int BladeRF2Input::webapiSettingsPutPatch( if (deviceSettingsKeys.contains("globalGain")) { settings.m_globalGain = response.getBladeRf2InputSettings()->getGlobalGain(); } + if (deviceSettingsKeys.contains("transverterDeltaFrequency")) { + settings.m_transverterDeltaFrequency = response.getBladeRf2InputSettings()->getTransverterDeltaFrequency(); + } + if (deviceSettingsKeys.contains("transverterMode")) { + settings.m_transverterMode = response.getBladeRf2InputSettings()->getTransverterMode() != 0; + } if (deviceSettingsKeys.contains("fileRecordName")) { settings.m_fileRecordName = *response.getBladeRf1InputSettings()->getFileRecordName(); } @@ -1047,6 +1060,8 @@ void BladeRF2Input::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r response.getBladeRf2InputSettings()->setBiasTee(settings.m_biasTee ? 1 : 0); response.getBladeRf2InputSettings()->setGainMode(settings.m_gainMode); response.getBladeRf2InputSettings()->setGlobalGain(settings.m_globalGain); + response.getBladeRf2InputSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency); + response.getBladeRf2InputSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0); if (response.getBladeRf2InputSettings()->getFileRecordName()) { *response.getBladeRf2InputSettings()->getFileRecordName() = settings.m_fileRecordName; diff --git a/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp b/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp index 3ee2280c7..14c126aa7 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp @@ -146,6 +146,32 @@ bool BladeRF2InputGui::deserialize(const QByteArray& data) } } +void BladeRF2InputGui::updateFrequencyLimits() +{ + // values in kHz + uint64_t f_min, f_max; + int step; + qint64 deltaFrequency = m_settings.m_transverterMode ? m_settings.m_transverterDeltaFrequency/1000 : 0; + m_sampleSource->getFrequencyRange(f_min, f_max, step); + qint64 minLimit = f_min/1000 + deltaFrequency; + qint64 maxLimit = f_max/1000 + deltaFrequency; + + minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit; + maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit; + + qDebug("BladeRF2OutputGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit); + + ui->centerFrequency->setValueRange(7, minLimit, maxLimit); +} + +void BladeRF2InputGui::setCenterFrequencySetting(uint64_t kHzValue) +{ + int64_t centerFrequency = kHzValue*1000; + + m_settings.m_centerFrequency = centerFrequency < 0 ? 0 : (uint64_t) centerFrequency; + ui->centerFrequency->setToolTip(QString("Main center frequency in kHz (LO: %1 kHz)").arg(centerFrequency/1000)); +} + bool BladeRF2InputGui::handleMessage(const Message& message) { if (BladeRF2Input::MsgConfigureBladeRF2::match(message)) @@ -355,6 +381,16 @@ void BladeRF2InputGui::on_gain_valueChanged(int value) sendSettings(); } +void BladeRF2InputGui::on_transverter_clicked() +{ + m_settings.m_transverterMode = ui->transverter->getDeltaFrequencyAcive(); + m_settings.m_transverterDeltaFrequency = ui->transverter->getDeltaFrequency(); + qDebug("LimeSDRInputGUI::on_transverter_clicked: %lld Hz %s", m_settings.m_transverterDeltaFrequency, m_settings.m_transverterMode ? "on" : "off"); + updateFrequencyLimits(); + setCenterFrequencySetting(ui->centerFrequency->getValueNew()); + sendSettings(); +} + void BladeRF2InputGui::on_startStop_toggled(bool checked) { if (m_doApplySettings) diff --git a/plugins/samplesource/bladerf2input/bladerf2inputgui.h b/plugins/samplesource/bladerf2input/bladerf2inputgui.h index 6ec59f776..33ff82bd7 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputgui.h +++ b/plugins/samplesource/bladerf2input/bladerf2inputgui.h @@ -69,6 +69,8 @@ private: void displaySettings(); void sendSettings(); void updateSampleRateAndFrequency(); + void updateFrequencyLimits(); + void setCenterFrequencySetting(uint64_t kHzValue); void blockApplySettings(bool block); private slots: @@ -84,6 +86,7 @@ private slots: void on_fcPos_currentIndexChanged(int index); void on_gainMode_currentIndexChanged(int index); void on_gain_valueChanged(int value); + void on_transverter_clicked(); void on_startStop_toggled(bool checked); void on_record_toggled(bool checked); void updateHardware(); diff --git a/plugins/samplesource/bladerf2input/bladerf2inputgui.ui b/plugins/samplesource/bladerf2input/bladerf2inputgui.ui index c3240635e..aa9c8cbfa 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputgui.ui +++ b/plugins/samplesource/bladerf2input/bladerf2inputgui.ui @@ -310,12 +310,18 @@
- + + + + 24 + 24 + + - Bias Tee + Transverter frequency translation dialog - BT + X @@ -487,7 +493,7 @@ - + 3 @@ -531,6 +537,16 @@ + + + + Bias Tee + + + BT + + + @@ -571,6 +587,11 @@ QToolButton
gui/buttonswitch.h
+ + TransverterButton + QPushButton +
gui/transverterbutton.h
+
diff --git a/plugins/samplesource/bladerf2input/bladerf2inputsettings.cpp b/plugins/samplesource/bladerf2input/bladerf2inputsettings.cpp index 07e604ddc..21e939ff2 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputsettings.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2inputsettings.cpp @@ -36,6 +36,8 @@ void BladeRF2InputSettings::resetToDefaults() m_fcPos = FC_POS_INFRA; m_dcBlock = false; m_iqCorrection = false; + m_transverterMode = false; + m_transverterDeltaFrequency = 0; m_fileRecordName = ""; } @@ -53,6 +55,8 @@ QByteArray BladeRF2InputSettings::serialize() const s.writeBool(8, m_dcBlock); s.writeBool(9, m_iqCorrection); s.writeS32(10, m_LOppmTenths); + s.writeBool(11, m_transverterMode); + s.writeS64(12, m_transverterDeltaFrequency); return s.final(); } @@ -82,6 +86,8 @@ bool BladeRF2InputSettings::deserialize(const QByteArray& data) d.readBool(8, &m_dcBlock); d.readBool(9, &m_iqCorrection); d.readS32(10, &m_LOppmTenths); + d.readBool(11, &m_transverterMode, false); + d.readS64(12, &m_transverterDeltaFrequency, 0); return true; } diff --git a/plugins/samplesource/bladerf2input/bladerf2inputsettings.h b/plugins/samplesource/bladerf2input/bladerf2inputsettings.h index 3cd44fb62..32af13ab4 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputsettings.h +++ b/plugins/samplesource/bladerf2input/bladerf2inputsettings.h @@ -39,6 +39,8 @@ struct BladeRF2InputSettings { fcPos_t m_fcPos; bool m_dcBlock; bool m_iqCorrection; + bool m_transverterMode; + qint64 m_transverterDeltaFrequency; QString m_fileRecordName; BladeRF2InputSettings(); diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index f355d8eab..fe31a31c5 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1361,6 +1361,13 @@ margin-bottom: 20px; "iqCorrection" : { "type" : "integer" }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" + }, "fileRecordName" : { "type" : "string" } @@ -1407,6 +1414,13 @@ margin-bottom: 20px; }, "log2Interp" : { "type" : "integer" + }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" } }, "description" : "BladeRF2" @@ -23228,7 +23242,7 @@ except ApiException as e:
- Generated 2018-09-30T11:01:56.666+02:00 + Generated 2018-10-03T06:02:12.961+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml b/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml index dd873fc17..36e0f7c32 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml @@ -24,6 +24,11 @@ BladeRF2InputSettings: type: integer iqCorrection: type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 fileRecordName: type: string @@ -61,6 +66,11 @@ BladeRF2OutputSettings: type: integer log2Interp: type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 BladeRF2OutputReport: description: BladeRF2 diff --git a/swagger/sdrangel/api/swagger/include/BladeRF2.yaml b/swagger/sdrangel/api/swagger/include/BladeRF2.yaml index 9fb90fded..482d928fc 100644 --- a/swagger/sdrangel/api/swagger/include/BladeRF2.yaml +++ b/swagger/sdrangel/api/swagger/include/BladeRF2.yaml @@ -24,6 +24,11 @@ BladeRF2InputSettings: type: integer iqCorrection: type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 fileRecordName: type: string @@ -61,6 +66,11 @@ BladeRF2OutputSettings: type: integer log2Interp: type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 BladeRF2OutputReport: description: BladeRF2 diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index f355d8eab..fe31a31c5 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1361,6 +1361,13 @@ margin-bottom: 20px; "iqCorrection" : { "type" : "integer" }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" + }, "fileRecordName" : { "type" : "string" } @@ -1407,6 +1414,13 @@ margin-bottom: 20px; }, "log2Interp" : { "type" : "integer" + }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" } }, "description" : "BladeRF2" @@ -23228,7 +23242,7 @@ except ApiException as e:
- Generated 2018-09-30T11:01:56.666+02:00 + Generated 2018-10-03T06:02:12.961+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.cpp index a8c80301a..2fefeb421 100644 --- a/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.cpp @@ -50,6 +50,10 @@ SWGBladeRF2InputSettings::SWGBladeRF2InputSettings() { 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; } @@ -82,6 +86,10 @@ SWGBladeRF2InputSettings::init() { 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; } @@ -99,6 +107,8 @@ SWGBladeRF2InputSettings::cleanup() { + + if(file_record_name != nullptr) { delete file_record_name; } @@ -137,6 +147,10 @@ SWGBladeRF2InputSettings::fromJsonObject(QJsonObject &pJson) { ::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"); } @@ -188,6 +202,12 @@ SWGBladeRF2InputSettings::asJsonObject() { 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")); } @@ -305,6 +325,26 @@ SWGBladeRF2InputSettings::setIqCorrection(qint32 iq_correction) { this->m_iq_correction_isSet = true; } +qint32 +SWGBladeRF2InputSettings::getTransverterMode() { + return transverter_mode; +} +void +SWGBladeRF2InputSettings::setTransverterMode(qint32 transverter_mode) { + this->transverter_mode = transverter_mode; + this->m_transverter_mode_isSet = true; +} + +qint64 +SWGBladeRF2InputSettings::getTransverterDeltaFrequency() { + return transverter_delta_frequency; +} +void +SWGBladeRF2InputSettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequency) { + this->transverter_delta_frequency = transverter_delta_frequency; + this->m_transverter_delta_frequency_isSet = true; +} + QString* SWGBladeRF2InputSettings::getFileRecordName() { return file_record_name; @@ -331,6 +371,8 @@ SWGBladeRF2InputSettings::isSet(){ 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;} + 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/SWGBladeRF2InputSettings.h b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.h index fdc92abe2..10ee26670 100644 --- a/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputSettings.h @@ -75,6 +75,12 @@ public: 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); @@ -115,6 +121,12 @@ private: 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; diff --git a/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.cpp index df7a85fd4..39d6a4a49 100644 --- a/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.cpp @@ -42,6 +42,10 @@ SWGBladeRF2OutputSettings::SWGBladeRF2OutputSettings() { m_bias_tee_isSet = false; log2_interp = 0; m_log2_interp_isSet = false; + transverter_mode = 0; + m_transverter_mode_isSet = false; + transverter_delta_frequency = 0L; + m_transverter_delta_frequency_isSet = false; } SWGBladeRF2OutputSettings::~SWGBladeRF2OutputSettings() { @@ -64,6 +68,10 @@ SWGBladeRF2OutputSettings::init() { m_bias_tee_isSet = false; log2_interp = 0; m_log2_interp_isSet = false; + transverter_mode = 0; + m_transverter_mode_isSet = false; + transverter_delta_frequency = 0L; + m_transverter_delta_frequency_isSet = false; } void @@ -75,6 +83,8 @@ SWGBladeRF2OutputSettings::cleanup() { + + } SWGBladeRF2OutputSettings* @@ -102,6 +112,10 @@ SWGBladeRF2OutputSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&log2_interp, pJson["log2Interp"], "qint32", ""); + ::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", ""); + + ::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", ""); + } QString @@ -139,6 +153,12 @@ SWGBladeRF2OutputSettings::asJsonObject() { if(m_log2_interp_isSet){ obj->insert("log2Interp", QJsonValue(log2_interp)); } + if(m_transverter_mode_isSet){ + obj->insert("transverterMode", QJsonValue(transverter_mode)); + } + if(m_transverter_delta_frequency_isSet){ + obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency)); + } return obj; } @@ -213,6 +233,26 @@ SWGBladeRF2OutputSettings::setLog2Interp(qint32 log2_interp) { this->m_log2_interp_isSet = true; } +qint32 +SWGBladeRF2OutputSettings::getTransverterMode() { + return transverter_mode; +} +void +SWGBladeRF2OutputSettings::setTransverterMode(qint32 transverter_mode) { + this->transverter_mode = transverter_mode; + this->m_transverter_mode_isSet = true; +} + +qint64 +SWGBladeRF2OutputSettings::getTransverterDeltaFrequency() { + return transverter_delta_frequency; +} +void +SWGBladeRF2OutputSettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequency) { + this->transverter_delta_frequency = transverter_delta_frequency; + this->m_transverter_delta_frequency_isSet = true; +} + bool SWGBladeRF2OutputSettings::isSet(){ @@ -225,6 +265,8 @@ SWGBladeRF2OutputSettings::isSet(){ if(m_global_gain_isSet){ isObjectUpdated = true; break;} if(m_bias_tee_isSet){ isObjectUpdated = true; break;} if(m_log2_interp_isSet){ isObjectUpdated = true; break;} + if(m_transverter_mode_isSet){ isObjectUpdated = true; break;} + if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;} }while(false); return isObjectUpdated; } diff --git a/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.h b/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.h index af1a497c3..b4fcfd7f2 100644 --- a/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGBladeRF2OutputSettings.h @@ -62,6 +62,12 @@ public: qint32 getLog2Interp(); void setLog2Interp(qint32 log2_interp); + qint32 getTransverterMode(); + void setTransverterMode(qint32 transverter_mode); + + qint64 getTransverterDeltaFrequency(); + void setTransverterDeltaFrequency(qint64 transverter_delta_frequency); + virtual bool isSet() override; @@ -87,6 +93,12 @@ private: qint32 log2_interp; bool m_log2_interp_isSet; + qint32 transverter_mode; + bool m_transverter_mode_isSet; + + qint64 transverter_delta_frequency; + bool m_transverter_delta_frequency_isSet; + }; }