mirror of
https://github.com/markqvist/Sideband.git
synced 2024-12-25 07:29:32 -05:00
Cleanup
This commit is contained in:
parent
15600d5172
commit
19cae41062
@ -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)
|
||||
|
@ -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}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user