This commit is contained in:
SpudGunMan
2025-08-18 18:54:02 -07:00
parent df6a1cfb66
commit 4c7fe55b43
2 changed files with 16 additions and 2 deletions
+9 -2
View File
@@ -1163,6 +1163,11 @@ def onReceive(packet, interface):
message_bytes = packet['decoded']['payload']
message_string = message_bytes.decode('utf-8')
via_mqtt = packet['decoded'].get('viaMqtt', False)
rx_time = packet['decoded'].get('rxTime', time.time())
# ignore packets received during soft startup
logger.warning(f"System: Soft Startup: Ignoring packet from {message_from_id} with time {rx_time}")
return
# check if the packet is from us
if message_from_id in [myNodeNum1, myNodeNum2, myNodeNum3, myNodeNum4, myNodeNum5, myNodeNum6, myNodeNum7, myNodeNum8, myNodeNum9]:
@@ -1202,8 +1207,10 @@ def onReceive(packet, interface):
if enableHopLogs:
logger.debug(f"System: Packet HopDebugger: hop_away:{hop_away} hop_limit:{hop_limit} hop_start:{hop_start}")
if hop_away == 0 and hop_limit == 0 and hop_start == 0:
logger.debug(f"System: Packet HopDebugger: No hop count found in PACKET {packet} END PACKET")
if hop_away == 0 and hop_limit == 0 and hop_start == 0:
hop = "Last Hop"
hop_count = 0
if hop_start == hop_limit:
hop = "Direct"
+7
View File
@@ -284,6 +284,13 @@ def onReceive(packet, interface):
else:
hop_start = 0
if enableHopLogs:
logger.debug(f"System: Packet HopDebugger: hop_away:{hop_away} hop_limit:{hop_limit} hop_start:{hop_start}")
if hop_away == 0 and hop_limit == 0 and hop_start == 0:
hop = "Last Hop"
hop_count = 0
if hop_start == hop_limit:
hop = "Direct"
hop_count = 0