From fad39ddb415677244cc904f83fbdcd6f5196da2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96ster?= Date: Wed, 7 Feb 2024 21:08:12 +0200 Subject: [PATCH] Fix negative temp handling --- Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp index 40c948cd..0467dd79 100644 --- a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp +++ b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp @@ -186,9 +186,9 @@ void update_values_kiaHyundai_64_battery() { //This function maps all the value stat_batt_power = convertToUnsignedInt16(powerWatt); //Power in watts, Negative = charging batt - temperature_min = convertToUnsignedInt16(temperatureMin * 10); //Increase decimals, 17C -> 17.0C + temperature_min = convertToUnsignedInt16((int8_t)temperatureMin * 10); //Increase decimals, 17C -> 17.0C - temperature_max = convertToUnsignedInt16(temperatureMax * 10); //Increase decimals, 18C -> 18.0C + temperature_max = convertToUnsignedInt16((int8_t)temperatureMax * 10); //Increase decimals, 18C -> 18.0C cell_max_voltage = CellVoltMax_mV;