From 0c112a9d0fb58b07c8a61e162a2e0c197f5676dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kolac=C3=AD?= Date: Fri, 25 Dec 2020 21:47:46 +0100 Subject: [PATCH] Ioniq - Fix chargingOn flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin KolacĂ­ --- CarHyundaiIoniq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CarHyundaiIoniq.cpp b/CarHyundaiIoniq.cpp index 157075e..b7ab9af 100644 --- a/CarHyundaiIoniq.cpp +++ b/CarHyundaiIoniq.cpp @@ -188,7 +188,7 @@ void CarHyundaiIoniq::parseRowMerged() { //liveData->params.batMinC = liveData->hexToDecFromResponse(34, 36, 1, true); tempByte = liveData->hexToDecFromResponse(104, 106, 1, false); - liveData->params.chargingOn = (bitRead(tempByte, 2) == 1); + liveData->params.chargingOn = (bitRead(tempByte, 2) == 0); // This is more accurate than min/max from BMS. It's required to detect kona/eniro cold gates (min 15C is needed > 43kW charging, min 25C is needed > 58kW charging) liveData->params.batInletC = liveData->hexToDecFromResponse(48, 50, 1, true);