mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-07 17:32:52 +02:00
bugfix
issue mentioned https://github.com/SpudGunMan/meshing-around/issues/31
This commit is contained in:
@@ -225,9 +225,13 @@ def onReceive(packet, interface):
|
||||
hop_away = 0
|
||||
if packet.get('hopLimit'):
|
||||
hop_limit = packet.get('hopLimit', 0)
|
||||
else:
|
||||
hop_limit = 0
|
||||
|
||||
if packet.get('hopStart'):
|
||||
hop_start = packet.get('hopStart', 0)
|
||||
else:
|
||||
hop_start = 0
|
||||
|
||||
if hop_start == hop_limit:
|
||||
hop = "Direct"
|
||||
|
||||
+9
-3
@@ -185,9 +185,15 @@ def get_node_list(nodeInt=1):
|
||||
logger.warning(f"System: No nodes found")
|
||||
return ERROR_FETCHING_DATA
|
||||
|
||||
node_list1.sort(key=lambda x: x[1], reverse=True)
|
||||
#print (f"Node List: {node_list1[:5]}\n")
|
||||
node_list2.sort(key=lambda x: x[1], reverse=True)
|
||||
try:
|
||||
#print (f"Node List: {node_list1[:5]}\n")
|
||||
node_list1.sort(key=lambda x: x[1], reverse=True)
|
||||
#print (f"Node List: {node_list1[:5]}\n")
|
||||
node_list2.sort(key=lambda x: x[1], reverse=True)
|
||||
except Exception as e:
|
||||
logger.error(f"System: Error sorting node list: {e}")
|
||||
print (f"Node List1: {node_list1[:5]}\n")
|
||||
print (f"Node List2: {node_list2[:5]}\n")
|
||||
|
||||
# make a nice list for the user
|
||||
for x in node_list1[:SITREP_NODE_COUNT]:
|
||||
|
||||
Reference in New Issue
Block a user