From f109472c40ce13c687c5ae794a7eca19149da0c0 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 19 Jun 2024 14:42:05 -0700 Subject: [PATCH] Update mesh-bot.py --- mesh-bot.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mesh-bot.py b/mesh-bot.py index 73b4898..80cfbbd 100644 --- a/mesh-bot.py +++ b/mesh-bot.py @@ -215,13 +215,10 @@ def get_node_location(number): if interface.nodes: for node in interface.nodes.values(): if number == node['num']: - print (node) if 'position' in node: - print (node['position']) - #lat = node['position']['latitude'] - #lon = node['position']['longitude'] - #position = (lat,lon) - print (f"{log_timestamp()} System: Found location data for {number}") + for data in node['position']: + position = [data['latitude'],data['longitude']] + print (f"{log_timestamp()} System: Using location data for {number}") return position else: print (f"{log_timestamp()} System: No location data for {number}")