ソースを参照

2021-03-26 / Wendell

Actions
1. fix communication issue with psu when emergency button pressed
2. fix power cabinet connection issue with dispenser
3. modify parallel relay logic

Files
1. As follow commit history

Image version : D0.12.XX.XXXX.XX
Wendell 4 年 前
コミット
a4ea0e9813

+ 5 - 3
EVSE/Projects/DO360/Apps/Config.h

@@ -290,9 +290,10 @@ typedef union
         unsigned int FanBoardDisable:1;             // 0: fan board enable,         1: fan board disable
         unsigned int LedBoardDisable:1;             // 0: led board enable,         1: led board disable
         unsigned int SecondRelayBoardEnable:1;      // 0: second relay disable,     1: second relay enable
+        unsigned int EnableAutoStartCharging:1;     // 0: disable,                  1: enable auto charging after plug in
         unsigned int StandardLedIndication:1;       // 0: no led indication,        1: enable standard led indication
         unsigned int E4YOULedIndication:1;          // 0: no led indication,        1: enable e4you led indication
-        unsigned int res:24;
+        unsigned int res:23;
     }bits;
 }SystemControl;
 
@@ -317,9 +318,10 @@ typedef union
     {
         unsigned int SelfTestOK:1;                  // 0: self test not completed,  1: self test ok
         unsigned int AcContactor:1;                 // 0: ac contactor off,         1: ac contactor on
-        unsigned int AcContactorForceOff:1;         // 0: no effect,                1: ac contactor off
+        unsigned int AcContactorOffByPsu:1;         // 0: no effect,                1: ac contactor off
+        unsigned int AcContactorOffByEmergency:1;   // 0: no effect,                1: ac contactor off
         unsigned int StandbyCountdown:1;            // 0: charger is using,         1: start countdown
-        unsigned int res:28;
+        unsigned int res:27;
     }bits;
 }RelayControl;
 

+ 61 - 52
EVSE/Projects/DO360/Apps/Module_EvComm.c

@@ -2576,17 +2576,17 @@ void DispenserSocketProcess(int socketFd, struct sockaddr_in clientInfo, unsigne
 			usleep((SOCKET_RECEIVE_INTERVAL * 1000));
 		}
 
-		if(timeout >= DISPENSER_SOCKET_TIMEOUT || ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenserIndex].Setting.bits.DuplicateIp)
-		{
-		    if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenserIndex].Setting.bits.DuplicateIp)
-		    {
-		        PRINTF_FUNC("Dispenser %d has been kick", dispenserIndex + 1);
-		    }
-		    else
-		    {
+        if(timeout >= DISPENSER_SOCKET_TIMEOUT || ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenserIndex].Setting.bits.DuplicateIp)
+        {
+            if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenserIndex].Setting.bits.DuplicateIp)
+            {
+                PRINTF_FUNC("Dispenser %d has been kick", dispenserIndex + 1);
+            }
+            else
+            {
                 //timeout
                 PRINTF_FUNC("IP: %s, Socket %d connection timeout", (inet_ntoa(clientInfo.sin_addr)), index);
-		    }
+            }
 
 			if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo[index].Status == _CNS_DispenserMatched)
 			{
@@ -2652,8 +2652,8 @@ BOOL IsConflictIp(uint32_t ipAddress)
 	{
 		if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo[i].IpAddress == ipAddress)
 		{
-		    int dispenser = ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo[i].DispenserIndex;
-		    ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenser].Setting.bits.DuplicateIp = true;
+            int dispenser = ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo[i].DispenserIndex;
+            ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[dispenser].Setting.bits.DuplicateIp = true;
 			return true;
 		}
 	}
@@ -2681,21 +2681,21 @@ void InitDispenserInfo(void)
 	    //memset(&LastWarningInfo[i], 0x00, sizeof(struct WARNING_CODE_INFO));
 	}
 
-	//memset(&ShmSysConfigAndInfo->SysInfo.DispenserInfo, 0x00, sizeof(struct DispenserInfoData));
-	ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity = 0;
-	ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity = 0;
-	for(int i = 0; i < GENERAL_GUN_QUANTITY; i++)
-	{
-	    unsigned char localStatus = 0;
-	    localStatus = ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].LocalStatus;
+    //memset(&ShmSysConfigAndInfo->SysInfo.DispenserInfo, 0x00, sizeof(struct DispenserInfoData));
+    ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity = 0;
+    ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity = 0;
+    for(int i = 0; i < GENERAL_GUN_QUANTITY; i++)
+    {
+        unsigned char localStatus = 0;
+        localStatus = ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].LocalStatus;
         memset(&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i], 0x00, sizeof(struct DispenserModule));
         ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].LocalStatus = localStatus;
