Browse Source

2020-03-18 / Alston Lin

Action
1. Add error code for CP error
2. Fix Set Output Voltage bug

Files
1. As follow commit history
Alston 5 years ago
parent
commit
de26285e21
2 changed files with 19 additions and 7 deletions
  1. 2 3
      EVSE/Modularization/Infypwr_PsuCommObj.c
  2. 17 4
      EVSE/Projects/define.h

+ 2 - 3
EVSE/Modularization/Infypwr_PsuCommObj.c

@@ -306,7 +306,6 @@ void ReceiveDataFromCanBus()
 					break;
 			}
 		}
-
 		usleep(10000);
 	}
 }
@@ -410,8 +409,8 @@ void PresentOutputVol(byte group, int voltage, int current)
 {
 	byte data[8];
 	uint cmd = INFYPWR_CMD | PRESENT_OUT_VOL;
-	int Vol = (voltage / 10) * 1000;
-	int Cur = (current / 10) * 1000;
+	int Vol = voltage * 100;
+	int Cur = current * 100;
 
 	memset(data, 0x00, ARRAY_SIZE(data));
 

+ 17 - 4
EVSE/Projects/define.h

@@ -1028,7 +1028,17 @@ char InfoStatusCode[256][6]=
 	"023886",	//CCS:CCS_SECC_ISO1_Msg_Encode_Error
 	"023887",	//CCS:CCS_SECC_ISO2_Msg_Decode_Error
 	"023888",	//CCS:CCS_SECC_ISO2_Msg_Encode_Error
-	 //Information comes from Backend
+	"023889",	//CCS:CCS_SECC_CP_STATUS_Error
+	"013890",	//Reserved
+	"013891",	//Reserved
+	"013892",	//Reserved
+	"013893",	//Reserved
+	"013894",	//Reserved
+	"013895",	//Reserved
+	"013896",	//Reserved
+	"013897",	//Reserved
+	"013898",	//Reserved
+	"013899",	//Reserved
 	"033900",	//disconnected from backend through Ethernet
 	"033901",	//disconnected from backend through WiFi
 	"033902",	//disconnected from backend through 3G/4G
@@ -1040,10 +1050,10 @@ char InfoStatusCode[256][6]=
 };
 struct InfoCodeData
 {
-	unsigned char PreviousInfoVal[29];
+	unsigned char PreviousInfoVal[30];
 	union
 	{
-		unsigned char InfoVal[29];
+		unsigned char InfoVal[30];
 		struct
 		{
 			//InfoVal[0]
@@ -1278,8 +1288,11 @@ struct InfoCodeData
 			unsigned char CcsISO1_Msg_Encode_Error:1;			//bit 2
 			unsigned char CcsISO2_Msg_Decode_Error:1;			//bit 3
 			unsigned char CcsISO2_Msg_Encode_Error:1;			//bit 4
-			unsigned char :3;									//bit 5~7 reserved
+			unsigned char CcsCpStatus_Error:1;					//bit 5
+			unsigned char :2;									//bit 6~7 reserved
 			//InfoVal[28]
+			unsigned char :8;									//bit 0~8 reserved
+			//InfoVal[29]
 			unsigned char BackendDisconnectedViaEthernet:1;		//bit 0
 			unsigned char BackendDisconnectViaWiFi:1;				//bit 1
 			unsigned char BackendDisconnectVia4G:1;				//bit 2