Debug time remaining

This commit is contained in:
Carsten Schmiemann 2023-06-12 00:43:32 +02:00
parent f1a9eb4288
commit 815e0344bd
1 changed files with 6 additions and 4 deletions

View File

@ -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