-	}
-	//ShmSysConfigAndInfo->SysInfo.DispenserInfo.CheckInLog.Status = 0;
-	//memset(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectorLog, 0x00, sizeof(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectorLog));
-	memset(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo, 0x00, sizeof(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo));
-	ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectorTimeout = 0;
-	ShmSysConfigAndInfo->SysInfo.DispenserInfo.DefaultPrice = 0;
+    }
+    //ShmSysConfigAndInfo->SysInfo.DispenserInfo.CheckInLog.Status = 0;
+    //memset(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectorLog, 0x00, sizeof(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectorLog));
+    memset(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo, 0x00, sizeof(ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo));
+    ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectorTimeout = 0;
+    ShmSysConfigAndInfo->SysInfo.DispenserInfo.DefaultPrice = 0;
 
 	ShmSysConfigAndInfo->SysInfo.DispenserInfo.Currency = ShmSysConfigAndInfo->SysConfig.BillingData.Currency;
 }
@@ -2762,32 +2762,41 @@ void ForkIpConflictedCheck(void)
     }
 }
 
-void tcpSocketServerStart(void)
+int tcpSocketServerStart(void)
 {
-	int sockFd = 0;
-	int clientSockFd = 0;
-	int connectIndex = 0;
-	pid_t forkId;
+    int sockFd = 0;
+    int clientSockFd = 0;
+    int connectIndex = 0;
+    int bindStatus = 0;
+    int reuseaddr = 1;
+    pid_t forkId;
 
-	struct sockaddr_in 	serverInfo, clientInfo;
-	socklen_t 			addrlen = sizeof(clientInfo);
-	//struct timeval      timeout = {3, 0};
+    struct sockaddr_in 	serverInfo, clientInfo;
+    socklen_t 			addrlen = sizeof(clientInfo);
+    //struct timeval      timeout = {3, 0};
 
-	sockFd = socket(AF_INET, SOCK_STREAM, 0);
-	if(sockFd == -1)
-	{
-		PRINTF_FUNC("InitSocketServer NG\n");
-		sleep(5);
-		return;
-	}
+    sockFd = socket(AF_INET, SOCK_STREAM, 0);
+    if(sockFd == -1)
+    {
+        PRINTF_FUNC("InitSocketServer NG\n");
+        sleep(5);
+        return FAIL;
+    }
 
-	InitDispenserInfo();
+    setsockopt(sockFd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr));
 
-	bzero(&serverInfo,sizeof(serverInfo));
-	serverInfo.sin_family = PF_INET;
-	serverInfo.sin_addr.s_addr = htonl(INADDR_ANY);
-	serverInfo.sin_port = htons(TCP_LISTEN_PORT);
-	bind(sockFd, (struct sockaddr *)&serverInfo, sizeof(serverInfo));
+    InitDispenserInfo();
+
+    bzero(&serverInfo,sizeof(serverInfo));
+    serverInfo.sin_family = PF_INET;
+    serverInfo.sin_addr.s_addr = htonl(INADDR_ANY);
+    serverInfo.sin_port = htons(TCP_LISTEN_PORT);
+    bindStatus = bind(sockFd, (struct sockaddr *)&serverInfo, sizeof(serverInfo));
+    if(bindStatus < 0)
+    {
+        PRINTF_FUNC("socket bind fail");
+        return FAIL;
+    }
 	listen(sockFd, CONNECTION_LIMIT);
 
 	PRINTF_FUNC("TCP Server Start");
@@ -2838,7 +2847,7 @@ void tcpSocketServerStart(void)
 					DispenserSocketProcess(clientSockFd, clientInfo, connectIndex);
 					close(clientSockFd);
 					memset(&ShmSysConfigAndInfo->SysInfo.DispenserInfo.ConnectionInfo[connectIndex], 0x00, sizeof(struct ConnectionInfoData));
-					return;
+					return 0;
 				}
 				else if(forkId == -1)
 				{
@@ -2862,7 +2871,7 @@ void tcpSocketServerStart(void)
 		usleep(10000);
 	}
 
-	return;
+	return 0;
 }
 
 int main(void)
@@ -2878,12 +2887,12 @@ int main(void)
 	}
 
 	// wait for self test completed
-	while(ShmSysConfigAndInfo->SysInfo.BootingStatus == BOOTTING)
-	{
-	    sleep(1);
-	}
+    while(ShmSysConfigAndInfo->SysInfo.BootingStatus == BOOTTING)
+    {
+        sleep(1);
+    }
 
-	tcpSocketServerStart();
+    tcpSocketServerStart();
 
 	//tcpSocketClientStart();
 

+ 120 - 71
EVSE/Projects/DO360/Apps/Module_InternalComm.c

