Added outbound announce frequency per client display to rnstatus

This commit is contained in:
Mark Qvist
2026-05-06 19:06:16 +02:00
parent 69db87cc24
commit 9c166936ad
+3 -1
View File
@@ -552,13 +552,15 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
if astats and "incoming_announce_frequency" in ifstat and ifstat["incoming_announce_frequency"] != None:
oaf = RNS.prettyfrequency(ifstat["outgoing_announce_frequency"])+""
iaf = RNS.prettyfrequency(ifstat["incoming_announce_frequency"])+""
if clients != None and clients > 0: pc_str = f"{RNS.prettyfrequency(ifstat["outgoing_announce_frequency"]/clients)}/c"
else: pc_str = ""
strdiff = len(oaf)-len(iaf)
if strdiff > 0: iaf += " "*strdiff
elif strdiff < 0: oaf += " "*-strdiff
strdiff = len(rxb_str)-len(oaf)
if strdiff > 0: oaf += " "*strdiff
elif strdiff < 0: txb_str += " "*-strdiff; rxb_str += " "*-strdiff
print(f" Announces : {oaf}")
print(f" Announces : {oaf} {pc_str}")
print(f" {iaf} {art_str}")
rxstat = rxb_str