From 54cac42aed5f09a782b62406b7450706431a9680 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 1 Oct 2024 15:46:19 +0200 Subject: [PATCH] Added RNode battery info to connectivity dialog --- sbapp/services/sidebandservice.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sbapp/services/sidebandservice.py b/sbapp/services/sidebandservice.py index b263e65..e718a6f 100644 --- a/sbapp/services/sidebandservice.py +++ b/sbapp/services/sidebandservice.py @@ -370,7 +370,13 @@ class SidebandService(): else: 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.online: