diff --git a/etc/dbus-serialbattery/battery.py b/etc/dbus-serialbattery/battery.py index ae3dd2fc..af2f56ae 100644 --- a/etc/dbus-serialbattery/battery.py +++ b/etc/dbus-serialbattery/battery.py @@ -287,7 +287,7 @@ def manage_charge_voltage_linear(self) -> None: current_time = int(time()) # meassurment and variation tolerance in volts - measurementToleranceVariation = 0.025 + measurementToleranceVariation = 0.5 try: # calculate battery sum and check for cell overvoltage @@ -463,12 +463,13 @@ def manage_charge_voltage_linear(self) -> None: bulk_days_ago = round( (current_time - self.bulk_last_reached) / 60 / 60 / 24, 2 ) + bulk_in_days = round(utils.BULK_AFTER_DAYS - bulk_days_ago, 2) self.charge_mode_debug += "\nbulk_last_reached: " + str( "Never" if self.bulk_last_reached == 0 else str(bulk_days_ago) + " days ago - next in " - + str(utils.BULK_AFTER_DAYS - bulk_days_ago) + + str(bulk_in_days) + "days" ) # """ diff --git a/etc/dbus-serialbattery/dbushelper.py b/etc/dbus-serialbattery/dbushelper.py index 1896bff6..a9878dec 100644 --- a/etc/dbus-serialbattery/dbushelper.py +++ b/etc/dbus-serialbattery/dbushelper.py @@ -506,8 +506,8 @@ def publish_dbus(self): self._dbusservice["/Alarms/HighVoltage"] = ( self.battery.protection.voltage_high if ( - self.bulk_requested is False - and self.bulk_last_reached < int(time()) - (60 * 30) + self.battery.bulk_requested is False + and self.battery.bulk_last_reached < int(time()) - (60 * 30) ) else 0 ) diff --git a/etc/dbus-serialbattery/utils.py b/etc/dbus-serialbattery/utils.py index 744514e4..696d0028 100644 --- a/etc/dbus-serialbattery/utils.py +++ b/etc/dbus-serialbattery/utils.py @@ -38,7 +38,7 @@ def _get_list_from_config( # Constants - Need to dynamically get them in future -DRIVER_VERSION = "1.0.20230704dev" +DRIVER_VERSION = "1.0.20230711dev" zero_char = chr(48) degree_sign = "\N{DEGREE SIGN}"