Skip to content

Commit

Permalink
Merge pull request #813 from ArendsM/dev
Browse files Browse the repository at this point in the history
Trigger JK BLE SOC reset when using Step Mode
  • Loading branch information
mr-manuel committed Sep 21, 2023
2 parents 4c2b89c + 1d2a6c8 commit fea0eff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ def manage_charge_voltage_linear(self) -> None:
# to make it restart persistent
self.bulk_last_reached = current_time
if self.control_voltage:
# check if battery changed from bulk/absoprtion to float
if not self.charge_mode.startswith("Float"):
self.transition_start_time = current_time
self.initial_control_voltage = self.control_voltage
Expand Down Expand Up @@ -550,6 +551,10 @@ def manage_charge_voltage_step(self) -> None:
)

else:
# check if battery changed from bulk/absoprtion to float
if not self.charge_mode.startswith("Float"):
# Assume battery SOC ist 100% at this stage
self.trigger_soc_reset()
self.control_voltage = utils.FLOAT_CELL_VOLTAGE * self.cell_count
self.charge_mode = "Float"
# reset bulk when going into float
Expand Down

0 comments on commit fea0eff

Please sign in to comment.