calibrated soc% to kWh for niro/kona 2020

This commit is contained in:
Lubos Petrovic
2020-11-17 21:53:05 +01:00
parent b3d81e314f
commit 9f220b8826
4 changed files with 16 additions and 7 deletions

View File

@@ -51,6 +51,7 @@ Screen list
- Settings: LCD brightness (auto, 20, 50, 100%)
- Speed screen: added motor rpm
- Speed screen: brake lights indicator
- Soc% to kWh is now calibrated for NiroEV/KonaEV 2020
### v1.7.4 2020-11-12
- Added default screen option to settings

View File

@@ -1,21 +1,23 @@
#define commandQueueCountKiaENiro 30
#define commandQueueLoopFromKiaENiro 8
#define commandQueueCountKiaENiro 32
#define commandQueueLoopFromKiaENiro 10
String commandQueueKiaENiro[commandQueueCountKiaENiro] = {
"AT Z", // Reset all
"AT I", // Print the version ID
"AT S0", // Printing of spaces on
"AT E0", // Echo off
"AT L0", // Linefeeds off
"AT S0", // Printing of spaces on
"AT SP 6", // Select protocol to ISO 15765-4 CAN (11 bit ID, 500 kbit/s)
//"AT AL", // Allow Long (>7 byte) messages
//"AT AR", // Automatically receive
//"AT H1", // Headers on (debug only)
//"AT D1", // Display of the DLC on
//"AT CAF0", // Automatic formatting off
"AT AT0", // disabled the adaptive timing
"AT ST 01", // reduced the time out to 1
"AT DP",
"AT ST16",
"AT ST10", // orig ST16
// Loop from (KIA ENIRO)
@@ -23,7 +25,7 @@ String commandQueueKiaENiro[commandQueueCountKiaENiro] = {
"ATSH770",
"22BC03", // low beam
"22BC06", // brake light
// VMCU
"ATSH7E2",
"2101", // speed, ...
@@ -64,6 +66,7 @@ bool activateCommandQueueForKiaENiro() {
// 39 or 64 kWh model?
params.batModuleTempCount = 4;
params.batteryTotalAvailableKWh = 64;
// =(I18*0,615)*(1+(I18*0,0008)) soc to kwh niro ev 2020
if (settings.carType == CAR_KIA_ENIRO_2020_39 || settings.carType == CAR_HYUNDAI_KONA_2020_39) {
params.batteryTotalAvailableKWh = 39.2;
}

Binary file not shown.

View File

@@ -697,9 +697,14 @@ bool drawSceneSpeed(bool force) {
sprintf(tmpStr3, " %01.00f%%", params.socPerc);
tft.drawString(tmpStr3, 320, 94, GFXFF);
if (params.socPerc > 0) {
sprintf(tmpStr3, " %01.01f", params.batteryTotalAvailableKWh * (params.socPerc / 100));
float capacity = params.batteryTotalAvailableKWh * (params.socPerc / 100);
// calibration for Niro/Kona, real available capacity is ~66.5kWh, 0-10% ~6.2kWh, 90-100% ~7.2kWh
if (settings.carType == CAR_KIA_ENIRO_2020_64 || settings.carType == CAR_HYUNDAI_KONA_2020_64) {
capacity = (params.socPerc*0.615)*(1+(params.socPerc*0.0008));
}
sprintf(tmpStr3, " %01.01f", capacity);
tft.drawString(tmpStr3, 320, 129, GFXFF);
tft.drawString(" kWh", 320, 164, GFXFF);
tft.drawString("kWh", 320, 164, GFXFF);
}
return true;