Add estimated charge setting for Kia eGMP

This commit is contained in:
Daniel Öster 2025-09-04 22:34:38 +03:00
parent c1f3187306
commit 3764ab4bf9
3 changed files with 3 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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 {