浏览代码

2020.10.22 / Wendell
Actions:
1. DO360 temporary version before ocpp test

Files:
1. As follow commit history

Wendell 4 年之前
父节点
当前提交
856dcbf7c8

+ 2 - 2
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -6619,7 +6619,7 @@ int handleChangeAvailabilityRequest(char *uuid, char *payload)
 
 					for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 					{
-						if ((gunType[i] == 'G')&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == i)&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_FAULT)) //S_FAULT  //(((gunIndex  == 0)|| ((gunIndex > 0)&&(gunType[gunIndex-1] == 'G')))&&(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus != SYS_MODE_FAULT)) //S_FAULT
+						if ((gunType[i] == 'O')&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == i)&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_FAULT)) //S_FAULT  //(((gunIndex  == 0)|| ((gunIndex > 0)&&(gunType[gunIndex-1] == 'G')))&&(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus != SYS_MODE_FAULT)) //S_FAULT
 						{
 							//ShmOCPP16Data->CsMsg.bits[gunIndex - 1].ChangeAvailabilityReq = 1;
 							sprintf(comfirmstr, "%s", AvailabilityStatusStr[Rejected] );
@@ -6689,7 +6689,7 @@ int handleChangeAvailabilityRequest(char *uuid, char *payload)
 
 		for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 		{
-			if (((gunIndex > 0)&&(gunType[gunIndex-1] == 'G'))&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus != SYS_MODE_FAULT)) //S_FAULT
+			if (((gunIndex > 0)&&(gunType[gunIndex-1] == 'O'))&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus != SYS_MODE_FAULT)) //S_FAULT
 			{
 				sprintf(comfirmstr, "%s", AvailabilityStatusStr[Accepted] );
 				goto end;

二进制
EVSE/Projects/DO360/Apps/FactoryConfig


二进制
EVSE/Projects/DO360/Apps/Module_EvComm


+ 5 - 1
EVSE/Projects/DO360/Apps/Module_EvComm.c

@@ -949,6 +949,10 @@ void PowerCabinetStatusResponse(int socket, struct PACKET_STRUCTURE *packet)
 		for(int i = 0; i < ShmSysConfigAndInfo->SysWarningInfo.WarningCount; i++)
 		{
 		    memcpy(&sendBuffer.Payload.data[1 + (i * 6)], &ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i][0], ShmSysConfigAndInfo->SysWarningInfo.WarningCount * 6);
+		    if(ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i][1] == '1')
+		    {
+		        sendBuffer.Payload.data[1 + (i * 6) + 1] = '4';
+		    }
 		}
 	}
 
@@ -1569,7 +1573,7 @@ void DispenserSocketProcess(int socketFd, struct sockaddr_in clientInfo, unsigne
 							ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenserIndex].LocalStatus = _DS_Idle;
 							ackResult = _R_OK;
 						}
-						PRINTF_FUNC("Dispenser %d Get Connector ID %s", dispenserIndex, ackResult == _R_OK ? "OK" : "NG");
+						PRINTF_FUNC("Dispenser ID %d Get Connector ID %s", dispenserID, ackResult == _R_OK ? "OK" : "NG");
 						ConnectorIDResponse(socketFd, &receiveBuffer, ackResult, dispenserIndex);
 					}
 

二进制
EVSE/Projects/DO360/Apps/Module_EventLogging


+ 7 - 7
EVSE/Projects/DO360/Apps/Module_EventLogging.c

@@ -15,12 +15,12 @@
 
 #include 	<unistd.h>
 #include 	<stdarg.h>
-#include    <stdio.h>      /*標準輸入輸出定義*/
-#include    <stdlib.h>     /*標準函數庫定義*/
-#include    <unistd.h>     /*Unix 標準函數定義*/
-#include    <fcntl.h>      /*檔控制定義*/
-#include    <termios.h>    /*PPSIX 終端控制定義*/
-#include    <errno.h>      /*錯誤號定義*/
+#include    <stdio.h>      /*璅蹱�頛詨�頛詨枂摰𡁶儔*/
+#include    <stdlib.h>     /*璅蹱��賣彍摨怠�蝢�*/
+#include    <unistd.h>     /*Unix 璅蹱��賣彍摰𡁶儔*/
+#include    <fcntl.h>      /*瑼娍綉�嗅�蝢�*/
+#include    <termios.h>    /*PPSIX 蝯�垢�批�摰𡁶儔*/
+#include    <errno.h>      /*�航炊�笔�蝢�*/
 #include 	<errno.h>
 #include 	<string.h>
 #include	<time.h>
