mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Fix pisugar2.py to check for "new model" and correctly display charging voice.
This commit is contained in:
@ -74,7 +74,7 @@ class PiSugar(plugins.Plugin):
|
|||||||
logging.info("BATT GET VALUE IS : " + str(capacity))
|
logging.info("BATT GET VALUE IS : " + str(capacity))
|
||||||
# new model use battery_power_plugged & battery_allow_charging to detect real charging status
|
# new model use battery_power_plugged & battery_allow_charging to detect real charging status
|
||||||
if self.is_new_model:
|
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.set("chg", "CHG")
|
||||||
ui.update(force=True, new_data={"status": "Power!! I can feel it!"})
|
ui.update(force=True, new_data={"status": "Power!! I can feel it!"})
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user