Skip to content

Commit

Permalink
Merge pull request #895 from cflenker/chfl/float_transition
Browse files Browse the repository at this point in the history
Condition for transition to float
  • Loading branch information
mr-manuel authored Dec 23, 2023
2 parents 6093426 + 15aa22e commit 06dff6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ def manage_charge_voltage_linear(self) -> None:
pass

else:
if voltageDiff > utils.CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART:
self.max_voltage_start_time = current_time

tDiff = current_time - self.max_voltage_start_time
# keep max voltage for MAX_VOLTAGE_TIME_SEC more seconds
if utils.MAX_VOLTAGE_TIME_SEC < tDiff:
Expand Down
2 changes: 2 additions & 0 deletions etc/dbus-serialbattery/config.default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ CVCM_ENABLE = True
; -- CVL reset based on cell voltage diff (linear mode)
; Specify cell voltage diff where CVL limit is kept until diff is equal or lower
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL = 0.010
; Specify cell voltage diff where MAX_VOLTAGE_TIME_SEC restarts if diff is bigger
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART = 0.013
; Specify cell voltage diff where CVL limit is reset to max voltage, if value get above
; the cells are considered as imbalanced, if the cell diff exceeds 5% of the nominal cell voltage
; e.g. 3.2 V * 5 / 100 = 0.160 V
Expand Down
3 changes: 3 additions & 0 deletions etc/dbus-serialbattery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ def _get_list_from_config(
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL = float(
config["DEFAULT"]["CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL"]
)
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART = float(
config["DEFAULT"]["CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART"]
)
CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT = float(
config["DEFAULT"]["CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT"]
)
Expand Down

0 comments on commit 06dff6d

Please sign in to comment.