diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index be49a44..1176db1 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -1328,7 +1328,7 @@ class Reticulum: if hasattr(interface, "r_battery_state"): if interface.r_battery_state != 0x00: - ifstats["battery_state"] = interface.r_battery_state + ifstats["battery_state"] = interface.get_battery_state_string() if hasattr(interface, "r_battery_percent"): ifstats["battery_percent"] = interface.r_battery_percent diff --git a/RNS/Utilities/rnstatus.py b/RNS/Utilities/rnstatus.py index 8a8d10b..d6569ec 100644 --- a/RNS/Utilities/rnstatus.py +++ b/RNS/Utilities/rnstatus.py @@ -295,7 +295,8 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json= if "battery_percent" in ifstat and ifstat["battery_percent"] != None: try: bpi = int(ifstat["battery_percent"]) - print(" Battery : {bp}%".format(bp=bpi)) + bss = ifstat["battery_state"] + print(f" Battery : {bpi}% ({bss})") except: pass