From 62140e2ac70d397d333b3ff91ac72cc26ccec7e7 Mon Sep 17 00:00:00 2001 From: Eric Andrechek Date: Mon, 15 Jul 2024 08:07:57 -0500 Subject: [PATCH] maybe found an issue --- tracking-dashboard/backend/mqtt-syncer.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tracking-dashboard/backend/mqtt-syncer.py b/tracking-dashboard/backend/mqtt-syncer.py index 5d1dcc7..e370d50 100644 --- a/tracking-dashboard/backend/mqtt-syncer.py +++ b/tracking-dashboard/backend/mqtt-syncer.py @@ -208,16 +208,13 @@ def on_message(client, userdata, message): print("Error parsing data: ", e) return - print("made it here") # check if lat, lon, or alt changed if ( "lat" in message_building[id] and "lon" in message_building[id] and "alt" in message_building[id] ): - print("into this loop") if id in old_messages: - print("into old messages") if ( message_building[id]["lat"] == old_messages[id]["lat"] and message_building[id]["lon"] == old_messages[id]["lon"] @@ -269,7 +266,13 @@ def on_message(client, userdata, message): message_building[id]["lon"] = payload elif key == "alt": message_building[id]["alt"] = payload - print("exiting safely") + else: + if key == "lat": + message_building[id]["lat"] = payload + elif key == "lon": + message_building[id]["lon"] = payload + elif key == "alt": + message_building[id]["alt"] = payload return elif key == "spd": # convert speed to mph from knots