From 401134cdd2639d6526597f712a978dc304ab6ad6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 14 Sep 2020 23:38:06 +0200 Subject: [PATCH] BladeRF2: REST API: add scale in range report implementation --- plugins/samplesink/bladerf2output/bladerf2output.cpp | 4 ++++ plugins/samplesource/bladerf2input/bladerf2input.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/plugins/samplesink/bladerf2output/bladerf2output.cpp b/plugins/samplesink/bladerf2output/bladerf2output.cpp index 3aad42b1a..8becabb2d 100644 --- a/plugins/samplesink/bladerf2output/bladerf2output.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2output.cpp @@ -1072,6 +1072,7 @@ void BladeRF2Output::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp response.getBladeRf2OutputReport()->getBandwidthRange()->setMin(min); response.getBladeRf2OutputReport()->getBandwidthRange()->setMax(max); response.getBladeRf2OutputReport()->getBandwidthRange()->setStep(step); + response.getBladeRf2OutputReport()->getBandwidthRange()->setScale(scale); device->getFrequencyRangeTx(f_min, f_max, step, scale); @@ -1079,6 +1080,7 @@ void BladeRF2Output::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp response.getBladeRf2OutputReport()->getFrequencyRange()->setMin(f_min); response.getBladeRf2OutputReport()->getFrequencyRange()->setMax(f_max); response.getBladeRf2OutputReport()->getFrequencyRange()->setStep(step); + response.getBladeRf2OutputReport()->getBandwidthRange()->setScale(scale); device->getGlobalGainRangeTx(min, max, step, scale); @@ -1086,6 +1088,7 @@ void BladeRF2Output::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp response.getBladeRf2OutputReport()->getGlobalGainRange()->setMin(min); response.getBladeRf2OutputReport()->getGlobalGainRange()->setMax(max); response.getBladeRf2OutputReport()->getGlobalGainRange()->setStep(step); + response.getBladeRf2OutputReport()->getBandwidthRange()->setScale(scale); device->getSampleRateRangeTx(min, max, step, scale); @@ -1093,6 +1096,7 @@ void BladeRF2Output::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& resp response.getBladeRf2OutputReport()->getSampleRateRange()->setMin(min); response.getBladeRf2OutputReport()->getSampleRateRange()->setMax(max); response.getBladeRf2OutputReport()->getSampleRateRange()->setStep(step); + response.getBladeRf2OutputReport()->getBandwidthRange()->setScale(scale); } } diff --git a/plugins/samplesource/bladerf2input/bladerf2input.cpp b/plugins/samplesource/bladerf2input/bladerf2input.cpp index ae14bddda..0969c9daa 100644 --- a/plugins/samplesource/bladerf2input/bladerf2input.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2input.cpp @@ -1164,6 +1164,7 @@ void BladeRF2Input::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo response.getBladeRf2InputReport()->getBandwidthRange()->setMin(min); response.getBladeRf2InputReport()->getBandwidthRange()->setMax(max); response.getBladeRf2InputReport()->getBandwidthRange()->setStep(step); + response.getBladeRf2InputReport()->getBandwidthRange()->setScale(scale); device->getFrequencyRangeRx(f_min, f_max, step, scale); @@ -1171,6 +1172,7 @@ void BladeRF2Input::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo response.getBladeRf2InputReport()->getFrequencyRange()->setMin(f_min); response.getBladeRf2InputReport()->getFrequencyRange()->setMax(f_max); response.getBladeRf2InputReport()->getFrequencyRange()->setStep(step); + response.getBladeRf2InputReport()->getBandwidthRange()->setScale(scale); device->getGlobalGainRangeRx(min, max, step, scale); @@ -1178,6 +1180,7 @@ void BladeRF2Input::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo response.getBladeRf2InputReport()->getGlobalGainRange()->setMin(min); response.getBladeRf2InputReport()->getGlobalGainRange()->setMax(max); response.getBladeRf2InputReport()->getGlobalGainRange()->setStep(step); + response.getBladeRf2InputReport()->getBandwidthRange()->setScale(scale); device->getSampleRateRangeRx(min, max, step, scale); @@ -1185,6 +1188,7 @@ void BladeRF2Input::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& respo response.getBladeRf2InputReport()->getSampleRateRange()->setMin(min); response.getBladeRf2InputReport()->getSampleRateRange()->setMax(max); response.getBladeRf2InputReport()->getSampleRateRange()->setStep(step); + response.getBladeRf2InputReport()->getBandwidthRange()->setScale(scale); response.getBladeRf2InputReport()->setGainModes(new QList);