This commit is contained in:
SpudGunMan
2024-12-09 16:10:22 -08:00
parent ac96ca9e2f
commit b385001db2
+7 -2
View File
@@ -17,6 +17,7 @@ restrictedResponse = "🤖only available in a Direct Message📵" # "" for none
cmdHistory = [] # list to hold the last commands
seenNodes = [] # list to hold the last seen nodes
DEBUGpacket = False # Debug print the packet rx
DEBUGhops = False # Debug print hope info and bad hop count packets
def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_number, deviceID, isDM):
global cmdHistory
@@ -943,8 +944,12 @@ def onReceive(packet, interface):
hop_start = packet.get('hopStart', 0)
else:
hop_start = 0
#logger.debug(f"System: Packet HopDebugger: hop_away:{hop_away} hop_limit:{hop_limit} hop_start:{hop_start}")
if DEBUGhops:
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_start == hop_limit:
hop = "Direct"
hop_count = 0