Skip to content

Commit

Permalink
Fix negative temp handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dalathegreat authored Feb 7, 2024
1 parent 19c423a commit fad39dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fad39dd

Please sign in to comment.