Update system.py

This commit is contained in:
SpudGunMan
2025-05-21 16:20:54 -07:00
parent feb9a1d9b3
commit 60bb68c6b5
+2 -3
View File
@@ -982,9 +982,8 @@ def consumeMetadata(packet, rxNode=0):
# if altitude is over 2000 send a log and message for high-flying nodes
if position_data.get('altitude', 0) > 2000 and highfly_enabled:
logger.warning(f"System: High Altitude {position_data['altitude']}m on Device: {rxNode} NodeID: {nodeID}")
if antiSpam and nodeID != globals().get(f'myNodeNum{rxNode}'):
send_message(f"High Altitude {position_data['altitude']}m on Device: {rxNode} NodeID: {nodeID}", secure_channel, 0, rxNode)
time.sleep(responseDelay)
send_message(f"High Altitude {position_data['altitude']}m on Device: {rxNode} NodeID: {nodeID}", secure_channel, 0, rxNode)
time.sleep(responseDelay)
# Keep the positionMetadata dictionary at a maximum size of 20
if len(positionMetadata) > 20: