mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-18 00:55:58 +02:00
Update mesh-bot.py
This commit is contained in:
+3
-1
@@ -111,12 +111,14 @@ def onReceive(packet, interface):
|
||||
# check if the packet has a hop count flag use it
|
||||
if packet.get('hopsAway'):
|
||||
hop_away = packet['hopsAway']
|
||||
else:
|
||||
hop_away = 0
|
||||
|
||||
# set hop to Direct if the message was sent directly otherwise set the hop count
|
||||
if hop_start == hop_limit:
|
||||
hop = "Direct"
|
||||
else:
|
||||
if hop_away:
|
||||
if hop_away > 0:
|
||||
hop_count = hop_away
|
||||
print (f"Using hopsAway: {hop_count}")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user