Explorar el Código

[Add][AW-CCS][Module_AlarmDetect.c]
2022-03-24 / EASON YANG
Action
1. Added: Clear statusNotification info message for identify error messages.

File
1. Module_AlarmDetect.c
Action 1

FIRMWARE VERSION: B0.61.XX.XXXX.PX

8009 hace 3 años
padre
commit
af7282931d
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      EVSE/Projects/AW-CCS/Apps/Module_AlarmDetect.c

+ 8 - 1
EVSE/Projects/AW-CCS/Apps/Module_AlarmDetect.c

@@ -1371,7 +1371,8 @@ int main(void)
 						sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "012201");
 					else if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP == ON)
 						sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "012202");
-
+					
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 				else if((ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_L1_UNDER_VOLTAGE) ||
 						(ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_L2_UNDER_VOLTAGE) ||
@@ -1385,6 +1386,7 @@ int main(void)
 					else if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP == ON)
 						sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "012205");
 
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 				else if((ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_L1_OVER_CURRENT) ||
 						(ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_L2_OVER_CURRENT) ||
@@ -1398,16 +1400,19 @@ int main(void)
 					else if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCPL3 == ON)
 						sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "012300");
 
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 				else if(ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_OVER_TEMPERATURE)
 				{
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].ErrorCode , "HighTemperature");
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "012223");
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 				else if(ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_GROUND_FAIL)
 				{
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].ErrorCode , "GroundFailure");
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "012256");
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 				else if(ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_CP_ERROR)
 				{
@@ -1467,6 +1472,7 @@ int main(void)
 				{
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].ErrorCode , "ConnectorLockFailure");
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode , "011027");
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 				else if(ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode & ALARM_POWER_DROP)
 				{
@@ -1534,6 +1540,7 @@ int main(void)
 				{
 					sprintf((char*)ShmOCPP16Data->StatusNotification[gun_index].ErrorCode , "NoError");
 					memset(ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode));
+					memset(ShmOCPP16Data->StatusNotification[gun_index].Info, 0x00, ARRAY_SIZE(ShmOCPP16Data->StatusNotification[gun_index].Info));
 				}
 			}
 			else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)