Эх сурвалжийг харах

2020.05.27 / TC Hsu

Actions: Bug fixed, for single connector, after event/warning/alarm code happend, when warning event disappear or charging connector plug out after charging stop, the event/warning/alarm code can not erased, correct the event/warning/alarm code release function to fix it.

Image version    : N/A
Image checksum   : N/A

Hardware PWB P/N : N/A
Hardware Version : N/A

Files:

	modified:   Module_EvComm.c
	modified:   main.c
TC_Hsu 4 жил өмнө
parent
commit
3e5e7e1fd3

+ 3 - 9
EVSE/Projects/DM30/Apps/Module_EvComm.c

@@ -659,9 +659,7 @@ void ClearAbnormalStatus_Chademo(byte gun_index)
     {
         for (byte index = 0; index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; index++)
         {
-            if (index == gun_index)
-                continue;
-            else
+            if (index != gun_index || ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 1)
             {
                 PRINTF_FUNC("CHA clean error : index = %d, EvConnAlarmCode = %s, code = %s \n", index, _chargingData[index]->EvConnAlarmCode, code);
                 if (strncmp((char *)_chargingData[index]->EvConnAlarmCode, code, 6) != EQUAL)
@@ -1153,9 +1151,7 @@ void ClearAbnormalStatus_GB(byte gun_index)
     {
         for (byte index = 0; index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; index++)
         {
-            if (index == gun_index)
-                continue;
-            else
+            if (index != gun_index || ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 1)
             {
                 PRINTF_FUNC("GBT clean error : index = %d, EvConnAlarmCode = %s, code = %s \n", index, _chargingData[index]->EvConnAlarmCode, code);
                 if (strncmp((char *)_chargingData[index]->EvConnAlarmCode, code, 6) != EQUAL)
@@ -2186,9 +2182,7 @@ void ClearAbnormalStatus_CCS(byte gun_index)
     {
         for (byte index = 0; index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; index++)
         {
-            if (index == gun_index)
-                continue;
-            else
+            if (index != gun_index || ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 1)
             {
                 PRINTF_FUNC("CCS clean error : index = %d, EvConnAlarmCode = %s, code = %s \n", index, _chargingData[index]->EvConnAlarmCode, code);
                 if (strncmp((char *)_chargingData[index]->EvConnAlarmCode, code, 6) != EQUAL)

+ 2 - 6
EVSE/Projects/DM30/Apps/main.c

@@ -1967,9 +1967,7 @@ void ReleaseAlarmCode(byte gunIndex)
     {
         for (byte index = 0; index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; index++)
         {
-            if (index == gunIndex)
-                continue;
-            else
+            if (index != gunIndex || ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 1)
             {
                 if (strncmp((char *)chargingInfo[index]->ConnectorAlarmCode, code, 6) != EQUAL)
                 {
@@ -2014,9 +2012,7 @@ void ReleaseWarningCodeByString(byte gunIndex, char *code)
     {
         for (byte index = 0; index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; index++)
         {
-            if (index == gunIndex)
-                continue;
-            else
+            if (index != gunIndex || ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 1)
             {
                 if (strncmp((char *)chargingInfo[index]->ConnectorWarningCode, code, 6) != EQUAL)
                 {