mirror of
				https://github.com/AlexandreRouma/SDRPlusPlus.git
				synced 2025-10-31 00:48:11 +01:00 
			
		
		
		
	Move gain clamping in rtl-sdr init
This commit is contained in:
		| @@ -199,8 +199,6 @@ public: | ||||
|             config.conf["devices"][selectedDevName]["tunerAgc"] = tunerAgc; | ||||
|             config.conf["devices"][selectedDevName]["gain"] = gainId; | ||||
|         } | ||||
|         if (gainId >= gainList.size()) { gainId = gainList.size() - 1; } | ||||
|         updateGainTxt(); | ||||
|  | ||||
|         // Load config | ||||
|         if (config.conf["devices"][selectedDevName].contains("sampleRate")) { | ||||
| @@ -240,9 +238,11 @@ public: | ||||
|  | ||||
|         if (config.conf["devices"][selectedDevName].contains("gain")) { | ||||
|             gainId = config.conf["devices"][selectedDevName]["gain"]; | ||||
|             updateGainTxt(); | ||||
|         } | ||||
|  | ||||
|         if (gainId >= gainList.size()) { gainId = gainList.size() - 1; } | ||||
|         updateGainTxt(); | ||||
|  | ||||
|         config.release(created); | ||||
|  | ||||
|         rtlsdr_close(openDev); | ||||
| @@ -595,4 +595,4 @@ MOD_EXPORT void _DELETE_INSTANCE_(ModuleManager::Instance* instance) { | ||||
| MOD_EXPORT void _END_() { | ||||
|     config.disableAutoSave(); | ||||
|     config.save(); | ||||
| } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user