diff --git a/plutosdr_source/src/main.cpp b/plutosdr_source/src/main.cpp index a5de1caa..5fa3c6fc 100644 --- a/plutosdr_source/src/main.cpp +++ b/plutosdr_source/src/main.cpp @@ -147,7 +147,7 @@ private: _this->freq = freq; if (_this->running) { // SET PLUTO FREQ HERE - iio_channel_attr_write_longlong(iio_device_find_channel(_this->phy, "altvoltage0", true), "frequency", round(_this->freq)); + iio_channel_attr_write_longlong(iio_device_find_channel(_this->phy, "altvoltage0", true), "frequency", round(freq)); } spdlog::info("PlutoSDRSourceModule '{0}': Tune: {1}!", _this->name, freq); } diff --git a/rtl_sdr_source/src/main.cpp b/rtl_sdr_source/src/main.cpp index 9071fc0b..5d163351 100644 --- a/rtl_sdr_source/src/main.cpp +++ b/rtl_sdr_source/src/main.cpp @@ -281,7 +281,7 @@ private: static void tune(double freq, void* ctx) { RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx; if (_this->running) { - rtlsdr_set_center_freq(_this->openDev, _this->freq); + rtlsdr_set_center_freq(_this->openDev, freq); } _this->freq = freq; spdlog::info("RTLSDRSourceModule '{0}': Tune: {1}!", _this->name, freq); diff --git a/sdrplay_source/src/main.cpp b/sdrplay_source/src/main.cpp index 5bffd9a0..daa0288b 100644 --- a/sdrplay_source/src/main.cpp +++ b/sdrplay_source/src/main.cpp @@ -189,7 +189,7 @@ private: _this->openDevParams->devParams->fsFreq.fsHz = 8000000; _this->openDevParams->rxChannelA->tunerParams.bwType = sdrplay_api_BW_8_000; _this->openDevParams->rxChannelA->tunerParams.rfFreq.rfHz = _this->freq; - _this->openDevParams->rxChannelA->tunerParams.gain.gRdB = 0; + _this->openDevParams->rxChannelA->tunerParams.gain.gRdB = 30; _this->openDevParams->rxChannelA->tunerParams.gain.LNAstate = 0; _this->openDevParams->rxChannelA->ctrlParams.agc.enable = sdrplay_api_AGC_DISABLE; //_this->openDevParams->devParams-> @@ -221,7 +221,7 @@ private: static void tune(double freq, void* ctx) { SDRPlaySourceModule* _this = (SDRPlaySourceModule*)ctx; if (_this->running) { - _this->openDevParams->rxChannelA->tunerParams.rfFreq.rfHz = _this->freq; + _this->openDevParams->rxChannelA->tunerParams.rfFreq.rfHz = freq; sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Frf, sdrplay_api_Update_Ext1_None); } _this->freq = freq; @@ -299,8 +299,8 @@ private: SDRPlaySourceModule* _this = (SDRPlaySourceModule*)cbContext; if (!_this->running) { return; } for (int i = 0; i < numSamples; i++) { - _this->stream.writeBuf[i].i = (float)xi[i] / 32768.0f; - _this->stream.writeBuf[i].q = (float)xq[i] / 32768.0f; + _this->stream.writeBuf[i].i = (float)xq[i] / 32768.0f; + _this->stream.writeBuf[i].q = (float)xi[i] / 32768.0f; } _this->stream.swap(numSamples); }