From 89cfe0a805b210ce64139efcf67c5bf2d98c3c8f Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 28 Apr 2023 09:43:16 +0200 Subject: [PATCH] Added self.unique_identifier to the battery class Used to identify a BMS when multiple BMS are connected planned for future use --- CHANGELOG.md | 3 ++- etc/dbus-serialbattery/battery.py | 3 +++ etc/dbus-serialbattery/utils.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f34ef39..00cdc556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ * Added: Balancing status for JKBMS by @mr-manuel * Added: Balancing switch status for JKBMS by @mr-manuel -* Added: Balancing switch status to the GUI -> SerialBattery -> IO by @mr-manuel +* Added: Balancing switch status to the GUI -> SerialBattery -> IO +* Added: `self.unique_identifier` to the battery class. Used to identify a BMS when multiple BMS are connected - planned for future use by @mr-manuel * Added: Charge Mode display by @mr-manuel * Added: Choose how battery temperature is assembled (mean temp 1 & 2, only temp 1 or only temp 2) by @mr-manuel * Added: Config file by @ppuetsch diff --git a/etc/dbus-serialbattery/battery.py b/etc/dbus-serialbattery/battery.py index 1578a8c9..665fb37d 100644 --- a/etc/dbus-serialbattery/battery.py +++ b/etc/dbus-serialbattery/battery.py @@ -99,6 +99,9 @@ def __init__(self, port, baud, address): self.max_battery_charge_current = None self.max_battery_discharge_current = None + # used to identify a BMS when multiple BMS are connected - planned for future use + self.unique_identifier = None + @abstractmethod def test_connection(self) -> bool: """ diff --git a/etc/dbus-serialbattery/utils.py b/etc/dbus-serialbattery/utils.py index ca002513..245770c6 100644 --- a/etc/dbus-serialbattery/utils.py +++ b/etc/dbus-serialbattery/utils.py @@ -36,7 +36,7 @@ def _get_list_from_config( # Constants - Need to dynamically get them in future DRIVER_VERSION = "1.0" -DRIVER_SUBVERSION = ".0 (20230427)" +DRIVER_SUBVERSION = ".0 (20230428)" zero_char = chr(48) degree_sign = "\N{DEGREE SIGN}"