From e542eb596535186fa95f3bafdad218155528c0e7 Mon Sep 17 00:00:00 2001
From: Sebastian Krzyszkowiak <dos@dosowisko.net>
Date: Fri, 20 Oct 2023 22:27:56 +0200
Subject: [PATCH] py,st3m: overlays: Initialize battery percentage to 100 as an
 int

Otherwise it gets displayed as "100.0", and because value update is
guarded with equality check it doesn't fix itself until the percentage
gets down to 99%.
---
 python_payload/st3m/ui/elements/overlays.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python_payload/st3m/ui/elements/overlays.py b/python_payload/st3m/ui/elements/overlays.py
index 7e246d5ea5..2fc7252cd1 100644
--- a/python_payload/st3m/ui/elements/overlays.py
+++ b/python_payload/st3m/ui/elements/overlays.py
@@ -560,7 +560,7 @@ class BatteryIcon(Icon):
 
     def __init__(self) -> None:
         super().__init__()
-        self._percent = 100.0
+        self._percent = 100
 
     def visible(self) -> bool:
         return power.has_battery
-- 
GitLab