mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-07 01:13:14 +02:00
Update mesh-bot.py
This commit is contained in:
+3
-6
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user