mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-07 03:07:34 +01:00
Fixed gain not updated on RTL-SDR
This commit is contained in:
parent
0dd445f101
commit
7c4e442432
@ -284,11 +284,6 @@ private:
|
|||||||
|
|
||||||
_this->dev->setSampleRate(SOAPY_SDR_RX, _this->channelId, _this->sampleRate);
|
_this->dev->setSampleRate(SOAPY_SDR_RX, _this->channelId, _this->sampleRate);
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
for (auto gain : _this->gainList) {
|
|
||||||
_this->dev->setGain(SOAPY_SDR_RX, _this->channelId, gain, _this->uiGains[i]);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
if(_this->bandwidthList.size() > 2) {
|
if(_this->bandwidthList.size() > 2) {
|
||||||
if(_this->bandwidthList[_this->uiBandwidthId] == -1)
|
if(_this->bandwidthList[_this->uiBandwidthId] == -1)
|
||||||
_this->dev->setBandwidth(SOAPY_SDR_RX, _this->channelId, _this->selectBwBySr(_this->sampleRates[_this->srId]));
|
_this->dev->setBandwidth(SOAPY_SDR_RX, _this->channelId, _this->selectBwBySr(_this->sampleRates[_this->srId]));
|
||||||
@ -300,6 +295,12 @@ private:
|
|||||||
_this->dev->setGainMode(SOAPY_SDR_RX, _this->channelId, _this->agc);
|
_this->dev->setGainMode(SOAPY_SDR_RX, _this->channelId, _this->agc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
for (auto gain : _this->gainList) {
|
||||||
|
_this->dev->setGain(SOAPY_SDR_RX, _this->channelId, gain, _this->uiGains[i]);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
_this->dev->setFrequency(SOAPY_SDR_RX, _this->channelId, _this->freq);
|
_this->dev->setFrequency(SOAPY_SDR_RX, _this->channelId, _this->freq);
|
||||||
|
|
||||||
_this->devStream = _this->dev->setupStream(SOAPY_SDR_RX, "CF32");
|
_this->devStream = _this->dev->setupStream(SOAPY_SDR_RX, "CF32");
|
||||||
|
Loading…
Reference in New Issue
Block a user