From 999054ab3476d20f847e22e52b62e1d606667558 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 14 Mar 2025 17:13:02 +0100 Subject: [PATCH] Improved map init time --- sbapp/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbapp/main.py b/sbapp/main.py index d9e3390..827ce5c 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -6155,7 +6155,7 @@ class SidebandApp(MDApp): latest_viewable = None if not skip: - for telemetry_entry in telemetry_entries[telemetry_source]: + for telemetry_entry in sorted(telemetry_entries[telemetry_source], key=lambda t: t[0], reverse=True): telemetry_timestamp = telemetry_entry[0] telemetry_data = telemetry_entry[1] t = Telemeter.from_packed(telemetry_data) @@ -6164,6 +6164,10 @@ class SidebandApp(MDApp): if "location" in telemetry and telemetry["location"] != None and telemetry["location"]["latitude"] != None and telemetry["location"]["longitude"] != None: latest_viewable = telemetry break + elif "connection_map" in telemetry: + # TODO: Telemetry entries with connection map sensor types are skipped for now, + # until a proper rendering mechanism is implemented + break if latest_viewable != None: l = latest_viewable["location"]