More bugfix

This commit is contained in:
Ryzerth
2021-03-30 03:37:40 +02:00
parent ce56d03c3e
commit bcc1744a76
7 changed files with 20 additions and 6 deletions

View File

@ -346,6 +346,18 @@ private:
if (ImGui::Combo(CONCAT("##_rtlsdr_ds_", _this->name), &_this->directSamplingMode, directSamplingModesTxt)) {
if (_this->running) {
rtlsdr_set_direct_sampling(_this->openDev, _this->directSamplingMode);
// Update gains (fix for librtlsdr bug)
if (_this->directSamplingMode == false) {
rtlsdr_set_agc_mode(_this->openDev, _this->rtlAgc);
if (_this->tunerAgc) {
rtlsdr_set_tuner_gain_mode(_this->openDev, 0);
}
else {
rtlsdr_set_tuner_gain_mode(_this->openDev, 1);
rtlsdr_set_tuner_gain(_this->openDev, _this->gainList[_this->gainId]);
}
}
}
if (_this->selectedDevName != "") {
config.aquire();