From 740fd7d914d7cbf31e99d5335d8df56f5a5476b5 Mon Sep 17 00:00:00 2001 From: GPlay97 Date: Tue, 22 Oct 2019 18:46:06 +0200 Subject: [PATCH] implement CEC + CED --- cars/IONIQ_BEV.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cars/IONIQ_BEV.py b/cars/IONIQ_BEV.py index 7809273..8fdc66b 100644 --- a/cars/IONIQ_BEV.py +++ b/cars/IONIQ_BEV.py @@ -50,6 +50,12 @@ def getData(self): 'rapidChargePort': 1 if chargingBits != None and \ chargingBits & 0x40 == 0x40 else 0, + 'cumulativeEnergyCharged': int.from_bytes(raw[2101][0x7EC25][6:7] + raw[2101][0x7EC26][0:3], byteorder='big', signed=False) / 10.0 \ + if 0x7EC25 in raw[2101] and 0x7EC26 in raw[2101] else None, + + 'cumulativeEnergyDischarged': int.from_bytes(raw[2101][0x7EC26][3:7], byteorder='big', signed=False) / 10.0 \ + if 0x7EC26 in raw[2101] else None, + 'dcBatteryCurrent': dcBatteryCurrent, 'dcBatteryPower': dcBatteryCurrent * dcBatteryVoltage / 1000.0 \