@@ -1048,9 +1048,9 @@ void SetK1K2RelayStatus(byte index)
 {
 	if (_chargingData[index]->SystemStatus < S_PREPARING_FOR_EVSE)
 	{
-	    if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-	    {
-	        // two relay board
+        if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+        {
+            // two relay board
             if(index == 0)
             {
                 if(regRelay[0].relay_event.bits.Gun1_P == YES)
@@ -1065,10 +1065,10 @@ void SetK1K2RelayStatus(byte index)
                 if (regRelay[1].relay_event.bits.Gun2_N == YES)
                     outputRelay[1].relay_event.bits.Gun2_N = NO;
             }
-	    }
-	    else
-	    {
-	        // only one relay board
+        }
+        else
+        {
+            // only one relay board
             if(index == 0)
             {
                 if(regRelay[0].relay_event.bits.Gun1_P == YES)
@@ -1083,16 +1083,16 @@ void SetK1K2RelayStatus(byte index)
                 if (regRelay[0].relay_event.bits.Gun2_N == YES)
                     outputRelay[0].relay_event.bits.Gun2_N = NO;
             }
-	    }
+        }
 	}
 	else if ((_chargingData[index]->SystemStatus >= S_PREPARING_FOR_EVSE &&
 			_chargingData[index]->SystemStatus <= S_CHARGING))
 	{
 		if (_chargingData[index]->RelayWeldingCheck == YES)
 		{
-	        if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-	        {
-	            // two relay board
+            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+            {
+                // two relay board
                 if(index == 0)
                 {
                     if(regRelay[0].relay_event.bits.Gun1_N == NO)
@@ -1107,10 +1107,10 @@ void SetK1K2RelayStatus(byte index)
                     if (regRelay[1].relay_event.bits.Gun2_P == NO)
                         outputRelay[1].relay_event.bits.Gun2_P = YES;
                 }
-	        }
-	        else
-	        {
-	            // only one relay board
+            }
+            else
+            {
+                // only one relay board
                 if(index == 0)
                 {
                     if(regRelay[0].relay_event.bits.Gun1_N == NO)
@@ -1125,7 +1125,7 @@ void SetK1K2RelayStatus(byte index)
                     if (regRelay[0].relay_event.bits.Gun2_P == NO)
                         outputRelay[0].relay_event.bits.Gun2_P = YES;
                 }
-	        }
+            }
 		}
 	}
 	else if ((_chargingData[index]->SystemStatus >= S_TERMINATING &&
@@ -1134,9 +1134,9 @@ void SetK1K2RelayStatus(byte index)
 	{
 		if ((_chargingData[index]->PresentChargingCurrent * 10) <= SEFETY_SWITCH_RELAY_CUR)
 		{
-		    if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-		    {
-		        // two relay board
+            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+            {
+                // two relay board
                 if(index == 0)
                 {
                     if(regRelay[0].relay_event.bits.Gun1_P == YES)
@@ -1151,10 +1151,10 @@ void SetK1K2RelayStatus(byte index)
                     if (regRelay[1].relay_event.bits.Gun2_N == YES)
                         outputRelay[1].relay_event.bits.Gun2_N = NO;
                 }
-		    }
-		    else
-		    {
-		        // only one relay board
+            }
+            else
+            {
+                // only one relay board
                 if(index == 0)
                 {
                     if(regRelay[0].relay_event.bits.Gun1_P == YES)
@@ -1169,7 +1169,7 @@ void SetK1K2RelayStatus(byte index)
                     if (regRelay[0].relay_event.bits.Gun2_N == YES)
                         outputRelay[0].relay_event.bits.Gun2_N = NO;
                 }
-		    }
+            }
 		}
 	}
 	else if (_chargingData[index]->SystemStatus == S_CCS_PRECHARGE_ST0)
@@ -1191,10 +1191,11 @@ void SetParalleRelayStatus()
 				((_chargingData[0]->SystemStatus == S_IDLE || _chargingData[0]->SystemStatus == S_MAINTAIN || _chargingData[0]->SystemStatus == S_FAULT) &&
 				(_chargingData[1]->SystemStatus == S_IDLE || _chargingData[1]->SystemStatus == S_MAINTAIN || _chargingData[0]->SystemStatus == S_FAULT)))
 		{
-		    if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-		    {
-		        // two relay board
+            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+            {
+                // two relay board
                 // 初始化~ 不搭橋接
+#if 0
                 if (regRelay[0].relay_event.bits.Gun1_Parallel_P == YES)
                     outputRelay[0].relay_event.bits.Gun1_Parallel_P = NO;
                 if (regRelay[0].relay_event.bits.Gun1_Parallel_N == YES)
@@ -1207,16 +1208,34 @@ void SetParalleRelayStatus()
                     outputRelay[1].relay_event.bits.Gun1_Parallel_P = NO;
                 if (regRelay[1].relay_event.bits.Gun1_Parallel_N == YES)
                     outputRelay[1].relay_event.bits.Gun1_Parallel_N = NO;
-		    }
-		    else
-		    {
-		        // only one relay board
-		        // 初始化~ 不搭橋接
+#endif
+                // gun 1 & gun 3 parallel relay enable
+                if (regRelay[0].relay_event.bits.Gun1_Parallel_P == NO)
+                    outputRelay[0].relay_event.bits.Gun1_Parallel_P = YES;
+                if (regRelay[0].relay_event.bits.Gun1_Parallel_N == NO)
+                    outputRelay[0].relay_event.bits.Gun1_Parallel_N = YES;
+
+                // gun 3 & gun 4 parallel relay disable
+                if (regRelay[0].relay_event.bits.Gun2_Parallel_P == YES)
+                    outputRelay[0].relay_event.bits.Gun2_Parallel_P = NO;
+                if (regRelay[0].relay_event.bits.Gun2_Parallel_N == YES)
+                    outputRelay[0].relay_event.bits.Gun2_Parallel_N = NO;
+
+                // gun 4 & gun 2 parallel relay enable
+                if (regRelay[1].relay_event.bits.Gun1_Parallel_P == NO)
+                    outputRelay[1].relay_event.bits.Gun1_Parallel_P = YES;
+                if (regRelay[1].relay_event.bits.Gun1_Parallel_N == NO)
+                    outputRelay[1].relay_event.bits.Gun1_Parallel_N = YES;
+            }
+            else
+            {
+                // only one relay board
+                // 初始化~ 不搭橋接
                 if (regRelay[0].relay_event.bits.Gun1_Parallel_N == YES)
                     outputRelay[0].relay_event.bits.Gun1_Parallel_N = NO;
                 if (regRelay[0].relay_event.bits.Gun2_Parallel_N == YES)
                     outputRelay[0].relay_event.bits.Gun2_Parallel_N = NO;
-		    }
+            }
 		}
 		else
 		{
@@ -1228,10 +1247,11 @@ void SetParalleRelayStatus()
 				{
 					if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag < _REASSIGNED_RELAY_M_TO_A)
 					{
-			            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-			            {
-			                // two relay board
+                        if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+                        {
+                            // two relay board
                             // 最大充 - 搭上橋接
+#if 0
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == NO)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_N = YES;
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_P == NO)
@@ -1244,23 +1264,30 @@ void SetParalleRelayStatus()
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_N = YES;
                             if (regRelay[1].relay_event.bits.Gun1_Parallel_P == NO)
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_P = YES;
-			            }
-			            else
-			            {
-			                // only one relay board
+#endif
+                            // gun 3 & gun 4 parallel relay enable
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_N == NO)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_N = YES;
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_P == NO)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_P = YES;
+                        }
+                        else
+                        {
+                            // only one relay board
                             // 最大充 - 搭上橋接
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == NO)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_N = YES;
                             if (regRelay[0].relay_event.bits.Gun2_Parallel_N == NO)
                                 outputRelay[0].relay_event.bits.Gun2_Parallel_N = YES;
-			            }
+                        }
 					}
 					else
 					{
-			            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-			            {
-			                // two relay board
+                        if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+                        {
+                            // two relay board
                             // 平均充 - 不搭
+#if 0
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_P == YES)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_P = NO;
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == YES)
@@ -1273,26 +1300,33 @@ void SetParalleRelayStatus()
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_P = NO;
                             if (regRelay[1].relay_event.bits.Gun1_Parallel_N == YES)
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_N = NO;
-			            }
-			            else
-			            {
-			                // only one relay board
+#endif
+                            // gun 3 & gun 4 parallel relay disable
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_P == YES)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_P = NO;
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_N == YES)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_N = NO;
+                        }
+                        else
+                        {
+                            // only one relay board
                             // 平均充 - 不搭
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == YES)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_N = NO;
                             if (regRelay[0].relay_event.bits.Gun2_Parallel_N == YES)
                                 outputRelay[0].relay_event.bits.Gun2_Parallel_N = NO;
