diff --git a/devices/plutosdr/deviceplutosdrbox.cpp b/devices/plutosdr/deviceplutosdrbox.cpp index 6ac8dfdd5..98e4bcf55 100644 --- a/devices/plutosdr/deviceplutosdrbox.cpp +++ b/devices/plutosdr/deviceplutosdrbox.cpp @@ -162,7 +162,7 @@ bool DevicePlutoSDRBox::get_param(DeviceType devType, const std::string ¶m, } } -void DevicePlutoSDRBox::set_filter(const std::string &filterConfigStr) +void DevicePlutoSDRBox::setFilter(const std::string &filterConfigStr) { int ret; @@ -445,15 +445,15 @@ void DevicePlutoSDRBox::setFIR(DeviceUse use, uint32_t intdec, uint32_t bw, int void DevicePlutoSDRBox::formatFIRHeader(std::ostringstream& ostr, DeviceUse use, uint32_t intdec, int32_t gain) { - ostr << use == USE_RX ? "RX 1" : "TX 1" << " GAIN " << gain << " DEC " << intdec << std::endl; + ostr << (use == USE_RX ? "RX 1" : "TX 1") << " GAIN " << gain << " DEC " << intdec << std::endl; } void DevicePlutoSDRBox::formatFIRCoefficients(std::ostringstream& ostr, uint32_t nbTaps, double normalizedBW) { - double fcoeffs = new double[nbTaps]; + double *fcoeffs = new double[nbTaps]; WFIR::BasicFIR(fcoeffs, nbTaps, WFIR::LPF, 0.0, normalizedBW, WFIR::wtBLACKMAN_HARRIS, 0.0); - for (int i = 0; i < nbTaps; i++) { + for (unsigned int i = 0; i < nbTaps; i++) { ostr << (uint16_t) (fcoeffs[i] * 32768.0) << std::endl; } } diff --git a/devices/plutosdr/deviceplutosdrbox.h b/devices/plutosdr/deviceplutosdrbox.h index ebac08a7a..e5fd8132c 100644 --- a/devices/plutosdr/deviceplutosdrbox.h +++ b/devices/plutosdr/deviceplutosdrbox.h @@ -94,7 +94,7 @@ private: bool m_valid; bool parseSampleRates(const std::string& rateStr, SampleRates& sampleRates); - void set_filter(const std::string& filterConfigStr); + void setFilter(const std::string& filterConfigStr); void formatFIRHeader(std::ostringstream& str, DeviceUse use, uint32_t intdec, int32_t gain); void formatFIRCoefficients(std::ostringstream& str, uint32_t nbTaps, double normalizedBW); }; diff --git a/plugins/samplesource/plutosdrinput/plutosdrinput.cpp b/plugins/samplesource/plutosdrinput/plutosdrinput.cpp index dd651492f..67ea20e73 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinput.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinput.cpp @@ -17,6 +17,7 @@ #include #include "dsp/filerecord.h" +#include "dsp/dspcommands.h" #include "device/devicesourceapi.h" #include "device/devicesinkapi.h" #include "plutosdr/deviceplutosdrparams.h" @@ -324,7 +325,7 @@ bool PlutoSDRInput::applySettings(const PlutoSDRInputSettings& settings, bool fo || (m_settings.m_rateGovernor != settings.m_rateGovernor) || (m_settings.m_lpfFIRlog2Decim != settings.m_lpfFIRlog2Decim))) || force) { - plutoBox->set_filterBW(DevicePlutoSDRBox::USE_RX, (1<setFIR(DevicePlutoSDRBox::USE_RX, (1<set_filterBW(DevicePlutoSDRBox::USE_RX, (1<setFIR(DevicePlutoSDRBox::USE_RX, (1<& sinkBuddies = m_deviceAPI->getSinkBuddies(); @@ -400,6 +407,10 @@ bool PlutoSDRInput::applySettings(const PlutoSDRInputSettings& settings, bool fo } // TODO: forward changes to other (Tx) DSP + if (forwardChangeOtherDSP) + { + qDebug("PlutoSDRInput::applySettings: forwardChangeOtherDSP"); + } if (forwardChangeOwnDSP) {