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