Compare commits
No commits in common. "3b649f9c6a75904307fd877f51abb50a798876b2" and "d36b75810a8bcf1e884ed12ee276b66a506e2ee3" have entirely different histories.
3b649f9c6a
...
d36b75810a
|
@ -29,15 +29,14 @@ def main(port, intercom):
|
||||||
time = parsed_data.time
|
time = parsed_data.time
|
||||||
date = parsed_data.date
|
date = parsed_data.date
|
||||||
navpoint.content.content = f"""<?xml version='1.0' encoding='us-ascii'?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"><Document><Style id="icon"><IconStyle><Icon><href>http://127.0.0.1:8888/marker.png</href></Icon></IconStyle></Style><name>Navpoint</name><open>1</open><Placemark><name>Position</name><styleUrl>#icon</styleUrl><Point><coordinates>{lon},{lat},0</coordinates></Point><description>{date} {time} UTC</description></Placemark></Document></kml>"""
|
navpoint.content.content = f"""<?xml version='1.0' encoding='us-ascii'?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"><Document><Style id="icon"><IconStyle><Icon><href>http://127.0.0.1:8888/marker.png</href></Icon></IconStyle></Style><name>Navpoint</name><open>1</open><Placemark><name>Position</name><styleUrl>#icon</styleUrl><Point><coordinates>{lon},{lat},0</coordinates></Point><description>{date} {time} UTC</description></Placemark></Document></kml>"""
|
||||||
if lat or lon: # ignore 0, 0 fixes
|
intercom.put(
|
||||||
intercom.put(
|
"LocationUpdate",
|
||||||
"LocationUpdate",
|
{
|
||||||
{
|
"lat": lat,
|
||||||
"lat": lat,
|
"lon": lon,
|
||||||
"lon": lon,
|
"time": f"{date} {time} UTC",
|
||||||
"time": f"{date} {time} UTC",
|
},
|
||||||
},
|
)
|
||||||
)
|
|
||||||
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
@ -46,6 +45,7 @@ def main(port, intercom):
|
||||||
"Disconnected",
|
"Disconnected",
|
||||||
port,
|
port,
|
||||||
)
|
)
|
||||||
|
window.event_generate("<<newData>>", when="tail", state=1)
|
||||||
messagebox.showerror(
|
messagebox.showerror(
|
||||||
"Navpoint Error", f"Error reading from port {port}: {str(e)}"
|
"Navpoint Error", f"Error reading from port {port}: {str(e)}"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user