From 55ba9e0ee89c488ea077a9a09e857b817aeb9ae2 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 15 Dec 2024 00:22:14 +0100 Subject: [PATCH] Fix pisugar2.py to check for "new model" and correctly display charging voice. --- pwnagotchi/plugins/default/pisugar2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/pisugar2.py b/pwnagotchi/plugins/default/pisugar2.py index 81534188..695ab0cc 100644 --- a/pwnagotchi/plugins/default/pisugar2.py +++ b/pwnagotchi/plugins/default/pisugar2.py @@ -74,7 +74,7 @@ class PiSugar(plugins.Plugin): logging.info("BATT GET VALUE IS : " + str(capacity)) # new model use battery_power_plugged & battery_allow_charging to detect real charging status if self.is_new_model: - if self.ps.get_battery_power_plugged().value and self.ps.get_battery_allow_charging().value: + if self.ps.get_battery_power_plugged() and self.ps.get_battery_allow_charging(): ui.set("chg", "CHG") ui.update(force=True, new_data={"status": "Power!! I can feel it!"}) else: