Skip to content

Commit

Permalink
Smaller fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Sep 2, 2023
1 parent 0131221 commit 47cb3ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def manage_charge_current(self) -> None:
if self.max_battery_charge_current != tmp:
if tmp in charge_limits:
# do not add string, if global limitation is applied
if charge_limits["tmp"] != "Max Battery Charge Current":
if charge_limits[tmp] != "Max Battery Charge Current":
charge_limits.update(
{tmp: charge_limits[tmp] + ", Cell Voltage"}
)
Expand All @@ -590,7 +590,7 @@ def manage_charge_current(self) -> None:
if self.max_battery_charge_current != tmp:
if tmp in charge_limits:
# do not add string, if global limitation is applied
if charge_limits["tmp"] != "Max Battery Charge Current":
if charge_limits[tmp] != "Max Battery Charge Current":
charge_limits.update({tmp: charge_limits[tmp] + ", Temp"})
else:
pass
Expand All @@ -602,7 +602,7 @@ def manage_charge_current(self) -> None:
if self.max_battery_charge_current != tmp:
if tmp in charge_limits:
# do not add string, if global limitation is applied
if charge_limits["tmp"] != "Max Battery Charge Current":
if charge_limits[tmp] != "Max Battery Charge Current":
charge_limits.update({tmp: charge_limits[tmp] + ", SoC"})
else:
pass
Expand Down Expand Up @@ -659,7 +659,7 @@ def manage_charge_current(self) -> None:
if self.max_battery_discharge_current != tmp:
if tmp in discharge_limits:
# do not add string, if global limitation is applied
if discharge_limits["tmp"] != "Max Battery Discharge Current":
if discharge_limits[tmp] != "Max Battery Discharge Current":
discharge_limits.update(
{tmp: discharge_limits[tmp] + ", Cell Voltage"}
)
Expand All @@ -673,7 +673,7 @@ def manage_charge_current(self) -> None:
if self.max_battery_discharge_current != tmp:
if tmp in discharge_limits:
# do not add string, if global limitation is applied
if discharge_limits["tmp"] != "Max Battery Discharge Current":
if discharge_limits[tmp] != "Max Battery Discharge Current":
discharge_limits.update({tmp: discharge_limits[tmp] + ", Temp"})
else:
pass
Expand All @@ -685,7 +685,7 @@ def manage_charge_current(self) -> None:
if self.max_battery_discharge_current != tmp:
if tmp in discharge_limits:
# do not add string, if global limitation is applied
if discharge_limits["tmp"] != "Max Battery Discharge Current":
if discharge_limits[tmp] != "Max Battery Discharge Current":
discharge_limits.update({tmp: discharge_limits[tmp] + ", SoC"})
else:
pass
Expand Down
4 changes: 2 additions & 2 deletions etc/dbus-serialbattery/config.default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ LINEAR_RECALCULATION_ON_PERC_CHANGE = 5
; it switches back to max voltage.
; Example: The battery reached max voltage of 55.2V and hold it for 900 seconds, the the CVL is switched to
; float voltage of 53.6V to don't stress the batteries. Allow max voltage of 55.2V again, if SoC is
; once below 90%
; once below 80%
; OR
; The battery reached max voltage of 55.2V and the max cell difference is 0.010V, then switch to float
; voltage of 53.6V after 300 additional seconds to don't stress the batteries. Allow max voltage of
; 55.2V again if max cell difference is above 0.080V or SoC below 90%.
; 55.2V again if max cell difference is above 0.080V or SoC below 80%.
; Charge voltage control management enable (True/False).
CVCM_ENABLE = True

Expand Down
2 changes: 1 addition & 1 deletion etc/dbus-serialbattery/dbushelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def publish_dbus(self):
)

# Update TimeToGo item
if utils.TIME_TO_GO_ENABLE:
if utils.TIME_TO_GO_ENABLE and crntPrctPerSec is not None:
# Update TimeToGo item, has to be a positive int since it's used from dbus-systemcalc-py
time_to_go = self.battery.get_timeToSoc(
# switch value depending on charging/discharging
Expand Down
2 changes: 1 addition & 1 deletion etc/dbus-serialbattery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _get_list_from_config(


# Constants - Need to dynamically get them in future
DRIVER_VERSION = "1.0.20230827dev"
DRIVER_VERSION = "1.0.20230902dev"
zero_char = chr(48)
degree_sign = "\N{DEGREE SIGN}"

Expand Down

0 comments on commit 47cb3ba

Please sign in to comment.