mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-04-19 21:48:45 +02:00
Move gain clamping in rtl-sdr init
This commit is contained in:
parent
f90e2d53a7
commit
2a84ed202c
@ -199,8 +199,6 @@ public:
|
|||||||
config.conf["devices"][selectedDevName]["tunerAgc"] = tunerAgc;
|
config.conf["devices"][selectedDevName]["tunerAgc"] = tunerAgc;
|
||||||
config.conf["devices"][selectedDevName]["gain"] = gainId;
|
config.conf["devices"][selectedDevName]["gain"] = gainId;
|
||||||
}
|
}
|
||||||
if (gainId >= gainList.size()) { gainId = gainList.size() - 1; }
|
|
||||||
updateGainTxt();
|
|
||||||
|
|
||||||
// Load config
|
// Load config
|
||||||
if (config.conf["devices"][selectedDevName].contains("sampleRate")) {
|
if (config.conf["devices"][selectedDevName].contains("sampleRate")) {
|
||||||
@ -240,9 +238,11 @@ public:
|
|||||||
|
|
||||||
if (config.conf["devices"][selectedDevName].contains("gain")) {
|
if (config.conf["devices"][selectedDevName].contains("gain")) {
|
||||||
gainId = config.conf["devices"][selectedDevName]["gain"];
|
gainId = config.conf["devices"][selectedDevName]["gain"];
|
||||||
updateGainTxt();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gainId >= gainList.size()) { gainId = gainList.size() - 1; }
|
||||||
|
updateGainTxt();
|
||||||
|
|
||||||
config.release(created);
|
config.release(created);
|
||||||
|
|
||||||
rtlsdr_close(openDev);
|
rtlsdr_close(openDev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user