mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-26 08:15:36 -04:00
Improved map init time
This commit is contained in:
parent
dd12a76bf9
commit
999054ab34
1 changed files with 5 additions and 1 deletions
|
@ -6155,7 +6155,7 @@ class SidebandApp(MDApp):
|
||||||
|
|
||||||
latest_viewable = None
|
latest_viewable = None
|
||||||
if not skip:
|
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_timestamp = telemetry_entry[0]
|
||||||
telemetry_data = telemetry_entry[1]
|
telemetry_data = telemetry_entry[1]
|
||||||
t = Telemeter.from_packed(telemetry_data)
|
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:
|
if "location" in telemetry and telemetry["location"] != None and telemetry["location"]["latitude"] != None and telemetry["location"]["longitude"] != None:
|
||||||
latest_viewable = telemetry
|
latest_viewable = telemetry
|
||||||
break
|
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:
|
if latest_viewable != None:
|
||||||
l = latest_viewable["location"]
|
l = latest_viewable["location"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue