V3_GQRX_Improvements #11

Merged
logan merged 36 commits from V3_GQRX_Improvements into master 2022-04-16 20:52:44 -04:00
Showing only changes of commit 62f9e1abaa - Show all commits

View File

@@ -18,11 +18,20 @@ def reset_crashed(_config_path):
with open(_config_path, 'w') as config_file:
config.write(config_file)
return True
else:
return False
def enable_agc(_config_path):
config = configparser.SafeConfigParser()
config.read(_config_path)
if config.has_option('receiver', 'agc_off'):
config.remove_option('receiver', 'agc_off')
with open(_config_path, 'w') as config_file:
config.write(config_file)
return True
class GQRXHandler(threading.Thread):
def __init__(self):
super().__init__()
@@ -206,6 +215,9 @@ class GQRXHandler(threading.Thread):
def reset_or_create_config(self):
if self.GQRX_Config_Path.is_file():
self.logger.debug(f"Enabling AGC in the GQRX config")
enable_agc(_config_path=self.GQRX_Config_Path)
self.logger.debug(f"GQRX Config exists, resetting 'crashed' setting")
reset_crashed(_config_path=self.GQRX_Config_Path)
else: