This commit is contained in:
Mark Qvist 2024-12-11 21:56:41 +01:00
parent 15600d5172
commit 19cae41062
2 changed files with 6 additions and 6 deletions

View File

@ -64,9 +64,9 @@ class PropagationNodeDetector():
# age = 0
pass
link_stats = {"rssi": self.reticulum.get_packet_rssi(announce_packet_hash),
"snr": self.reticulum.get_packet_snr(announce_packet_hash),
"q": self.reticulum.get_packet_q(announce_packet_hash)}
link_stats = {"rssi": self.owner_app.sideband.reticulum.get_packet_rssi(announce_packet_hash),
"snr": self.owner_app.sideband.reticulum.get_packet_snr(announce_packet_hash),
"q": self.owner_app.sideband.reticulum.get_packet_q(announce_packet_hash)}
RNS.log("Detected active propagation node "+RNS.prettyhexrep(destination_hash)+" emission "+str(age)+" seconds ago, "+str(hops)+" hops away")
self.owner.log_announce(destination_hash, app_data, dest_type=PropagationNodeDetector.aspect_filter, link_stats=link_stats)

View File

@ -100,13 +100,13 @@ class Announces():
link_extras_full = ""
if "extras" in announce and announce["extras"] != None:
extras = announce["extras"]
RNS.log("Announce has extras: "+str(announce["extras"]))
if "link_stats" in extras:
link_stats = extras["link_stats"]
if "rssi" in link_stats and "snr" in link_stats and "q" in link_stats:
a_rssi = link_stats["rssi"]
a_snr = link_stats["snr"]
a_q = link_stats["q"]
if a_rssi != None and a_snr != None and a_q != None:
link_extras_str = f" ([b]RSSI[/b] {a_rssi} [b]SNR[/b] {a_snr})"
link_extras_full = f"\n[b]Link Quality[/b] {a_q}%[/b]\n[b]RSSI[/b] {a_rssi}\n[b]SNR[/b] {a_snr}"