diff --git a/dbus-batrium-native/batrium.py b/dbus-batrium-native/batrium.py index 0565b1f..aa1e063 100644 --- a/dbus-batrium-native/batrium.py +++ b/dbus-batrium-native/batrium.py @@ -114,12 +114,14 @@ class BatriumBattery(can.Listener): logging.debug("Cell number in bypass: %d", self.NumberInBypass) elif msg.arbitration_id == 0x00111800: - self.TimeToEmpty = ((msg.data[5] * 256) + msg.data[4] * 60) - logging.debug("Time to empty: %dmin", self.TimeToEmpty) + self.TimeToEmpty = ((msg.data[5] * 256) + msg.data[4]) * 60 + logging.debug("Time to empty: %dmin", (msg.data[5] * 256) + msg.data[4]) + logging.debug("Time to empty: %dsec", self.TimeToEmpty) elif msg.arbitration_id == 0x00111700: - self.TimeToFull = ((msg.data[5] * 256) + msg.data[4] * 60) - logging.debug("Time to full: %dmin", self.TimeToFull) + self.TimeToFull = ((msg.data[5] * 256) + msg.data[4]) * 60 + logging.debug("Time to full: %dmin", (msg.data[5] * 256) + msg.data[4]) + logging.debug("Time to full: %dsec", self.TimeToFull) elif msg.arbitration_id == 0x00140400: self.maxDischargeCurrent = ((msg.data[3] * 256) + msg.data[2]) * 0.01