chargingOn

Signed-off-by: Martin Kolací <martin.kolaci@lmc.eu>
This commit is contained in:
Martin Kolací
2020-12-23 22:37:50 +01:00
parent 1f20e50424
commit ff9e968d69
3 changed files with 5 additions and 0 deletions

View File

@@ -174,6 +174,9 @@ void CarHyundaiIoniq::parseRowMerged() {
//liveData->params.batMaxC = liveData->hexToDecFromResponse(32, 34, 1, true);
//liveData->params.batMinC = liveData->hexToDecFromResponse(34, 36, 1, true);
tempByte = liveData->hexToDecFromResponse(104, 106, 1, false);
liveData->params.chargingOn = (bitRead(tempByte, 2) == 1);
// 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);
if (liveData->params.speedKmh < 10 && liveData->params.batPowerKw >= 1 && liveData->params.socPerc > 0 && liveData->params.socPerc <= 100) {