Browse Source

Merge branch 'master' into DO360

Wendell 2 years ago
parent
commit
1129cfbd56
2 changed files with 12 additions and 11 deletions
  1. 2 2
      EVSE/Modularization/Module_4g.c
  2. 10 9
      EVSE/Projects/define.h

+ 2 - 2
EVSE/Modularization/Module_4g.c

@@ -1021,7 +1021,7 @@ int isReachableInternet(void)
 {
 	int result = FAIL;
 	FILE *fp;
-	char cmd[256];
+	char cmd[512];
 	char buf[512];
 	char tmp[256];
 	char isPppGetGw = FALSE;
@@ -1206,7 +1206,7 @@ int at_command(int uart, char* cmd, char* rx)
 	//sleep(2); //required to make flush work, for some reason
 	//DEBUG_INFO("cmd : %s \n", cmd);
 	tcflush(uart,TCIOFLUSH);
-	if(write(uart, cmd, strlen(cmd)) >= sizeof(cmd))
+	if(write(uart, cmd, strlen(cmd)) >= strlen(cmd))
 	{
 		usleep(500000);
 		len = read(uart, rx, 512);

+ 10 - 9
EVSE/Projects/define.h

@@ -2381,6 +2381,7 @@ struct PsuGroupData
 /*Following is the information for system all PSU*/
 struct PsuData
 {
+    unsigned char           SystemInitialPsuQuantity;       // psu quantity after ac/dc contactor on
 	unsigned char           SystemPresentPsuQuantity;
 	unsigned short          SystemAvailableCurrent;			//abcd=abc.d amp
 	unsigned int            SystemAvailablePower;			//Watt
@@ -5553,7 +5554,7 @@ struct StatusInfoType
  */
 struct Authorize_20
 {
-	unsigned char certificate[5601];                                // Optional. The X.509 certificated presented by EV for authorization.
+    unsigned char certificate[5601];                                // Optional. The X.509 certificated presented by EV for authorization.
 	struct IdTokenType idToken;										// Required. This contains the identifier that needs to be authorized.
 	struct OCSPRequestDataType iso15118CertificateHashData[4];		// Optional. Contains the information needed to verify the EV Contract Certificate via OCSP.
 	unsigned char Response_certificateStatus[32];					// Optional. Certificate status information. - if all certificates are valid: return 'Accepted'. - if one of the certificates was revoked, return 'CertificateRevoked'.
@@ -6283,14 +6284,14 @@ struct OCPP20Data
 		struct
 		{
 			//CSUMsgValue[0]
-			unsigned char ChargingProfileReq:1;	//bit 0,
-			unsigned char ChargingProfileConf:1; //bit 1
-            unsigned char ClearedChargingLimitReq :1; //bit 2
-            unsigned char ClearedChargingLimitConf :1; //bit 3
-            unsigned char NotifyEVChargingNeedsReq :1; //bit 4
-            unsigned char NotifyEVChargingNeedsConf :1; //bit 5
-            unsigned char NotifyEVChargingScheduleReq:1; //bit 6
-            unsigned char NotifyEVChargingScheduleConf:1; //bit 7
+            unsigned char ChargingProfileReq:1;	            //bit 0
+            unsigned char ChargingProfileConf:1;	        //bit 1
+            unsigned char ClearedChargingLimitReq :1;       //bit 2
+            unsigned char ClearedChargingLimitConf :1;      //bit 3
+            unsigned char NotifyEVChargingNeedsReq :1;      //bit 4
+            unsigned char NotifyEVChargingNeedsConf :1;     //bit 5
+            unsigned char NotifyEVChargingScheduleReq:1;    //bit 6
+            unsigned char NotifyEVChargingScheduleConf:1;   //bit 7
 		} bits[CONNECTOR_QUANTITY];
 	}CSUMsg;