diff --git a/config.template b/config.template index cf3e09e..1da8971 100644 --- a/config.template +++ b/config.template @@ -293,5 +293,7 @@ MESSAGE_CHUNK_SIZE = 160 wantAck = False # Max limit buffer for radio testing. 233 is hard limit 2.5+ firmware maxBuffer = 200 +#Enable Extra logging of Hop count data +enableHopLogs = False diff --git a/mesh_bot.py b/mesh_bot.py index fd05619..f424b61 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -20,7 +20,6 @@ restrictedResponse = "🤖only available in a Direct Message📵" # "" for none # Global Variables DEBUGpacket = False # Debug print the packet rx -DEBUGhops = False # Debug print hop info and bad hop count packets def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_number, deviceID, isDM): global cmdHistory @@ -1194,7 +1193,7 @@ def onReceive(packet, interface): else: hop_start = 0 - if DEBUGhops: + 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") diff --git a/modules/settings.py b/modules/settings.py index eacb4c7..3583da4 100644 --- a/modules/settings.py +++ b/modules/settings.py @@ -353,6 +353,7 @@ try: MESSAGE_CHUNK_SIZE = config['messagingSettings'].getint('MESSAGE_CHUNK_SIZE', 160) # default 160 wantAck = config['messagingSettings'].getboolean('wantAck', False) # default False maxBuffer = config['messagingSettings'].getint('maxBuffer', 220) # default 220 + enableHopLogs = config['messagingSettings'].getboolean('enableHopLogs', False) # default False except KeyError as e: print(f"System: Error reading config file: {e}")