fix: backwards compatibility for exporter host config

pull/912/head
Luna Simons 2024-09-23 12:01:52 +02:00
rodzic b3d819af91
commit d855c5d820
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FAB9C1BCA0FED262
2 zmienionych plików z 13 dodań i 2 usunięć

Wyświetl plik

@ -976,7 +976,7 @@ def main():
else:
_ozi_host = None
if config["ozi_port"]:
if config["ozi_enabled"]: # Causes port to be set to None which disables the export.
_ozi_port = config["ozi_port"]
else:
_ozi_port = None
@ -986,7 +986,7 @@ def main():
else:
_summary_host = None
if config["payload_summary_port"]:
if config["payload_summary_enabled"]: # Causes port to be set to None which disables the export.
_summary_port = config["payload_summary_port"]
else:
_summary_port = None

Wyświetl plik

@ -771,6 +771,17 @@ def read_auto_rx_config(filename, no_sdr_test=False):
logging.debug("Config - Missing rotator azimuth_only option (new in v1.7.5), using default (False)")
auto_rx_config['rotator_azimuth_only'] = False
# 1.7.5 - Targeted summary output
try:
auto_rx_config["ozi_host"] = config.get("oziplotter", "ozi_host")
auto_rx_config["payload_summary_host"] = config.get("oziplotter", "payload_summary_host")
except:
logging.warning(
"Config - Missing ozi_host or payload_summary_host option (new in v1.7.5), using default (<broadcast>)"
)
auto_rx_config["ozi_host"] = "<broadcast>"
auto_rx_config["payload_summary_host"] = "<broadcast>"
# If we are being called as part of a unit test, just return the config now.
if no_sdr_test:
return auto_rx_config