-			            }
+                        }
 					}
 				}
 				else if (ShmSysConfigAndInfo->SysInfo.MainChargingMode == _MAIN_CHARGING_MODE_AVER)
 				{
 					if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag < _REASSIGNED_RELAY_A_TO_M)
 					{
-			            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-			            {
-			                // two relay board
+                        if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+                        {
+                            // two relay board
                             // 平均充 - 不搭
+#if 0
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_P == YES)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_P = NO;
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == YES)
@@ -1305,23 +1339,30 @@ void SetParalleRelayStatus()
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_P = NO;
                             if (regRelay[1].relay_event.bits.Gun1_Parallel_N == YES)
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_N = NO;
-			            }
-			            else
-			            {
-			                // only one relay board
+#endif
+                            // gun 3 & gun 4 parallel relay disable
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_P == YES)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_P = NO;
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_N == YES)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_N = NO;
+                        }
+                        else
+                        {
+                            // only one relay board
                             // 平均充 - 不搭
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == YES)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_N = NO;
                             if (regRelay[0].relay_event.bits.Gun2_Parallel_N == YES)
                                 outputRelay[0].relay_event.bits.Gun2_Parallel_N = NO;
-			            }
+                        }
 					}
 					else
 					{
-			            if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
-			            {
-			                // two relay board
+                        if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+                        {
+                            // two relay board
                             // 最大充 - 搭上橋接
+#if 0
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == NO)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_N = YES;
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_P == NO)
@@ -1334,16 +1375,22 @@ void SetParalleRelayStatus()
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_N = YES;
                             if (regRelay[1].relay_event.bits.Gun1_Parallel_P == NO)
                                 outputRelay[1].relay_event.bits.Gun1_Parallel_P = YES;
-			            }
-			            else
-			            {
-			                // only one relay board
+#endif
+                            // gun 3 & gun 4 parallel relay enable
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_N == NO)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_N = YES;
+                            if (regRelay[0].relay_event.bits.Gun2_Parallel_P == NO)
+                                outputRelay[0].relay_event.bits.Gun2_Parallel_P = YES;
+                        }
+                        else
+                        {
+                            // only one relay board
                             // 最大充 - 搭上橋接
                             if (regRelay[0].relay_event.bits.Gun1_Parallel_N == NO)
                                 outputRelay[0].relay_event.bits.Gun1_Parallel_N = YES;
                             if (regRelay[0].relay_event.bits.Gun2_Parallel_N == NO)
                                 outputRelay[0].relay_event.bits.Gun2_Parallel_N = YES;
-			            }
+                        }
 					}
 				}
 			}
