Skip to content

Commit

Permalink
Duration of transition to float depends on number of cells
Browse files Browse the repository at this point in the history
  • Loading branch information
ogurevich committed Jun 16, 2023
1 parent cac8bfb commit be2a4d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def manage_charge_voltage_linear(self) -> None:
elif self.charge_mode.startswith("Float Transition"):
elapsed_time = int(time()) - self.transition_start_time
# Duration in seconds for smooth voltage drop from absorption to float
FLOAT_MODE_TRANSITION_DURATION = 180
# depending on the number of cells
FLOAT_MODE_TRANSITION_DURATION = self.cell_count * 12
t = min(1, elapsed_time / FLOAT_MODE_TRANSITION_DURATION)
self.control_voltage = (
1 - t
Expand Down

0 comments on commit be2a4d5

Please sign in to comment.