From 8d464178655b2a2a64e55c7031af8a59f50304ed Mon Sep 17 00:00:00 2001 From: Manuel Date: Thu, 20 Apr 2023 13:16:55 +0200 Subject: [PATCH] fix #351 --- etc/dbus-serialbattery/lltjbd.py | 5 ++++- etc/dbus-serialbattery/utils.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/dbus-serialbattery/lltjbd.py b/etc/dbus-serialbattery/lltjbd.py index 9af90c02..2a3d536c 100644 --- a/etc/dbus-serialbattery/lltjbd.py +++ b/etc/dbus-serialbattery/lltjbd.py @@ -156,7 +156,10 @@ def read_gen_data(self): for t in range(self.temp_sensors): temp1 = unpack_from(">H", gen_data, 23 + (2 * t))[0] - self.to_temp(t + 1, kelvin_to_celsius(temp1 / 10)) + if t == 0: + self.to_temp("mos", kelvin_to_celsius(temp1 / 10)) + else: + self.to_temp(t, kelvin_to_celsius(temp1 / 10)) return True diff --git a/etc/dbus-serialbattery/utils.py b/etc/dbus-serialbattery/utils.py index 63c828a4..c469996f 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 (20230415)" +DRIVER_SUBVERSION = ".0 (20230420)" zero_char = chr(48) degree_sign = "\N{DEGREE SIGN}"