From 484d7ddf7a584714aa909f97a496fee25cd63b02 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 3 Dec 2023 11:26:22 +0100 Subject: [PATCH] Only run background telemetry updates when location service is available --- sbapp/sideband/core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py index cc97a2d..f36bf83 100644 --- a/sbapp/sideband/core.py +++ b/sbapp/sideband/core.py @@ -2253,7 +2253,8 @@ class SidebandCore(): def telemetry_job(): while self.telemetry_running: try: - self.update_telemetry() + if self.owner_service._gps_started: + self.update_telemetry() except Exception as e: import traceback exception_info = "".join(traceback.TracebackException.from_exception(e).format()) @@ -2313,7 +2314,10 @@ class SidebandCore(): RNS.log("Error while sending latest telemetry to service: "+str(e), RNS.LOG_ERROR) except Exception as e: - RNS.log("Error while updating telemetry: "+str(e), RNS.LOG_ERROR) + import traceback + exception_info = "".join(traceback.TracebackException.from_exception(e).format()) + RNS.log(f"An {str(type(e))} occurred while updating telemetry: {str(e)}", RNS.LOG_ERROR) + RNS.log(exception_info, RNS.LOG_ERROR) def update_telemeter_config(self): if self.config["telemetry_enabled"] == True: