fix hop doh hops!

This commit is contained in:
SpudGunMan
2025-11-12 23:01:19 -08:00
parent 2a6f76ab5b
commit 12aeaef250
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -287,9 +287,9 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann
#flood
msg += " [F]"
if (float(snr) != 0 or float(rssi) != 0) and "Hops" not in hop:
if (float(snr) != 0 or float(rssi) != 0) and "Hop" not in hop:
msg += f"\nSNR:{snr} RSSI:{rssi}"
elif "Hops" in hop:
elif "Hop" in hop:
# janky, remove the words Gateway or MQTT if present
hop = hop.replace("Gateway", "").replace("Direct", "").replace("MQTT", "").strip()
msg += f"\n{hop} "
+2 -4
View File
@@ -104,14 +104,12 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann
#flood
msg += " [F]"
if (float(snr) != 0 or float(rssi) != 0) and "Hops" not in hop:
if (float(snr) != 0 or float(rssi) != 0) and "Hop" not in hop:
msg += f"\nSNR:{snr} RSSI:{rssi}"
elif "Hops" in hop:
elif "Hop" in hop:
# janky, remove the words Gateway or MQTT if present
hop = hop.replace("Gateway", "").replace("Direct", "").replace("MQTT", "").strip()
msg += f"\n{hop} "
else:
msg += "\nflood route"
if "@" in message:
msg = msg + " @" + message.split("@")[1]