From 3764ab4bf997d4ea9d3930fadf0e40fcf63f6c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96ster?= Date: Thu, 4 Sep 2025 22:34:38 +0300 Subject: [PATCH] Add estimated charge setting for Kia eGMP --- Software/src/battery/KIA-E-GMP-BATTERY.cpp | 4 ++-- Software/src/battery/KIA-E-GMP-BATTERY.h | 2 -- Software/src/devboard/webserver/settings_html.cpp | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Software/src/battery/KIA-E-GMP-BATTERY.cpp b/Software/src/battery/KIA-E-GMP-BATTERY.cpp index 3da4f096..20f3cd8e 100644 --- a/Software/src/battery/KIA-E-GMP-BATTERY.cpp +++ b/Software/src/battery/KIA-E-GMP-BATTERY.cpp @@ -143,12 +143,12 @@ void KiaEGmpBattery::update_values() { datalayer.battery.status.max_charge_power_W = RAMPDOWNPOWERALLOWED * (1 - (datalayer.battery.status.real_soc - RAMPDOWN_SOC) / (10000.0 - RAMPDOWN_SOC)); } else { // No limits, max charging power allowed - datalayer.battery.status.max_charge_power_W = MAXCHARGEPOWERALLOWED; + datalayer.battery.status.max_charge_power_W = datalayer.battery.status.override_charge_power_W; } //datalayer.battery.status.max_discharge_power_W = (uint16_t)allowedDischargePower * 10; //From kW*100 to Watts //The allowed discharge power is not available. We hardcode this value for now - datalayer.battery.status.max_discharge_power_W = MAXDISCHARGEPOWERALLOWED; + datalayer.battery.status.max_discharge_power_W = datalayer.battery.status.override_discharge_power_W; datalayer.battery.status.temperature_min_dC = (int8_t)temperatureMin * 10; //Increase decimals, 17C -> 17.0C diff --git a/Software/src/battery/KIA-E-GMP-BATTERY.h b/Software/src/battery/KIA-E-GMP-BATTERY.h index 2e71c6ff..dfd0237c 100644 --- a/Software/src/battery/KIA-E-GMP-BATTERY.h +++ b/Software/src/battery/KIA-E-GMP-BATTERY.h @@ -37,8 +37,6 @@ class KiaEGmpBattery : public CanBattery { static const int MAX_CELL_DEVIATION_MV = 150; static const int MAX_CELL_VOLTAGE_MV = 4250; //Battery is put into emergency stop if one cell goes over this value static const int MIN_CELL_VOLTAGE_MV = 2950; //Battery is put into emergency stop if one cell goes below this value - static const int MAXCHARGEPOWERALLOWED = 10000; - static const int MAXDISCHARGEPOWERALLOWED = 10000; static const int RAMPDOWN_SOC = 9000; // 90.00 SOC% to start ramping down from max charge power towards 0 at 100.00% static const int RAMPDOWNPOWERALLOWED = 10000; // What power we ramp down from towards top balancing diff --git a/Software/src/devboard/webserver/settings_html.cpp b/Software/src/devboard/webserver/settings_html.cpp index 64ee9cda..68943517 100644 --- a/Software/src/devboard/webserver/settings_html.cpp +++ b/Software/src/devboard/webserver/settings_html.cpp @@ -882,6 +882,7 @@ const char* getCANInterfaceName(CAN_Interface interface) { form[data-battery="4"] .if-estimated, form[data-battery="6"] .if-estimated, form[data-battery="14"] .if-estimated, + form[data-battery="16"] .if-estimated, form[data-battery="24"] .if-estimated, form[data-battery="32"] .if-estimated, form[data-battery="33"] .if-estimated {