mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-12-27 20:48:39 +01:00
Cleanup
This commit is contained in:
parent
15600d5172
commit
19cae41062
@ -64,9 +64,9 @@ class PropagationNodeDetector():
|
|||||||
# age = 0
|
# age = 0
|
||||||
pass
|
pass
|
||||||
|
|
||||||
link_stats = {"rssi": self.reticulum.get_packet_rssi(announce_packet_hash),
|
link_stats = {"rssi": self.owner_app.sideband.reticulum.get_packet_rssi(announce_packet_hash),
|
||||||
"snr": self.reticulum.get_packet_snr(announce_packet_hash),
|
"snr": self.owner_app.sideband.reticulum.get_packet_snr(announce_packet_hash),
|
||||||
"q": self.reticulum.get_packet_q(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")
|
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)
|
self.owner.log_announce(destination_hash, app_data, dest_type=PropagationNodeDetector.aspect_filter, link_stats=link_stats)
|
||||||
|
@ -100,15 +100,15 @@ class Announces():
|
|||||||
link_extras_full = ""
|
link_extras_full = ""
|
||||||
if "extras" in announce and announce["extras"] != None:
|
if "extras" in announce and announce["extras"] != None:
|
||||||
extras = announce["extras"]
|
extras = announce["extras"]
|
||||||
RNS.log("Announce has extras: "+str(announce["extras"]))
|
|
||||||
if "link_stats" in extras:
|
if "link_stats" in extras:
|
||||||
link_stats = extras["link_stats"]
|
link_stats = extras["link_stats"]
|
||||||
if "rssi" in link_stats and "snr" in link_stats and "q" in link_stats:
|
if "rssi" in link_stats and "snr" in link_stats and "q" in link_stats:
|
||||||
a_rssi = link_stats["rssi"]
|
a_rssi = link_stats["rssi"]
|
||||||
a_snr = link_stats["snr"]
|
a_snr = link_stats["snr"]
|
||||||
a_q = link_stats["q"]
|
a_q = link_stats["q"]
|
||||||
link_extras_str = f" ([b]RSSI[/b] {a_rssi} [b]SNR[/b] {a_snr})"
|
if a_rssi != None and a_snr != None and a_q != None:
|
||||||
link_extras_full = f"\n[b]Link Quality[/b] {a_q}%[/b]\n[b]RSSI[/b] {a_rssi}\n[b]SNR[/b] {a_snr}"
|
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}"
|
||||||
|
|
||||||
sig_icon = multilingual_markup(sig_icon_for_q(a_q).encode("utf-8")).decode("utf-8")
|
sig_icon = multilingual_markup(sig_icon_for_q(a_q).encode("utf-8")).decode("utf-8")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user