@@ -1354,7 +1401,8 @@ void SetParalleRelayStatus()
 void SetAcContactorStatus(void)
 {
     if(ShmChargerInfo->Control.RelayCtrl.bits.AcContactor == YES &&
-            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff == NO)
+        ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu == NO &&
+        ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency == NO)
     {
         outputRelay[0].relay_event.bits.AC_Contactor = YES;
     }
@@ -1366,7 +1414,8 @@ void SetAcContactorStatus(void)
     if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
     {
         if(ShmChargerInfo->Control.RelayCtrl.bits.AcContactor == YES &&
-            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff == NO)
+            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu == NO &&
+            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency == NO)
         {
             outputRelay[1].relay_event.bits.AC_Contactor = YES;
         }
@@ -2591,8 +2640,8 @@ int main(void)
 	memset(&outputRelay[0], 0x00, sizeof(Relay));
 	memset(&outputRelay[1], 0x00, sizeof(Relay));
 
-	if(ShmChargerInfo->Control.SysCtrl.bits.RelayBoardDisable == false)
-	{
+    if(ShmChargerInfo->Control.SysCtrl.bits.RelayBoardDisable == false)
+    {
         if(Config_Relay_Output(Uart5Fd, Addr.DO360_RC1, &outputRelay[0]) != PASS)
             PRINTF_FUNC("Config_Relay1_Output fail");
 
@@ -2601,9 +2650,9 @@ int main(void)
             if(Config_Relay_Output(Uart5Fd, Addr.DO360_RC2, &outputRelay[1]) != PASS)
                 PRINTF_FUNC("Config_Relay2_Output fail");
         }
-	}
+    }
 
-	_RelaySelfTestOK = NO;
+    _RelaySelfTestOK = NO;
 	cur_led_color.Connect_1_Red = COLOR_MIN_LV;
 	cur_led_color.Connect_1_Green = COLOR_MIN_LV;
 	cur_led_color.Connect_1_Blue = COLOR_MIN_LV;

+ 11 - 11
EVSE/Projects/DO360/Apps/Module_PrimaryComm.c

@@ -219,7 +219,7 @@ int InitShareMemory()
    	}
 
    	//creat ShmStatusCodeData
