mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-10-23 06:12:19 +00:00
Enhance configuration and command files to support new distance metrics in message responses. Updated Keywords section to include {path_distance} and {firstlast_distance} placeholders. Refactored distance calculation methods into utils and improved path command logic for better accuracy in distance reporting. Added detailed logging for packet hash calculations and message handling in multitest command.
This commit is contained in:
1 parent
0ec60e48c2
commit
6c660dc14c
8 files changed
+507
-65
No files matched your search
@@ -479,7 +479,13 @@ class MessageHandler:
|
||||
decoded_packet = self.decode_meshcore_packet(raw_hex, extracted_payload)
|
||||
if decoded_packet:
|
||||
# Calculate packet hash for this packet (useful for tracking same message via different paths)
|
||||
# Ensure we use the numeric payload_type value (not enum or string)
|
||||
payload_type_value = decoded_packet.get('payload_type', None)
|
||||
if payload_type_value is not None:
|
||||
# Handle enum.value if it's an enum
|
||||
if hasattr(payload_type_value, 'value'):
|
||||
payload_type_value = payload_type_value.value
|
||||
payload_type_value = int(payload_type_value)
|
||||
packet_hash = calculate_packet_hash(raw_hex, payload_type_value)
|
||||
|
||||
routing_info = {
|
||||
|
||||
Reference in new issue
Block a user