@@ -181,7 +181,7 @@ void RemoveFaultCodeToBuf(unsigned char *Code)
 	char _code[7];
 	sprintf(_code,"%s", Code);
 
-	// 把相關的錯誤碼一次移除,避免重複顯示
+	// �羓㮾�𦦵��航炊蝣潔�甈∠宏�歹��踹��滩�憿舐內
 	while(find)
 	{
 		find = 0x00;

二进制
EVSE/Projects/DO360/Apps/Module_InternalComm


二进制
EVSE/Projects/DO360/Apps/Module_LcmControl


二进制
EVSE/Projects/DO360/Apps/Module_PrimaryComm


+ 3 - 2
EVSE/Projects/DO360/Apps/Module_PrimaryComm.c

@@ -297,9 +297,10 @@ void GetInputGpioStatus()
 		ShmPrimaryMcuData->InputDet.bits.SpdDetec = gpio_in.SPD;
 
 		// DO360 Door Status is the inverse of DS's
-		//ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open > 0 ? 0 : 1;
+		ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open > 0 ? 0 : 1;
+
 		// Bypass door open
-		ShmPrimaryMcuData->InputDet.bits.DoorOpen = 0;
+		//ShmPrimaryMcuData->InputDet.bits.DoorOpen = 0;
 
 		ShmPrimaryMcuData->InputDet.bits.Button1 = gpio_in.Button[0];
 		ShmPrimaryMcuData->InputDet.bits.Button2 = gpio_in.Button[1];

二进制
EVSE/Projects/DO360/Apps/Module_PsuComm


二进制
EVSE/Projects/DO360/Apps/ReadCmdline


二进制
EVSE/Projects/DO360/Apps/UnsafetyOutputTask


二进制
EVSE/Projects/DO360/Apps/main


+ 10 - 8
EVSE/Projects/DO360/Apps/main.c

@@ -4539,27 +4539,29 @@ void ChkOcppStatus(byte gunIndex)
 		ShmOCPP16Data->CsMsg.bits[gunIndex].ChangeAvailabilityReq = NO;
 		if(strcmp((char *)ShmOCPP16Data->ChangeAvailability[gunIndex].Type, "Operative") == EQUAL)
 		{
+            if (isDb_ready)
+                DB_Update_Operactive(localDb, gunIndex, true);
+
+            chargingInfo[gunIndex]->IsAvailable = YES;
+
 			if (chargingInfo[gunIndex]->SystemStatus == S_IDLE ||
 				chargingInfo[gunIndex]->SystemStatus == S_RESERVATION ||
 				chargingInfo[gunIndex]->SystemStatus == S_MAINTAIN)
 			{
-	            if (isDb_ready)
-	                DB_Update_Operactive(localDb, gunIndex, true);
-
-	            chargingInfo[gunIndex]->IsAvailable = YES;
 				setChargerMode(gunIndex, MODE_IDLE);
 			}
 		}
 		else if (strcmp((char *)ShmOCPP16Data->ChangeAvailability[gunIndex].Type, "Inoperative") == EQUAL)
 		{
+            if (isDb_ready)
+                DB_Update_Operactive(localDb, gunIndex, false);
+
+            chargingInfo[gunIndex]->IsAvailable = NO;
+
 			if (chargingInfo[gunIndex]->SystemStatus == S_IDLE ||
 				chargingInfo[gunIndex]->SystemStatus == S_RESERVATION ||
 				chargingInfo[gunIndex]->SystemStatus == S_MAINTAIN)
 			{
-	            if (isDb_ready)
-	                DB_Update_Operactive(localDb, gunIndex, false);
-
-	            chargingInfo[gunIndex]->IsAvailable = NO;
 				setChargerMode(gunIndex, MODE_MAINTAIN);
 			}
 		}

二进制
EVSE/Projects/DO360/Images/FactoryDefaultConfig.bin


二进制
EVSE/Projects/DO360/Images/ramdisk.gz