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}")