From 0b9efa7c9c1b1a9738d8f89bff6ce31e79f54c0c Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 12 Jul 2024 15:39:41 +0200 Subject: [PATCH] Fixes #1094 and smaller fixes https://github.com/Louisvdw/dbus-serialbattery/issues/1094 --- CHANGELOG.md | 1 + etc/dbus-serialbattery/bms/jkbms_ble.py | 2 +- etc/dbus-serialbattery/bms/jkbms_pb.py | 21 +++++++++++---------- etc/dbus-serialbattery/dbushelper.py | 4 ++-- etc/dbus-serialbattery/utils.py | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 372ba1a6..ee345538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ ## v1.4.x +* Changed: JKBMS BLE - Fixes wrong max battery voltage https://github.com/Louisvdw/dbus-serialbattery/issues/1094 by @mr-manuel * Changed: JKBMS PB Model fixes by @KoljaWindeler diff --git a/etc/dbus-serialbattery/bms/jkbms_ble.py b/etc/dbus-serialbattery/bms/jkbms_ble.py index eea3d5ba..4a478937 100644 --- a/etc/dbus-serialbattery/bms/jkbms_ble.py +++ b/etc/dbus-serialbattery/bms/jkbms_ble.py @@ -96,7 +96,7 @@ def get_settings(self): self.cell_count = st["cell_count"] self.max_battery_charge_current = st["max_charge_current"] self.max_battery_discharge_current = st["max_discharge_current"] - self.max_battery_voltage = st["cell_ovp"] * self.cell_count + self.max_battery_voltage = utils.MAX_CELL_VOLTAGE * self.cell_count self.min_battery_voltage = st["cell_uvp"] * self.cell_count # Persist initial OVP and OPVR settings of JK BMS BLE diff --git a/etc/dbus-serialbattery/bms/jkbms_pb.py b/etc/dbus-serialbattery/bms/jkbms_pb.py index 83e48272..034938e3 100644 --- a/etc/dbus-serialbattery/bms/jkbms_pb.py +++ b/etc/dbus-serialbattery/bms/jkbms_pb.py @@ -196,16 +196,17 @@ def read_status_data(self): temp3 = unpack_from("= 60 * 20 and not utils.BLOCK_ON_DISCONNECT: loop.quit() - # This is to mannage CVCL + # This is to manage CVCL self.battery.manage_charge_voltage() - # This is to mannage CCL\DCL + # This is to manage CCL\DCL self.battery.manage_charge_current() # Manage battery state, if not set to error (10) diff --git a/etc/dbus-serialbattery/utils.py b/etc/dbus-serialbattery/utils.py index e48ca062..6057af56 100644 --- a/etc/dbus-serialbattery/utils.py +++ b/etc/dbus-serialbattery/utils.py @@ -37,7 +37,7 @@ def _get_list_from_config( # Constants -DRIVER_VERSION = "1.3.20240710dev" +DRIVER_VERSION = "1.4.20240712dev" zero_char = chr(48) degree_sign = "\N{DEGREE SIGN}"