Skip to content

Commit

Permalink
publish correct allow_discharge flag to dbus (#409)
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Puetsch <[email protected]>
  • Loading branch information
ppuetsch and Philip Puetsch authored Jan 13, 2023
1 parent 133f310 commit 993b37f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion etc/dbus-serialbattery/dbushelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ def publish_dbus(self):
1 if self.battery.charge_fet and self.battery.control_allow_charge else 0
)
self._dbusservice["/Io/AllowToDischarge"] = (
1 if self.battery.discharge_fet else 0
1
if self.battery.discharge_fet and self.battery.control_allow_discharge
else 0
)
self._dbusservice["/System/NrOfModulesBlockingCharge"] = (
0
Expand Down

0 comments on commit 993b37f

Please sign in to comment.