Fix lastChargingOnTime

Signed-off-by: Martin Kolací <martin.kolaci@lmc.eu>
This commit is contained in:
Martin Kolací
2020-12-28 20:46:43 +01:00
parent 1fd2bb0089
commit 612bc034b1
3 changed files with 8 additions and 2 deletions

View File

@@ -185,6 +185,9 @@ void CarHyundaiIoniq::parseRowMerged() {
tempByte = liveData->hexToDecFromResponse(22, 24, 1, false);
liveData->params.chargingOn = (bitRead(tempByte, 5) == 1 || bitRead(tempByte, 6) == 1); // bit 5 = AC; bit 6 = DC
if(liveData->params.chargingOn) {
liveData->params.lastChargingOnTime = liveData->params.currentTime;
}
// 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);