- 	if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
     {
 		#ifdef SystemLogMessage
    		DEBUG_ERROR("shmget ShmStatusCodeData NG\n");
@@ -304,8 +304,8 @@ void GetInputGpioStatus()
 				// DO360 AC_Connector Status is the inverse of DS's
 				if(ShmChargerInfo->Control.PrimaryCtrl.bits.AcContactorReverse)
 				{
-				    ShmSysConfigAndInfo->SysInfo.AcContactorStatus = gpio_in.AC_Connector ? 0 : 1;
-				    ShmPrimaryMcuData->InputDet.bits.AcContactorDetec = gpio_in.AC_Connector ? 0 : 1;
+                    ShmSysConfigAndInfo->SysInfo.AcContactorStatus = gpio_in.AC_Connector ? 0 : 1;
+                    ShmPrimaryMcuData->InputDet.bits.AcContactorDetec = gpio_in.AC_Connector ? 0 : 1;
 				}
 				else
 				{
@@ -324,14 +324,14 @@ void GetInputGpioStatus()
 		ShmPrimaryMcuData->InputDet.bits.SpdDetec = gpio_in.SPD;
 
 		// DO360 Door Status is the inverse of DS's
-		if(ShmChargerInfo->Control.PrimaryCtrl.bits.DoorSensorReverse)
-		{
-		    ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open ? 0 : 1;
-		}
-		else
-		{
-		    ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open ? 1 : 0;
-		}
+        if(ShmChargerInfo->Control.PrimaryCtrl.bits.DoorSensorReverse)
+        {
+            ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open ? 0 : 1;
+        }
+        else
+        {
+            ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open ? 1 : 0;
+        }
 
 		// Bypass door open
 		//ShmPrimaryMcuData->InputDet.bits.DoorOpen = 0;

+ 2 - 1
EVSE/Projects/DO360/Apps/Module_PsuComm.c

@@ -1607,7 +1607,8 @@ int main(void)
 	{
 		// 斷電狀態
 		if (ShmChargerInfo->Control.RelayCtrl.bits.AcContactor == NO ||
-            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff == YES)
+            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu == YES ||
+            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency == YES)
 		{
 			//一但 AC Off PSU 斷電全部的 PSU Group ID 會全部清 0
 			if (!isInitialComp)

+ 30 - 27
EVSE/Projects/DO360/Apps/ReadCmdline.c

@@ -286,9 +286,9 @@ void RunStatusProc(char *v1, char *v2)
 			printf ("index = %x, status = %x (%d)\n", _index, _chargingData[_index]->SystemStatus, _chargingData[_index]->IsAvailable);
 			printf ("SystemTimeoutFlag = %d, PageIndex = %d\n",
 					ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag, ShmSysConfigAndInfo->SysInfo.PageIndex);
-			printf("ConnectorAlarmCode = %s \n", _chargingData[_index]->ConnectorAlarmCode);
-			printf("EvConnAlarmCode = %s \n", _chargingData[_index]->EvConnAlarmCode);
-			printf("RemotenAlarmCode = %s \n", ShmSysConfigAndInfo->SysInfo.ConnectorInfo[_index].RemotenAlarmCode);
+            printf("ConnectorAlarmCode = %s \n", _chargingData[_index]->ConnectorAlarmCode);
+            printf("EvConnAlarmCode = %s \n", _chargingData[_index]->EvConnAlarmCode);
+            printf("RemotenAlarmCode = %s \n", ShmSysConfigAndInfo->SysInfo.ConnectorInfo[_index].RemotenAlarmCode);
 			//printf("ConnectorAlarmCode = %s \n", ShmOCPP16Data->StatusNotification[index].ErrorCode);
 			//printf("ConnectorAlarmCode = %s \n", ShmOCPP16Data->StatusNotification[index].VendorErrorCode);
 		}
@@ -500,7 +500,8 @@ void CheckAcStatus(char *v1)
     if (strcmp(v1, "-1") == 0 || strcmp(v1, "") == 0)
     {
         printf("  AC Contactor Ctrl: %d\r\n", ShmChargerInfo->Control.RelayCtrl.bits.AcContactor);
-        printf(" AC ForceOff Status: %d\r\n", ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff);
+        printf("     AC Off By Psu : %d\r\n", ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu);
+        printf(" AC Off ByEmergency: %d\r\n", ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency);
         printf("AC Contactor Status: %d\r\n", ShmSysConfigAndInfo->SysInfo.AcContactorStatus);
     }
     else
@@ -510,13 +511,15 @@ void CheckAcStatus(char *v1)
             if(strcmp(v1, "0") == 0)
             {
                 ShmChargerInfo->Control.RelayCtrl.bits.AcContactor = false;
-                ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff = false;
+                ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu = false;
+                ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency = false;
                 printf("Set AC Contactor Off\r\n");
             }
             else
             {
                 ShmChargerInfo->Control.RelayCtrl.bits.AcContactor = true;
-                ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff = false;
+                ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu = false;
+                ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency = false;
                 printf("Set AC Contactor On\r\n");
             }
         }
@@ -1443,18 +1446,18 @@ int main(void)
 		return 0;
 	}
 
-	memset(&GroupCollection[0], 0x00, sizeof(PsuGroupCollectionData));
-	memset(&GroupCollection[1], 0x00, sizeof(PsuGroupCollectionData));
-	memset(&GroupCollection[2], 0x00, sizeof(PsuGroupCollectionData));
-	memset(&GroupCollection[3], 0x00, sizeof(PsuGroupCollectionData));
-	GroupCollection[0].Index = 0;
-	GroupCollection[1].Index = 1;
-	GroupCollection[2].Index = 2;
-	GroupCollection[3].Index = 3;
-	GroupCollection[0].Location = 0;
-	GroupCollection[1].Location = 3;
-	GroupCollection[2].Location = 1;
-	GroupCollection[3].Location = 2;
+    memset(&GroupCollection[0], 0x00, sizeof(PsuGroupCollectionData));
+    memset(&GroupCollection[1], 0x00, sizeof(PsuGroupCollectionData));
+    memset(&GroupCollection[2], 0x00, sizeof(PsuGroupCollectionData));
+    memset(&GroupCollection[3], 0x00, sizeof(PsuGroupCollectionData));
+    GroupCollection[0].Index = 0;
+    GroupCollection[1].Index = 1;
+    GroupCollection[2].Index = 2;
+    GroupCollection[3].Index = 3;
+    GroupCollection[0].Location = 0;
+    GroupCollection[1].Location = 3;
+    GroupCollection[2].Location = 1;
+    GroupCollection[3].Location = 2;
 
 	for(;;)
 	{
@@ -1637,16 +1640,16 @@ int main(void)
 			// 槍狀態
 			RunUnconditionalChargeIndex1(newString[1], newString[2], newString[3]);
 		}
-		else if(strcmp(newString[0], "group") == 0)
-		{
-		    if (strcmp(newString[1], "-1") == 0 || strcmp(newString[1], "-1") == 0)
-		    {
-		        ShowGroupingInfo();
-		        continue;
-		    }
+        else if(strcmp(newString[0], "group") == 0)
+        {
+            if (strcmp(newString[1], "-1") == 0 || strcmp(newString[1], "-1") == 0)
+            {
+                ShowGroupingInfo();
+                continue;
+            }
 
-		    RunPsuGrouping(newString[1], newString[2]);
-		}
+            RunPsuGrouping(newString[1], newString[2]);
+        }
 		else
 			printf ("%s\n", msg);
 		usleep(100000);

