Skip to content

Commit 158765a

Browse files
committed
Added noise floor stat output to rnodeconf
1 parent 81aa9ac commit 158765a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

RNS/Reticulum.py

+3
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,9 @@ def get_interface_stats(self):
939939
if hasattr(interface, "r_channel_load_long"):
940940
ifstats["channel_load_long"] = interface.r_channel_load_long
941941

942+
if hasattr(interface, "r_noise_floor"):
943+
ifstats["noise_floor"] = interface.r_noise_floor
944+
942945
if hasattr(interface, "r_battery_state"):
943946
if interface.r_battery_state != 0x00:
944947
ifstats["battery_state"] = interface.get_battery_state_string()

RNS/Utilities/rnstatus.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
316316
if "bitrate" in ifstat and ifstat["bitrate"] != None:
317317
print(" Rate : {ss}".format(ss=speed_str(ifstat["bitrate"])))
318318

319+
if "noise_floor" in ifstat:
320+
print(" Noise Fl. : {nfl} dBm".format(nfl=str(ifstat["noise_floor"])))
321+
319322
if "battery_percent" in ifstat and ifstat["battery_percent"] != None:
320323
try:
321324
bpi = int(ifstat["battery_percent"])
@@ -328,8 +331,8 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
328331
print(" Airtime : {ats}% (15s), {atl}% (1h)".format(ats=str(ifstat["airtime_short"]),atl=str(ifstat["airtime_long"])))
329332

330333
if "channel_load_short" in ifstat and "channel_load_long" in ifstat:
331-
print(" Ch.Load : {ats}% (15s), {atl}% (1h)".format(ats=str(ifstat["channel_load_short"]),atl=str(ifstat["channel_load_long"])))
332-
334+
print(" Ch. Load : {ats}% (15s), {atl}% (1h)".format(ats=str(ifstat["channel_load_short"]),atl=str(ifstat["channel_load_long"])))
335+
333336
if "peers" in ifstat and ifstat["peers"] != None:
334337
print(" Peers : {np} reachable".format(np=ifstat["peers"]))
335338

0 commit comments

Comments
 (0)