Skip to content

Commit

Permalink
Fixes #891
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Dec 17, 2023
1 parent b393c58 commit 8813763
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions etc/dbus-serialbattery/bms/lltjbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ def get_settings(self):
self.cycle_capacity = float(unpack_from(">H", cycle_cap)[0])
charge_over_current = self.read_serial_data_llt(readCmd(REG_CHGOC))
if charge_over_current:
self.max_battery_charge_current = float(
unpack_from(">h", charge_over_current)[0] / 100.0
self.max_battery_charge_current = abs(
float(unpack_from(">h", charge_over_current)[0] / 100.0)
)
discharge_over_current = self.read_serial_data_llt(readCmd(REG_DSGOC))
if discharge_over_current:
self.max_battery_discharge_current = float(
unpack_from(">h", discharge_over_current)[0] / -100.0
self.max_battery_discharge_current = abs(
float(unpack_from(">h", discharge_over_current)[0] / -100.0)
)
func_config = self.read_serial_data_llt(readCmd(REG_FUNC_CONFIG))
if func_config:
Expand Down

0 comments on commit 8813763

Please sign in to comment.