+ 38 - 29
EVSE/Projects/DO360/Apps/main.c

@@ -199,7 +199,7 @@ bool isModelNameMatch = true;
 
 //int rfidFd = -1;
 //char* rfidPortName = "/dev/ttyS2";
-char* fwVersion = "D0.11.00.0000.00";
+char* fwVersion = "D0.12.00.0000.00";
 
 sqlite3 *localDb;
 bool isDb_ready;
@@ -1398,11 +1398,11 @@ void InitEthernet()
 				}
 			}
 
-		    if(system("pidof -s OcppBackend > /dev/null") != 0)
-		    {
-		        ShmOCPP16Data->OcppConnStatus = false;
-		        ShmSysConfigAndInfo->SysInfo.OcppConnStatus = false;
-		    }
+            if(system("pidof -s OcppBackend > /dev/null") != 0)
+            {
+                ShmOCPP16Data->OcppConnStatus = false;
+                ShmSysConfigAndInfo->SysInfo.OcppConnStatus = false;
+            }
 
 			ShmSysConfigAndInfo->SysInfo.InternetConn = ethResult;
 
@@ -1892,8 +1892,8 @@ void SelfTestRun()
 			{
 				case _STEST_VERSION:
 				{
-					if ((ShmChargerInfo->Control.SysCtrl.bits.FanBoardDisable || ShmFanModuleData->SelfTest_Comp) &&
-					    (ShmChargerInfo->Control.SysCtrl.bits.RelayBoardDisable || ShmRelayModuleData[0]->SelfTest_Comp) &&
+                    if ((ShmChargerInfo->Control.SysCtrl.bits.FanBoardDisable || ShmFanModuleData->SelfTest_Comp) &&
+                        (ShmChargerInfo->Control.SysCtrl.bits.RelayBoardDisable || ShmRelayModuleData[0]->SelfTest_Comp) &&
                         (ShmChargerInfo->Control.SysCtrl.bits.RelayBoardDisable ||
                         ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable == false ||
                         ShmRelayModuleData[1]->SelfTest_Comp) &&
@@ -2703,11 +2703,13 @@ void ChkPrimaryStatus()
 	if (ShmPrimaryMcuData->InputDet.bits.EmergencyButton == ABNORMAL)
 	{
 		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = YES;
+		ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency = YES;
 		EmcOccureByString("012251");
 	}
 	else
 	{
 		ReleaseEmsOccureByString(0, "012251");
+		ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByEmergency = NO;
 	}
 
 	if (ShmPrimaryMcuData->InputDet.bits.AcMainBreakerDetec == ABNORMAL)
@@ -2790,12 +2792,12 @@ void PsuFailureResume(void)
 {
     if(ShmChargerInfo->Control.PsuCtrl.bits.FailureResume)
     {
-        if(ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff == NO)
+        if(ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu == NO)
         {
-            PRINTF_FUNC("Ac Contactor Force Off");
+            PRINTF_FUNC("Ac Contactor Off By Psu Failure");
             // update _AcContactReOpen_Time
             gettimeofday(&_AcContactReOpen_Time, NULL);
-            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff = YES;
+            ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu = YES;
             AcContactorReOpenCount++;
         }
         else
@@ -2808,8 +2810,9 @@ void PsuFailureResume(void)
 
                     // update _AcContactReOpen_Time
                     gettimeofday(&_AcContactReOpen_Time, NULL);
-                    ShmChargerInfo->Control.RelayCtrl.bits.AcContactorForceOff = NO;
+                    ShmChargerInfo->Control.RelayCtrl.bits.AcContactorOffByPsu = NO;
                     ShmChargerInfo->Control.PsuCtrl.bits.FailureResume = NO;
+                    PRINTF_FUNC("Psu Failure Resume");
                 }
             }
         }
@@ -4371,7 +4374,7 @@ void CheckConnectionTimeout(void)
 	}
 	else
 	{
-		if(ShmOCPP16Data->OcppConnStatus &&
+        if(ShmOCPP16Data->OcppConnStatus &&
             strcmp((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData,"") != 0)
 		{
 			_connectionTimeout = atoi((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
@@ -5772,6 +5775,12 @@ void CheckTask()
 		DEBUG_ERROR_MSG("Module_ProduceUtils not running, restart it.\r\n");
 		system ("/root/Module_ProduceUtils &");
 	}
+
+    if(system("pidof -s Module_EvComm > /dev/null") != 0)
+    {
+        DEBUG_ERROR_MSG("Module_EvComm not running, restart it.\r\n");
+        system ("/root/Module_EvComm &");
+    }
 }
 
 void InitialDHCP()
@@ -6356,8 +6365,8 @@ int main(void)
 		isModelNameMatch = false;
 
 	Initialization();
-	InitialPsuGroupingAndLocation();
-	InitialChargerSetting();
+    InitialPsuGroupingAndLocation();
+    InitialChargerSetting();
 	PRINTF_FUNC("Spawn all Task. \n");
 	SpawnTask();
 
@@ -6482,8 +6491,8 @@ int main(void)
 			gettimeofday(&_cmdMainPriority_time, NULL);
 		}
 
-		DispenserReconnectionProcess();
-		LedIndicationProcess();
+        //DispenserReconnectionProcess();
+        LedIndicationProcess();
 
 		CheckMiscCommandRequirement();
 		CheckDispenserVersionUpdateRequirement();
@@ -6569,11 +6578,11 @@ int main(void)
 						setChargerMode(gun_index, MODE_MAINTAIN);
 					}
 
-					if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 ||
+                    if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 ||
                         ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].RemoteStatus == _CRS_Alarm ||
                         ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.FaultStatusRequest ||
                         ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.Disconnection)
-					{
+                    {
                         if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.FaultStatusRequest)
                         {
                             if(strncmp((char *)chargingInfo[gun_index]->ConnectorAlarmCode, "", 6) == EQUAL)
@@ -6597,15 +6606,15 @@ int main(void)
                             ClearDetectPluginFlag();
                             UpdateErrorCodeToOcpp(gun_index);
                             setChargerMode(gun_index, MODE_FAULT);
-					    }
-					    else
-					    {
-					        if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.Disconnection)
-					        {
-					            CheckConnectorDisconnectionRecovery(gun_index);
-					        }
-					    }
-					}
+                        }
+                        else
+                        {
+                            if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.Disconnection)
+                            {
+                                CheckConnectorDisconnectionRecovery(gun_index);
+                            }
+                        }
+                    }
 					else
 					{
 					    if (chargingInfo[gun_index]->SystemStatus == S_FAULT)
@@ -7178,7 +7187,7 @@ int main(void)
 					    }
 					}
 
