Added RNode battery info to connectivity dialog

This commit is contained in:
Mark Qvist 2024-10-01 15:46:19 +02:00
parent 17180283e2
commit 54cac42aed

View File

@ -370,7 +370,13 @@ class SidebandService():
else: else:
rs = "Interface Down" rs = "Interface Down"
stat += "[b]RNode[/b]\n{rs}\n\n".format(rs=rs) bs = ""
bat_state = self.sideband.interface_rnode.get_battery_state_string()
bat_percent = self.sideband.interface_rnode.get_battery_percent()
if bat_state != "unknown":
bs = f"\nBattery at {bat_percent}%"
stat += f"[b]RNode[/b]\n{rs}{bs}\n\n"
if self.sideband.interface_modem != None: if self.sideband.interface_modem != None:
if self.sideband.interface_modem.online: if self.sideband.interface_modem.online: