Skip to content

Commit

Permalink
fix proposal for #733 (#735)
Browse files Browse the repository at this point in the history
* Added: Tollerance to enter float voltage once the timer is triggered
  • Loading branch information
ogurevich committed Jun 27, 2023
1 parent 4bba9fb commit 975b5fc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ def manage_charge_voltage_linear(self) -> None:
voltageSum = 0
penaltySum = 0
tDiff = 0

# meassurment and variation tolerance in volts
measurementToleranceVariation = 0.022
try:
# calculate battery sum
for i in range(self.cell_count):
Expand Down Expand Up @@ -290,7 +291,12 @@ def manage_charge_voltage_linear(self) -> None:
self.max_voltage_start_time = None
# we don't forget to reset max_voltage_start_time wenn we going to bulk(dynamic) mode
# regardless of whether we were in absorption mode or not
if voltageSum < self.max_battery_voltage - utils.VOLTAGE_DROP:
if (
voltageSum
< self.max_battery_voltage
- utils.VOLTAGE_DROP
- measurementToleranceVariation
):
self.max_voltage_start_time = None

# INFO: battery will only switch to Absorption, if all cells are balanced.
Expand Down

0 comments on commit 975b5fc

Please sign in to comment.