mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-06 09:51:24 +02:00
Update system.py
This commit is contained in:
+1
-1
@@ -1051,7 +1051,7 @@ async def handleSentinel(deviceID):
|
||||
if closest_node in [i['id'] for i in handleSentinel_spotted]:
|
||||
# check if the distance is closer than the last time, if not just return
|
||||
for i in range(len(handleSentinel_spotted)):
|
||||
if handleSentinel_spotted[i]['id'] == closest_node and closest_distance < handleSentinel_spotted[i]['distance']:
|
||||
if handleSentinel_spotted[i]['id'] == closest_node and closest_distance is not None and closest_distance < handleSentinel_spotted[i]['distance']:
|
||||
handleSentinel_spotted[i]['distance'] = closest_distance
|
||||
break
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user