Fixed marker init

This commit is contained in:
Mark Qvist 2023-10-22 21:18:37 +02:00
parent f5d1dc6e05
commit a0a6745b35
2 changed files with 2 additions and 2 deletions

View File

@ -3303,7 +3303,7 @@ class SidebandApp(MDApp):
t = Telemeter.from_packed(telemetry_data) t = Telemeter.from_packed(telemetry_data)
if t != None: if t != None:
telemetry = t.read_all() telemetry = t.read_all()
if "location" in telemetry and telemetry["location"]["latitude"] != None and telemetry["location"]["longtitude"] != None: if "location" in telemetry and telemetry["location"] != None and telemetry["location"]["latitude"] != None and telemetry["location"]["longtitude"] != None:
latest_viewable = telemetry latest_viewable = telemetry
break break

View File

@ -763,7 +763,7 @@ class SidebandCore():
for pt in pts: for pt in pts:
try: try:
t = Telemeter.from_packed(pt[1]).read_all() t = Telemeter.from_packed(pt[1]).read_all()
if "location" in t: if "location" in t and t["location"] != None:
l = t["location"] l = t["location"]
if "latitude" in l and "longtitude" in l: if "latitude" in l and "longtitude" in l:
if l["latitude"] != None and l["longtitude"] != None: if l["latitude"] != None and l["longtitude"] != None: