From dbe674b0093c1d713299f8110e881120a5a05de1 Mon Sep 17 00:00:00 2001 From: johannes Date: Fri, 29 Nov 2024 14:41:58 +0100 Subject: [PATCH 1/2] Increase version --- include/param_prj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/param_prj.h b/include/param_prj.h index 03dd16a..46623ce 100644 --- a/include/param_prj.h +++ b/include/param_prj.h @@ -39,7 +39,7 @@ */ //Define a version string of your firmware here -#define VERSION 0.42 +#define VERSION 0.43 #include "myLogging.h" From 6a1b97ecd707972e39c5789f8895f71e63780583 Mon Sep 17 00:00:00 2001 From: johannes Date: Thu, 12 Dec 2024 22:28:12 +0100 Subject: [PATCH 2/2] Display whether charging power is limited by battery/vehicle or charger --- ccs/hardwareInterface.cpp | 11 +++++++++-- include/param_prj.h | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ccs/hardwareInterface.cpp b/ccs/hardwareInterface.cpp index bce00b0..a6b6628 100644 --- a/ccs/hardwareInterface.cpp +++ b/ccs/hardwareInterface.cpp @@ -106,8 +106,15 @@ int16_t hardwareInterface_getChargingTargetCurrent(void) Param::SetInt(Param::LimitationReason, LIMITATIONREASON_INLET_HOT); iEVTarget = iLimit; } else { - /* no limitation */ - Param::SetInt(Param::LimitationReason, LIMITATIONREASON_NONE); + int chargerLimit = Param::GetInt(Param::EvseMaxCurrent); + + //Who is the weaker link in the chain - battery or charger? + if (iOriginalDemand >= chargerLimit) + Param::SetInt(Param::LimitationReason, LIMITATIONREASON_CHARGER); + else + Param::SetInt(Param::LimitationReason, LIMITATIONREASON_BATTERY); + + /* no temperature limitation */ iEVTarget = iOriginalDemand; } Param::SetInt(Param::EVTargetCurrent, iEVTarget); diff --git a/include/param_prj.h b/include/param_prj.h index 46623ce..2cfbdf1 100644 --- a/include/param_prj.h +++ b/include/param_prj.h @@ -128,7 +128,7 @@ #define CAT_CHARGE "Charge parameters" #define CAT_COMM "Communication" #define CAT_TEST "Testing" -#define LIMITREASONS "0=None, 1=InletHot" +#define LIMITREASONS "0=None, 1=Charger, 2=Battery, 3=InletHot" #define PPVARIANT "0=Foccci4.1_3V3_1k, 1=Foccci4.2_5V_330up_3000down, 2=Foccci4.5_5V_330up_no_down" #define ACOBCSTT "0=Idle, 1=Lock, 2=Charging, 3=Pause, 4=Complete, 5=Error" #define PORTSTAT "0=Idle, 1=PluggedIn, 2=Ready, 3=ChargingAC, 4=ChargingDC, 5=Stopping, 6=Unlock, 7=PortError" @@ -206,6 +206,8 @@ enum _stopreasons enum _limitationreasons { LIMITATIONREASON_NONE, + LIMITATIONREASON_CHARGER, + LIMITATIONREASON_BATTERY, LIMITATIONREASON_INLET_HOT };