mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-05 09:21:23 +02:00
Update mesh_bot.py
This commit is contained in:
+2
-2
@@ -1575,8 +1575,8 @@ def onReceive(packet, interface):
|
||||
|
||||
# trim the history list if it exceeds max_history
|
||||
if len(msg_history) >= MAX_MSG_HISTORY:
|
||||
# Remove oldest entries by cutting in half
|
||||
msg_history = msg_history[len(msg_history)//2:]
|
||||
# Always keep only the most recent MAX_MSG_HISTORY entries
|
||||
msg_history = msg_history[-MAX_MSG_HISTORY:]
|
||||
|
||||
# add the message to the history list
|
||||
msg_history.append((get_name_from_number(message_from_id, 'long', rxNode), message_string, channel_number, timestamp, rxNode))
|
||||
|
||||
Reference in New Issue
Block a user