-					if((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].RemoteStatus == _CRS_Idle || ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Enable == false) &&
+                    if((ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].RemoteStatus == _CRS_Idle || ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Enable == false) &&
                         ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.PsuReleasable)
 					{
 						setChargerMode(gun_index, MODE_IDLE);

BIN
EVSE/Projects/DO360/Images/ramdisk.gz


+ 15 - 15
EVSE/Projects/define.h

@@ -1627,16 +1627,16 @@ char InfoStatusCode[384][6]=
 	"023975",	//GBT: ERROR_CODE_BSM_TEMPERATURE
 	"023976",	//GBT: ERROR_CODE_BSM_ISOLATE
 	"023977",	//GBT: ERROR_CODE_BSM_OUTPUT_CONNECTOR
-	"023978",	// Reserved
-	"023979",	// Reserved
-	"023980",	// ERROR_CODE_CHADEMO_BMS_CHARGE_ALLOW_ERROR
-	"023981",	// ERROR_CODE_CHADEMO_OUTPUT_VOLTAGE_MORE_THEN_10_PERCENT
-	"023982",	// ERROR_CODE_CHADEMO_ADC_LESS_THAN_10V
-	"023983",	// Reserved
-	"023984",	// Reserved
-	"023985",	// Reserved
-	"023986",	// Reserved
-	"023987",	// Reserved
+	"023978",	// Authorization failed
+	"023979",	// EV full charging
+    "023980",   // ERROR_CODE_CHADEMO_BMS_CHARGE_ALLOW_ERROR
+    "023981",   // ERROR_CODE_CHADEMO_OUTPUT_VOLTAGE_MORE_THEN_10_PERCENT
+    "023982",   // ERROR_CODE_CHADEMO_ADC_LESS_THAN_10V
+    "023983",   // STOP by EV with unknow reason
+    "023984",   // Reserved
+    "023985",   // Reserved
+    "023986",   // Reserved
+    "023987",   // Reserved
 	"033900",	//disconnected from backend through Ethernet
 	"033901",	//disconnected from backend through WiFi
 	"033902",	//disconnected from backend through 3G/4G
@@ -1973,11 +1973,11 @@ struct InfoCodeData
 			unsigned char ERROR_CODE_BSM_ISOLATE :1;				//bit 4
 			unsigned char ERROR_CODE_BSM_OUTPUT_CONNECTOR :1;		//bit 5
 			unsigned char :2;										//bit 6 ~ 7	reserved
-			//InfoVal[39]
-			unsigned char CHADEMO_BMS_CHARGE_ALLOW_ERROR:1;			//bit 0
-			unsigned char CHADEMO_OUTPUT_VOLTAGE_MORE_THEN_10_PERCENT:1; //bit 1
-			unsigned char CHADEMO_ADC_LESS_THAN_10V:1;				//bit 2
-			unsigned char :5;										//bit 3 ~ 7	reserved
+            //InfoVal[39]
+            unsigned char CHADEMO_BMS_CHARGE_ALLOW_ERROR:1;         //bit 0
+            unsigned char CHADEMO_OUTPUT_VOLTAGE_MORE_THEN_10_PERCENT:1; //bit 1
+            unsigned char CHADEMO_ADC_LESS_THAN_10V:1;              //bit 2
+            unsigned char :5;                                       //bit 3 ~ 7 reserved
 			//InfoVal[40]
 			unsigned char BackendDisconnectedViaEthernet:1;			//bit 0
 			unsigned char BackendDisconnectViaWiFi:1;				//bit 1

BIN
EVSE/rootfs/root/OcppBackend20