Chg time calc fix

This commit is contained in:
Carsten Schmiemann 2022-04-23 17:51:46 +02:00
parent de9389dab3
commit 69a64bc1f1
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ void OvmsVehicleRenaultZoePh2::IncomingPollReply(canbus* bus, uint16_t type, uin
int OvmsVehicleRenaultZoePh2::calcMinutesRemaining(float charge_voltage, float charge_current) {
float bat_soc = mt_bat_lbc_soc->AsFloat(100);
float remaining_wh = m_battery_capacity * bat_soc / 100.0;
float remaining_wh = m_battery_capacity - (m_battery_capacity * bat_soc / 100.0);
float remaining_hours = remaining_wh / (charge_current * charge_voltage);
float remaining_mins = remaining_hours * 60.0;
//ESP_LOGD(TAG, "SOC: %f, BattCap:%d, Current: %f, Voltage: %f, RemainWH: %f, RemainHour: %f, RemainMin: %f", bat_soc, m_battery_capacity, charge_current, charge_voltage, remaining_wh, remaining_hours, remaining_mins);