Explorar o código

2020-04-08 / ct_chen

Actions:
1. add parameters on LCM UI & billing data & some module firmware version

Files:
1. as list
ct_chen %!s(int64=5) %!d(string=hai) anos
pai
achega
ee29ed280a

+ 209 - 212
EVSE/Modularization/WebService.c

@@ -343,10 +343,8 @@ int main(int argc, char *argv[]) {
 			json_object *val_obj = NULL;
 			char *SystemId=NULL;
 			char *SystemDateTime = NULL;
-//			int AcPhaseCount = 0;
 			int FactoryConfiguration = 0;
 			int AuthorisationMode = 0;
-			// int DefaultLanguage = 0;
 			int RfidCardNumEndian = 0;
 			int PsuAcInputType = 0;
 			char isAPP = NULL;
@@ -373,31 +371,31 @@ int main(int argc, char *argv[]) {
 			if( json_object_object_get_ex(jobj, "PsuAcInputType", &val_obj) ) {
 				PsuAcInputType = json_object_get_int(val_obj);
 			}
-			// if( json_object_object_get_ex(jobj, "isAPP", &val_obj) ) {
-				// isAPP = json_object_get_int(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "isQRCode", &val_obj) ) {
-				// isQRCode = json_object_get_int(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "isRFID", &val_obj) ) {
-				// isRFID = json_object_get_int(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "QRCodeMadeMode", &val_obj) ) {
-				// QRCodeMadeMode = json_object_get_int(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "QRCodeContent", &val_obj) ) {
-				// QRCodeContent = json_object_get_string(val_obj);
-			// }
+			if( json_object_object_get_ex(jobj, "isAPP", &val_obj) ) {
+				isAPP = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "isQRCode", &val_obj) ) {
+				isQRCode = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "isRFID", &val_obj) ) {
+				isRFID = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "QRCodeMadeMode", &val_obj) ) {
+				QRCodeMadeMode = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "QRCodeContent", &val_obj) ) {
+				QRCodeContent = json_object_get_string(val_obj);
+			}
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId,SystemId);
 			ShmSysConfigAndInfo->SysInfo.FactoryConfiguration = FactoryConfiguration;
 			ShmSysConfigAndInfo->SysConfig.AuthorisationMode = AuthorisationMode;
 			ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = RfidCardNumEndian;
 			ShmSysConfigAndInfo->SysConfig.PsuAcInputType = PsuAcInputType;
-			// ShmSysConfigAndInfo->SysConfig.isAPP = isAPP;
-			// ShmSysConfigAndInfo->SysConfig.isQRCode = isQRCode;
-			// ShmSysConfigAndInfo->SysConfig.isRFID = isRFID;
-			// ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode = QRCodeMadeMode;
-			// strcpy((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent,QRCodeContent);
+			ShmSysConfigAndInfo->SysConfig.isAPP = isAPP;
+			ShmSysConfigAndInfo->SysConfig.isQRCode = isQRCode;
+			ShmSysConfigAndInfo->SysConfig.isRFID = isRFID;
+			ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode = QRCodeMadeMode;
+			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent,QRCodeContent);
 
 			if(strlen(SystemDateTime)>0){
 				char cmd[100];
@@ -498,84 +496,84 @@ int main(int argc, char *argv[]) {
 			if( json_object_object_get_ex(jobj, "LocalWhiteCard9", &val_obj) ) {
 				LocalWhiteCard9 = (char*)json_object_get_string(val_obj);
 			}
-			// if( json_object_object_get_ex(jobj, "isBilling", &val_obj) ) {
-				// isBilling = json_object_get_int(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Currency", &val_obj) ) {
-				// Currency = json_object_get_int(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee0", &val_obj) ) {
-				// Fee0 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee1", &val_obj) ) {
-				// Fee1 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee2", &val_obj) ) {
-				// Fee2 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee3", &val_obj) ) {
-				// Fee3 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee4", &val_obj) ) {
-				// Fee4 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee5", &val_obj) ) {
-				// Fee5 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee6", &val_obj) ) {
-				// Fee6 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee7", &val_obj) ) {
-				// Fee7 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee8", &val_obj) ) {
-				// Fee8 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee9", &val_obj) ) {
-				// Fee9 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee10", &val_obj) ) {
-				// Fee10 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee11", &val_obj) ) {
-				// Fee11 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee12", &val_obj) ) {
-				// Fee12 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee13", &val_obj) ) {
-				// Fee13 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee14", &val_obj) ) {
-				// Fee14 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee15", &val_obj) ) {
-				// Fee15 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee16", &val_obj) ) {
-				// Fee16 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee17", &val_obj) ) {
-				// Fee17 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee18", &val_obj) ) {
-				// Fee18 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee19", &val_obj) ) {
-				// Fee19 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee20", &val_obj) ) {
-				// Fee20 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee21", &val_obj) ) {
-				// Fee21 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee22", &val_obj) ) {
-				// Fee22 = json_object_get_double(val_obj);
-			// }
-			// if( json_object_object_get_ex(jobj, "Fee23", &val_obj) ) {
-				// Fee23 = json_object_get_double(val_obj);
-			// }
+			if( json_object_object_get_ex(jobj, "isBilling", &val_obj) ) {
+				isBilling = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Currency", &val_obj) ) {
+				Currency = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee0", &val_obj) ) {
+				Fee0 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee1", &val_obj) ) {
+				Fee1 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee2", &val_obj) ) {
+				Fee2 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee3", &val_obj) ) {
+				Fee3 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee4", &val_obj) ) {
+				Fee4 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee5", &val_obj) ) {
+				Fee5 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee6", &val_obj) ) {
+				Fee6 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee7", &val_obj) ) {
+				Fee7 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee8", &val_obj) ) {
+				Fee8 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee9", &val_obj) ) {
+				Fee9 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee10", &val_obj) ) {
+				Fee10 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee11", &val_obj) ) {
+				Fee11 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee12", &val_obj) ) {
+				Fee12 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee13", &val_obj) ) {
+				Fee13 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee14", &val_obj) ) {
+				Fee14 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee15", &val_obj) ) {
+				Fee15 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee16", &val_obj) ) {
+				Fee16 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee17", &val_obj) ) {
+				Fee17 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee18", &val_obj) ) {
+				Fee18 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee19", &val_obj) ) {
+				Fee19 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee20", &val_obj) ) {
+				Fee20 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee21", &val_obj) ) {
+				Fee21 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee22", &val_obj) ) {
+				Fee22 = json_object_get_double(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "Fee23", &val_obj) ) {
+				Fee23 = json_object_get_double(val_obj);
+			}
 			ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy = MaxChargingEnergy;
 			ShmSysConfigAndInfo->SysConfig.MaxChargingPower = MaxChargingPower;
 			ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent = MaxChargingCurrent;
@@ -591,37 +589,36 @@ int main(int argc, char *argv[]) {
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[7],LocalWhiteCard7);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[8],LocalWhiteCard8);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[9],LocalWhiteCard9);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.isBilling = isBilling;
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Currency = Currency;
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[0] = rounding(Fee0);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[1] = rounding(Fee1);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[2] = rounding(Fee2);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[3] = rounding(Fee3);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[4] = rounding(Fee4);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[5] = rounding(Fee5);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[6] = rounding(Fee6);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[7] = rounding(Fee7);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[8] = rounding(Fee8);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[9] = rounding(Fee9);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[10] = rounding(Fee10);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[11] = rounding(Fee11);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[12] = rounding(Fee12);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[13] = rounding(Fee13);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[14] = rounding(Fee14);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[15] = rounding(Fee15);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[16] = rounding(Fee16);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[17] = rounding(Fee17);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[18] = rounding(Fee18);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[19] = rounding(Fee19);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[20] = rounding(Fee20);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[21] = rounding(Fee21);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[22] = rounding(Fee22);
-			// ShmSysConfigAndInfo->SysConfig.BillingData.Fee[23] = rounding(Fee23);
+			ShmSysConfigAndInfo->SysConfig.BillingData.isBilling = isBilling;
+			ShmSysConfigAndInfo->SysConfig.BillingData.Currency = Currency;
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[0] = rounding(Fee0);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[1] = rounding(Fee1);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[2] = rounding(Fee2);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[3] = rounding(Fee3);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[4] = rounding(Fee4);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[5] = rounding(Fee5);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[6] = rounding(Fee6);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[7] = rounding(Fee7);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[8] = rounding(Fee8);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[9] = rounding(Fee9);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[10] = rounding(Fee10);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[11] = rounding(Fee11);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[12] = rounding(Fee12);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[13] = rounding(Fee13);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[14] = rounding(Fee14);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[15] = rounding(Fee15);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[16] = rounding(Fee16);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[17] = rounding(Fee17);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[18] = rounding(Fee18);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[19] = rounding(Fee19);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[20] = rounding(Fee20);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[21] = rounding(Fee21);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[22] = rounding(Fee22);
+			ShmSysConfigAndInfo->SysConfig.BillingData.Fee[23] = rounding(Fee23);
 		}
 		if (strcmp(argv[1], "3") == 0) {
 			struct json_object *jobj = json_tokener_parse(argv[2]);
 			json_object *val_obj = NULL;
-			// char *FtpServer=NULL;
 			int Eth0DhcpClient=0;
 			char *Eth0IpAddress=NULL;
 			char *Eth0SubmaskAddress=NULL;
@@ -974,25 +971,25 @@ int main(int argc, char *argv[]) {
 		}
 		if(connectorType1 != 0){
 			if(connectorType1 == 1){
-				//strcpy((char *)&connector1FwVer,ShmCcsData->V2GMessage_DIN70121->version);
+//				strcpy((char *)&connector1FwVer,ShmCcsData->V2GMessage_DIN70121->version);
 //				memcpy(connector1FwVer,ShmCcsData->V2GMessage_DIN70121->version,ARRAY_SIZE(ShmCcsData->V2GMessage_DIN70121->version));
 			}
 			else if(connectorType1 == 2){
-				//strcpy((char *)&connector1FwVer,ShmGBTData->evse[0].version);
+//				strcpy((char *)&connector1FwVer,ShmGBTData->evse[0].version);
 //				memcpy(connector1FwVer,ShmGBTData->evse[0].version,ARRAY_SIZE(ShmGBTData->evse[0].version));
 			}
 			else if(connectorType1 == 3){
-				//strcpy((char *)&connector1FwVer,ShmCHAdeMOData->evse[0].version);
+//				strcpy((char *)&connector1FwVer,ShmCHAdeMOData->evse[0].version);
 //				memcpy(connector1FwVer,ShmCHAdeMOData->evse[0].version,ARRAY_SIZE(ShmCHAdeMOData->evse[0].version));
 			}
 		}
 		if(connectorType2 != 0){
 			if(connectorType2 == 1){
-				//strcpy((char *)&connector2FwVer,ShmCcsData->V2GMessage_DIN70121->version);
+//				strcpy((char *)&connector2FwVer,ShmCcsData->V2GMessage_DIN70121->version);
 //				memcpy(connector2FwVer,ShmCcsData->V2GMessage_DIN70121->version,ARRAY_SIZE(ShmCcsData->V2GMessage_DIN70121->version));
 			}
 			else if(connectorType2 == 2){
-				//strcpy((char *)&connector2FwVer,ShmGBTData->evse[gunQty].version);
+//				strcpy((char *)&connector2FwVer,ShmGBTData->evse[gunQty].version);
 //				memcpy(connector2FwVer,ShmGBTData->evse[gunQty].version,ARRAY_SIZE(ShmGBTData->evse[gunQty].version));
 			}
 			else if(connectorType2 == 3){
@@ -1022,11 +1019,11 @@ int main(int argc, char *argv[]) {
 		struct json_object *PsuAcInputType;
 		struct json_object *RatingCurrent;
 		struct json_object *AcRatingCurrent;
-		// struct json_object *isAPP;
-		// struct json_object *isQRCode;
-		// struct json_object *isRFID;
-		// struct json_object *QRCodeMadeMode;
-		// struct json_object *QRCodeContent;
+		struct json_object *isAPP;
+		struct json_object *isQRCode;
+		struct json_object *isRFID;
+		struct json_object *QRCodeMadeMode;
+		struct json_object *QRCodeContent;
 		struct json_object *AuxPower5V;
 		struct json_object *AuxPower12V;
 		struct json_object *AuxPower24V;
@@ -1069,10 +1066,10 @@ int main(int argc, char *argv[]) {
 		struct json_object *PhaseLossPolicy;
 		struct json_object *LocalWhiteCard[10];
 		struct json_object *LocalWhiteCardArr= json_object_new_array();
-		// struct json_object *isBilling;
-		// struct json_object *Currency;
-		// struct json_object *Fee[24];
-		// struct json_object *FeeArr= json_object_new_array();
+		struct json_object *isBilling;
+		struct json_object *Currency;
+		struct json_object *Fee[24];
+		struct json_object *FeeArr= json_object_new_array();
 		struct json_object *ChargingInfo1;
 		struct json_object *ChargingInfo2;
 		struct json_object *ChargingInfo3;
@@ -1160,12 +1157,12 @@ int main(int argc, char *argv[]) {
 		RfidCardNumEndian = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
 		PsuAcInputType = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PsuAcInputType);
 		RatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RatingCurrent);
-		// AcRatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcRatingCurrent);
-		// isAPP = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isAPP);
-		// isQRCode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isQRCode);
-		// isRFID = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isRFID);
-		// QRCodeMadeMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode);
-		// QRCodeContent = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent);
+		AcRatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcRatingCurrent);
+		isAPP = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isAPP);
+		isQRCode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isQRCode);
+		isRFID = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isRFID);
+		QRCodeMadeMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode);
+		QRCodeContent = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent);
 		AuxPower5V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower5V);
 		AuxPower12V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower12V);
 		AuxPower24V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower24V);
@@ -1187,9 +1184,9 @@ int main(int argc, char *argv[]) {
 		RelayModuleHwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.RelayModuleHwRev);
 		RelayModuleFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev);
 		TelcomModemFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.TelcomModemFwRev);
-		// Connector1FwRev = json_object_new_string((char *)&connector1FwVer);
-		// Connector2FwRev = json_object_new_string((char *)&connector2FwVer);
-		//LedModuleFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.LedModuleFwRev);
+		Connector1FwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.Connector1FwRev);
+		Connector2FwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.Connector2FwRev);
+		LedModuleFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.LedModuleFwRev);
 		SystemAmbientTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemAmbientTemp);
 		SystemCriticalTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemCriticalTemp);
 		CcsConnectorTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsConnectorTemp);
@@ -1223,32 +1220,32 @@ int main(int argc, char *argv[]) {
 		LocalWhiteCard[7] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[7]);
 		LocalWhiteCard[8] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[8]);
 		LocalWhiteCard[9] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[9]);
-		// isBilling = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BillingData.isBilling);
-		// Currency = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BillingData.Currency);
-		// Fee[0] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[0]);
-		// Fee[1] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[1]);
-		// Fee[2] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[2]);
-		// Fee[3] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[3]);
-		// Fee[4] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[4]);
-		// Fee[5] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[5]);
-		// Fee[6] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[6]);
-		// Fee[7] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[7]);
-		// Fee[8] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[8]);
-		// Fee[9] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[9]);
-		// Fee[10] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[10]);
-		// Fee[11] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[11]);
-		// Fee[12] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[12]);
-		// Fee[13] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[13]);
-		// Fee[14] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[14]);
-		// Fee[15] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[15]);
-		// Fee[16] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[16]);
-		// Fee[17] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[17]);
-		// Fee[18] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[18]);
-		// Fee[19] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[19]);
-		// Fee[20] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[20]);
-		// Fee[21] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[21]);
-		// Fee[22] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[22]);
-		// Fee[23] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[23]);
+		isBilling = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BillingData.isBilling);
+		Currency = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BillingData.Currency);
+		Fee[0] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[0]);
+		Fee[1] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[1]);
+		Fee[2] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[2]);
+		Fee[3] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[3]);
+		Fee[4] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[4]);
+		Fee[5] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[5]);
+		Fee[6] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[6]);
+		Fee[7] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[7]);
+		Fee[8] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[8]);
+		Fee[9] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[9]);
+		Fee[10] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[10]);
+		Fee[11] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[11]);
+		Fee[12] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[12]);
+		Fee[13] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[13]);
+		Fee[14] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[14]);
+		Fee[15] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[15]);
+		Fee[16] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[16]);
+		Fee[17] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[17]);
+		Fee[18] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[18]);
+		Fee[19] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[19]);
+		Fee[20] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[20]);
+		Fee[21] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[21]);
+		Fee[22] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[22]);
+		Fee[23] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[23]);
 		if(connectorType1 != 0){
 			if(connectorType1 == 1){//CCS
 				PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage);
@@ -1581,12 +1578,12 @@ int main(int argc, char *argv[]) {
 		json_object_object_add(jobj1,"RfidCardNumEndian",RfidCardNumEndian);
 		json_object_object_add(jobj1,"PsuAcInputType",PsuAcInputType);
 		json_object_object_add(jobj1,"RatingCurrent",RatingCurrent);
-		// json_object_object_add(jobj1,"AcRatingCurrent",AcRatingCurrent);
-		// json_object_object_add(jobj1,"isAPP",isAPP);
-		// json_object_object_add(jobj1,"isQRCode",isQRCode);
-		// json_object_object_add(jobj1,"isRFID",isRFID);
-		// json_object_object_add(jobj1,"QRCodeMadeMode",QRCodeMadeMode);
-		// json_object_object_add(jobj1,"QRCodeContent",QRCodeContent);
+		json_object_object_add(jobj1,"AcRatingCurrent",AcRatingCurrent);
+		json_object_object_add(jobj1,"isAPP",isAPP);
+		json_object_object_add(jobj1,"isQRCode",isQRCode);
+		json_object_object_add(jobj1,"isRFID",isRFID);
+		json_object_object_add(jobj1,"QRCodeMadeMode",QRCodeMadeMode);
+		json_object_object_add(jobj1,"QRCodeContent",QRCodeContent);
 		json_object_object_add(jobj1,"AuxPower5V",AuxPower5V);
 		json_object_object_add(jobj1,"AuxPower12V",AuxPower12V);
 		json_object_object_add(jobj1,"AuxPower24V",AuxPower24V);
@@ -1608,9 +1605,9 @@ int main(int argc, char *argv[]) {
 		json_object_object_add(jobj1,"RelayModuleHwRev",RelayModuleHwRev);
 		json_object_object_add(jobj1,"RelayModuleFwRev",RelayModuleFwRev);
 		json_object_object_add(jobj1,"TelcomModemFwRev",TelcomModemFwRev);
-		// json_object_object_add(jobj1,"Connector1FwRev",Connector1FwRev);
-		// json_object_object_add(jobj1,"Connector2FwRev",Connector2FwRev);
-		// json_object_object_add(jobj1,"LedModuleFwRev",LedModuleFwRev);
+		json_object_object_add(jobj1,"Connector1FwRev",Connector1FwRev);
+		json_object_object_add(jobj1,"Connector2FwRev",Connector2FwRev);
+		json_object_object_add(jobj1,"LedModuleFwRev",LedModuleFwRev);
 		json_object_object_add(jobj1,"SystemAmbientTemp",SystemAmbientTemp);
 		json_object_object_add(jobj1,"SystemCriticalTemp",SystemCriticalTemp);
 		json_object_object_add(jobj1,"CcsConnectorTemp",CcsConnectorTemp);
@@ -1640,33 +1637,33 @@ int main(int argc, char *argv[]) {
 		json_object_array_add(LocalWhiteCardArr,LocalWhiteCard[8]);
 		json_object_array_add(LocalWhiteCardArr,LocalWhiteCard[9]);
 		json_object_object_add(jobj2,"LocalWhiteCard",LocalWhiteCardArr);
-		// json_object_object_add(jobj2,"isBilling",isBilling);
-		// json_object_object_add(jobj2,"Currency",Currency);
-		// json_object_array_add(FeeArr,Fee[0]);
-		// json_object_array_add(FeeArr,Fee[1]);
-		// json_object_array_add(FeeArr,Fee[2]);
-		// json_object_array_add(FeeArr,Fee[3]);
-		// json_object_array_add(FeeArr,Fee[4]);
-		// json_object_array_add(FeeArr,Fee[5]);
-		// json_object_array_add(FeeArr,Fee[6]);
-		// json_object_array_add(FeeArr,Fee[7]);
-		// json_object_array_add(FeeArr,Fee[8]);
-		// json_object_array_add(FeeArr,Fee[9]);
-		// json_object_array_add(FeeArr,Fee[10]);
-		// json_object_array_add(FeeArr,Fee[11]);
-		// json_object_array_add(FeeArr,Fee[12]);
-		// json_object_array_add(FeeArr,Fee[13]);
-		// json_object_array_add(FeeArr,Fee[14]);
-		// json_object_array_add(FeeArr,Fee[15]);
-		// json_object_array_add(FeeArr,Fee[16]);
-		// json_object_array_add(FeeArr,Fee[17]);
-		// json_object_array_add(FeeArr,Fee[18]);
-		// json_object_array_add(FeeArr,Fee[19]);
-		// json_object_array_add(FeeArr,Fee[20]);
-		// json_object_array_add(FeeArr,Fee[21]);
-		// json_object_array_add(FeeArr,Fee[22]);
-		// json_object_array_add(FeeArr,Fee[23]);
-		// json_object_object_add(jobj2,"Fee",FeeArr);
+		json_object_object_add(jobj2,"isBilling",isBilling);
+		json_object_object_add(jobj2,"Currency",Currency);
+		json_object_array_add(FeeArr,Fee[0]);
+		json_object_array_add(FeeArr,Fee[1]);
+		json_object_array_add(FeeArr,Fee[2]);
+		json_object_array_add(FeeArr,Fee[3]);
+		json_object_array_add(FeeArr,Fee[4]);
+		json_object_array_add(FeeArr,Fee[5]);
+		json_object_array_add(FeeArr,Fee[6]);
+		json_object_array_add(FeeArr,Fee[7]);
+		json_object_array_add(FeeArr,Fee[8]);
+		json_object_array_add(FeeArr,Fee[9]);
+		json_object_array_add(FeeArr,Fee[10]);
+		json_object_array_add(FeeArr,Fee[11]);
+		json_object_array_add(FeeArr,Fee[12]);
+		json_object_array_add(FeeArr,Fee[13]);
+		json_object_array_add(FeeArr,Fee[14]);
+		json_object_array_add(FeeArr,Fee[15]);
+		json_object_array_add(FeeArr,Fee[16]);
+		json_object_array_add(FeeArr,Fee[17]);
+		json_object_array_add(FeeArr,Fee[18]);
+		json_object_array_add(FeeArr,Fee[19]);
+		json_object_array_add(FeeArr,Fee[20]);
+		json_object_array_add(FeeArr,Fee[21]);
+		json_object_array_add(FeeArr,Fee[22]);
+		json_object_array_add(FeeArr,Fee[23]);
+		json_object_object_add(jobj2,"Fee",FeeArr);
 		if(connectorType1 != 0){
 			json_object_object_add(ChargingInfo1,"StartUserId",StartUserId[0]);
 			json_object_object_add(ChargingInfo1,"StartDateTime",StartDateTime[0]);

+ 2 - 0
EVSE/Projects/define.h

@@ -448,6 +448,8 @@ struct SysInfoData
 	unsigned char RelayModuleFwRev[32];	//Relay control  module firmware version
 	unsigned char TelcomModemFwRev[32];	//the 3G/4G modem firmware version
 	unsigned char LedModuleFwRev[32];	//LED control module firmware version
+	unsigned char Connector1FwRev[32];	//Connector1 module firmware version
+	unsigned char Connector2FwRev[32];	//Connector2 module firmware version
 	int SystemAmbientTemp;		// -40 ~ 215 degree C
 	int SystemCriticalTemp;		// -40 ~ 215 degree C
 	int CcsConnectorTemp;		// -40 ~ 215 degree C

+ 34 - 35
EVSE/rootfs/var/www/set_charging.php

@@ -9,8 +9,8 @@
 	$ModelName = $system['ModelName'];
 	$RatingPower = substr($ModelName,4,2)*pow(10,-1+substr($ModelName,6,1));
 	$Connector1=substr($ModelName,7,1);
-	$Connector2=substr($ModelName,8,1);
-	$Connector3=substr($ModelName,9,1);
+	$Connector2=substr($ModelName,9,1);
+	$Connector3=substr($ModelName,8,1);
 	$connectorType1=ConnectorType($Connector1);
 	$connectorType2=ConnectorType($Connector2);
 	$connectorType3=ConnectorType($Connector3);
@@ -358,7 +358,6 @@ img {
 											<label>Local White Card9</label>
 											<input type="text" name="LocalWhiteCard9" id="LocalWhiteCard9" class="form-control" value="<?php echo $obj['LocalWhiteCard'][9];?>">
 										</div>
-<?php /* LCM UI 相關參數
 										<div class="form-group"  id="isBillingDiv">
 											<label>
 											<input type="checkbox" id="isBilling" name="isBilling" <?php echo $obj['isBilling']==1?"checked":"";?> onclick="isBilling_clicked()">
@@ -520,7 +519,7 @@ img {
 												<label>Fee 23:00~23:59</label>
 												<input type="text" name="Fee23" id="Fee23" class="form-control" value="<?php echo round($obj['Fee'][23],2);?>">
 											</div>
-										</div>*/?>
+										</div>
 <?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>CcsAuthentication</label>
 											<select class="form-control" id="CcsAuthentication" name="CcsAuthentication">
@@ -540,7 +539,7 @@ img {
 <?php if($obj['ChargingInfo1']){ $idx++;?>
 								<!--Charging Information-->
 								<article class="envor-sorting-item css">
-									<header><?php echo $connectorType1." ".$lang->showWord("charging_information")."(connector".$idx.")"; ?><i class="fa fa-plus"></i></header>
+									<header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType1.")"; ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>User Id</label>
@@ -623,7 +622,7 @@ img {
 <?php if($obj['ChargingInfo2']){ $idx++;?>
 								<!--Charging Information-->
 								<article class="envor-sorting-item css">
-									<header><?php echo $connectorType2." ".$lang->showWord("charging_information")."(connector".$idx.")"; ?><i class="fa fa-plus"></i></header>
+									<header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType2.")"; ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>User Id</label>
@@ -706,7 +705,7 @@ img {
 <?php if($obj['ChargingInfo3']){ $idx++;?>
 								<!--Charging Information-->
 								<article class="envor-sorting-item css">
-									<header><?php echo $connectorType3." ".$lang->showWord("charging_information")."(connector".$idx.")"; ?><i class="fa fa-plus"></i></header>
+									<header><?php echo "connector".$idx." ".$lang->showWord("charging_information")."(".$connectorType3.")"; ?><i class="fa fa-plus"></i></header>
 									<section>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>User Id</label>
@@ -824,7 +823,7 @@ img {
 		else{
 			document.getElementById("AcMaxChargingCurrentDiv").style.display="none";
 		}
-//		isBilling_clicked();
+		isBilling_clicked();
 	});
 
 	document.getElementById("save").onclick = function() {
@@ -852,33 +851,33 @@ img {
 						"&LocalWhiteCard6=" + document.getElementById("LocalWhiteCard6").value+
 						"&LocalWhiteCard7=" + document.getElementById("LocalWhiteCard7").value+
 						"&LocalWhiteCard8=" + document.getElementById("LocalWhiteCard8").value+
-						"&LocalWhiteCard9=" + document.getElementById("LocalWhiteCard9").value;
-						// "&isBilling=" + (document.getElementById("isBilling").checked?1:0)+
-						// "&Currency=" + document.getElementById("Currency").value+
-						// "&Fee0=" + document.getElementById("Fee0").value+
-						// "&Fee1=" + document.getElementById("Fee1").value+
-						// "&Fee2=" + document.getElementById("Fee2").value+
-						// "&Fee3=" + document.getElementById("Fee3").value+
-						// "&Fee4=" + document.getElementById("Fee4").value+
-						// "&Fee5=" + document.getElementById("Fee5").value+
-						// "&Fee6=" + document.getElementById("Fee6").value+
-						// "&Fee7=" + document.getElementById("Fee7").value+
-						// "&Fee8=" + document.getElementById("Fee8").value+
-						// "&Fee9=" + document.getElementById("Fee9").value+
-						// "&Fee10=" + document.getElementById("Fee10").value+
-						// "&Fee11=" + document.getElementById("Fee11").value+
-						// "&Fee12=" + document.getElementById("Fee12").value+
-						// "&Fee13=" + document.getElementById("Fee13").value+
-						// "&Fee14=" + document.getElementById("Fee14").value+
-						// "&Fee15=" + document.getElementById("Fee15").value+
-						// "&Fee16=" + document.getElementById("Fee16").value+
-						// "&Fee17=" + document.getElementById("Fee17").value+
-						// "&Fee18=" + document.getElementById("Fee18").value+
-						// "&Fee19=" + document.getElementById("Fee19").value+
-						// "&Fee20=" + document.getElementById("Fee20").value+
-						// "&Fee21=" + document.getElementById("Fee21").value+
-						// "&Fee22=" + document.getElementById("Fee22").value+
-						// "&Fee23=" + document.getElementById("Fee23").value;
+						"&LocalWhiteCard9=" + document.getElementById("LocalWhiteCard9").value+
+						"&isBilling=" + (document.getElementById("isBilling").checked?1:0)+
+						"&Currency=" + document.getElementById("Currency").value+
+						"&Fee0=" + document.getElementById("Fee0").value+
+						"&Fee1=" + document.getElementById("Fee1").value+
+						"&Fee2=" + document.getElementById("Fee2").value+
+						"&Fee3=" + document.getElementById("Fee3").value+
+						"&Fee4=" + document.getElementById("Fee4").value+
+						"&Fee5=" + document.getElementById("Fee5").value+
+						"&Fee6=" + document.getElementById("Fee6").value+
+						"&Fee7=" + document.getElementById("Fee7").value+
+						"&Fee8=" + document.getElementById("Fee8").value+
+						"&Fee9=" + document.getElementById("Fee9").value+
+						"&Fee10=" + document.getElementById("Fee10").value+
+						"&Fee11=" + document.getElementById("Fee11").value+
+						"&Fee12=" + document.getElementById("Fee12").value+
+						"&Fee13=" + document.getElementById("Fee13").value+
+						"&Fee14=" + document.getElementById("Fee14").value+
+						"&Fee15=" + document.getElementById("Fee15").value+
+						"&Fee16=" + document.getElementById("Fee16").value+
+						"&Fee17=" + document.getElementById("Fee17").value+
+						"&Fee18=" + document.getElementById("Fee18").value+
+						"&Fee19=" + document.getElementById("Fee19").value+
+						"&Fee20=" + document.getElementById("Fee20").value+
+						"&Fee21=" + document.getElementById("Fee21").value+
+						"&Fee22=" + document.getElementById("Fee22").value+
+						"&Fee23=" + document.getElementById("Fee23").value;
 			
 			// POST 請求必須設置表頭在 open() 下面,send() 上面
 			request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

+ 26 - 26
EVSE/rootfs/var/www/set_charging_action.php

@@ -44,32 +44,32 @@
 		$json['LocalWhiteCard7']			= isset($_POST['LocalWhiteCard7'])?$_POST['LocalWhiteCard7']:"";
 		$json['LocalWhiteCard8']			= isset($_POST['LocalWhiteCard8'])?$_POST['LocalWhiteCard8']:"";
 		$json['LocalWhiteCard9']			= isset($_POST['LocalWhiteCard9'])?$_POST['LocalWhiteCard9']:"";
-		// $json['isBilling']					= (int)$_POST['isBilling'];
-		// $json['Currency']					= (int)$_POST['Currency'];
-		// $json['Fee0']						= isset($_POST['Fee0'])?round($_POST['Fee0'], 2):"";
-		// $json['Fee1']						= isset($_POST['Fee1'])?round($_POST['Fee1'], 2):"";
-		// $json['Fee2']						= isset($_POST['Fee2'])?round($_POST['Fee2'], 2):"";
-		// $json['Fee3']						= isset($_POST['Fee3'])?round($_POST['Fee3'], 2):"";
-		// $json['Fee4']						= isset($_POST['Fee4'])?round($_POST['Fee4'], 2):"";
-		// $json['Fee5']						= isset($_POST['Fee5'])?round($_POST['Fee5'], 2):"";
-		// $json['Fee6']						= isset($_POST['Fee6'])?round($_POST['Fee6'], 2):"";
-		// $json['Fee7']						= isset($_POST['Fee7'])?round($_POST['Fee7'], 2):"";
-		// $json['Fee8']						= isset($_POST['Fee8'])?round($_POST['Fee8'], 2):"";
-		// $json['Fee9']						= isset($_POST['Fee9'])?round($_POST['Fee9'], 2):"";
-		// $json['Fee10']						= isset($_POST['Fee10'])?round($_POST['Fee10'], 2):"";
-		// $json['Fee11']						= isset($_POST['Fee11'])?round($_POST['Fee11'], 2):"";
-		// $json['Fee12']						= isset($_POST['Fee12'])?round($_POST['Fee12'], 2):"";
-		// $json['Fee13']						= isset($_POST['Fee13'])?round($_POST['Fee13'], 2):"";
-		// $json['Fee14']						= isset($_POST['Fee14'])?round($_POST['Fee14'], 2):"";
-		// $json['Fee15']						= isset($_POST['Fee15'])?round($_POST['Fee15'], 2):"";
-		// $json['Fee16']						= isset($_POST['Fee16'])?round($_POST['Fee16'], 2):"";
-		// $json['Fee17']						= isset($_POST['Fee17'])?round($_POST['Fee17'], 2):"";
-		// $json['Fee18']						= isset($_POST['Fee18'])?round($_POST['Fee18'], 2):"";
-		// $json['Fee19']						= isset($_POST['Fee19'])?round($_POST['Fee19'], 2):"";
-		// $json['Fee20']						= isset($_POST['Fee20'])?round($_POST['Fee20'], 2):"";
-		// $json['Fee21']						= isset($_POST['Fee21'])?round($_POST['Fee21'], 2):"";
-		// $json['Fee22']						= isset($_POST['Fee22'])?round($_POST['Fee22'], 2):"";
-		// $json['Fee23']						= isset($_POST['Fee23'])?round($_POST['Fee23'], 2):"";
+		$json['isBilling']					= (int)$_POST['isBilling'];
+		$json['Currency']					= (int)$_POST['Currency'];
+		$json['Fee0']						= isset($_POST['Fee0'])?round($_POST['Fee0'], 2):"";
+		$json['Fee1']						= isset($_POST['Fee1'])?round($_POST['Fee1'], 2):"";
+		$json['Fee2']						= isset($_POST['Fee2'])?round($_POST['Fee2'], 2):"";
+		$json['Fee3']						= isset($_POST['Fee3'])?round($_POST['Fee3'], 2):"";
+		$json['Fee4']						= isset($_POST['Fee4'])?round($_POST['Fee4'], 2):"";
+		$json['Fee5']						= isset($_POST['Fee5'])?round($_POST['Fee5'], 2):"";
+		$json['Fee6']						= isset($_POST['Fee6'])?round($_POST['Fee6'], 2):"";
+		$json['Fee7']						= isset($_POST['Fee7'])?round($_POST['Fee7'], 2):"";
+		$json['Fee8']						= isset($_POST['Fee8'])?round($_POST['Fee8'], 2):"";
+		$json['Fee9']						= isset($_POST['Fee9'])?round($_POST['Fee9'], 2):"";
+		$json['Fee10']						= isset($_POST['Fee10'])?round($_POST['Fee10'], 2):"";
+		$json['Fee11']						= isset($_POST['Fee11'])?round($_POST['Fee11'], 2):"";
+		$json['Fee12']						= isset($_POST['Fee12'])?round($_POST['Fee12'], 2):"";
+		$json['Fee13']						= isset($_POST['Fee13'])?round($_POST['Fee13'], 2):"";
+		$json['Fee14']						= isset($_POST['Fee14'])?round($_POST['Fee14'], 2):"";
+		$json['Fee15']						= isset($_POST['Fee15'])?round($_POST['Fee15'], 2):"";
+		$json['Fee16']						= isset($_POST['Fee16'])?round($_POST['Fee16'], 2):"";
+		$json['Fee17']						= isset($_POST['Fee17'])?round($_POST['Fee17'], 2):"";
+		$json['Fee18']						= isset($_POST['Fee18'])?round($_POST['Fee18'], 2):"";
+		$json['Fee19']						= isset($_POST['Fee19'])?round($_POST['Fee19'], 2):"";
+		$json['Fee20']						= isset($_POST['Fee20'])?round($_POST['Fee20'], 2):"";
+		$json['Fee21']						= isset($_POST['Fee21'])?round($_POST['Fee21'], 2):"";
+		$json['Fee22']						= isset($_POST['Fee22'])?round($_POST['Fee22'], 2):"";
+		$json['Fee23']						= isset($_POST['Fee23'])?round($_POST['Fee23'], 2):"";
 		
 //		ob_start();
 		

+ 39 - 207
EVSE/rootfs/var/www/set_system.php

@@ -18,8 +18,8 @@
 	$ModelName = $obj->{'ModelName'};
 	$RatingPower = substr($ModelName,4,2)*pow(10,-1+substr($ModelName,6,1));
 	$Connector1=substr($ModelName,7,1);
-	$Connector2=substr($ModelName,8,1);
-	$Connector3=substr($ModelName,9,1);
+	$Connector2=substr($ModelName,9,1);
+	$Connector3=substr($ModelName,8,1);
 	$connectorType1=ConnectorType($Connector1);
 	$connectorType2=ConnectorType($Connector2);
 	$connectorType3=ConnectorType($Connector3);
@@ -106,19 +106,7 @@ img {
 													<span class="glyphicon glyphicon-calendar"></span>
 												</span>
 											</div>
-											<!--<input type="hidden" name="SystemDateTime" id="SystemDateTime" value="<?php echo $obj->{'SystemDateTime'};?>">-->
 										</div>
-<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>AcPhaseCount</label>
-											<select class="form-control" id="AcPhaseCount" name="AcPhaseCount">
-												<option value="1" <?php echo $obj->{'AcPhaseCount'}=="1"?"selected":""?>>One phase</option>
-												<option value="3" <?php echo $obj->{'AcPhaseCount'}=="3"?"selected":""?>>Three phase</option>
-											</select>
-										</div>*/?>
-<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>AcPhaseCount</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $AcPhaseCount;?>">
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>
 											<input type="checkbox" id="FactoryConfiguration" name="FactoryConfiguration" <?php echo $obj->{'FactoryConfiguration'}==1?"checked":"";?>>
@@ -129,34 +117,13 @@ img {
 											</select>*/?>
 										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>
-											<input type="checkbox" id="AuthorisationMode" name="AuthorisationMode" <?php echo $obj->{'AuthorisationMode'}==0?"checked":"";?>>
-											Authorisation</label>
-<?php /*											<select type="text" class="form-control" id="AuthorisationMode" name="AuthorisationMode" onchange="AuthorisationMode_changed();">
-												<option value="0" <?php echo $obj->{'AuthorisationMode'}=="0"?"selected":""?>>OCPP backend</option>
-												<option value="1" <?php echo $obj->{'AuthorisationMode'}=="1"?"selected":""?>>free mode</option>
+											<label>Authentication</label>
+											<select type="text" class="form-control" id="AuthorisationMode" name="AuthorisationMode" <?php //onchange="AuthorisationMode_changed();"?>>
+												<option value="0" <?php echo $obj->{'AuthorisationMode'}=="0"?"selected":""?>>enable</option>
+												<option value="1" <?php echo $obj->{'AuthorisationMode'}=="1"?"selected":""?>>disable</option>
 											</select>
-											<small class="form-text text-muted-red"><label id="AuthorisationModeText" style="display:none;">You should set parameter about OCPP after this setting</label></small>*/?>
+<?php /*											<small class="form-text text-muted-red"><label id="AuthorisationModeText" style="display:none;">You should set parameter about OCPP after this setting</label></small> */?>
 										</div>
-<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Default Language</label>
-											<select class="form-control" id="DefaultLanguage" name="DefaultLanguage">
-												<option value="0" <?php echo $obj->{'DefaultLanguage'}=="0"?"selected":""?>>English</option>
-												<option value="1" <?php echo $obj->{'DefaultLanguage'}=="1"?"selected":""?>>繁體中文</option>
-												<option value="2" <?php echo $obj->{'DefaultLanguage'}=="2"?"selected":""?>>简体中文</option>
-												<option value="3" <?php echo $obj->{'DefaultLanguage'}=="3"?"selected":""?>>日本語</option>
-												<option value="4" <?php echo $obj->{'DefaultLanguage'}=="4"?"selected":""?>>Français</option>
-												<option value="5" <?php echo $obj->{'DefaultLanguage'}=="5"?"selected":""?>>Italiano</option>
-												<option value="6" <?php echo $obj->{'DefaultLanguage'}=="6"?"selected":""?>>Español</option>
-												<option value="7" <?php echo $obj->{'DefaultLanguage'}=="7"?"selected":""?>>Deutsch</option>
-												<option value="8" <?php echo $obj->{'DefaultLanguage'}=="8"?"selected":""?>>Nederland</option>
-												<option value="9" <?php echo $obj->{'DefaultLanguage'}=="9"?"selected":""?>>Norsk</option>
-												<option value="10" <?php echo $obj->{'DefaultLanguage'}=="10"?"selected":""?>>Suomalainen</option>
-												<option value="11" <?php echo $obj->{'DefaultLanguage'}=="11"?"selected":""?>>Svenska</option>
-												<option value="12" <?php echo $obj->{'DefaultLanguage'}=="12"?"selected":""?>>Pусский</option>
-												<option value="13" <?php echo $obj->{'DefaultLanguage'}=="13"?"selected":""?>> ไทย</option>
-											</select>
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>Input Voltage R</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'InputVoltageR'};?> volt">
@@ -177,11 +144,6 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'SystemFanRotaSpeed'};?> RPM">
 											<input type="hidden" name="SystemFanRotaSpeed" id="SystemFanRotaSpeed" value="<?php echo $obj->{'SystemFanRotaSpeed'};?>">
 										</div>
-<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PsuFanRotaSpeed</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuFanRotaSpeed'};?> RPM">
-											<input type="hidden" name="PsuFanRotaSpeed" id="PsuFanRotaSpeed" value="<?php echo $obj->{'PsuFanRotaSpeed'};?>">
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>Rfid Card Num Endian</label>
 											<select class="form-control" id="RfidCardNumEndian" name="RfidCardNumEndian">
@@ -206,7 +168,6 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AcRatingCurrent'};?> amp">
 											<input type="hidden" name="AcRatingCurrent" id="AcRatingCurrent" value="<?php echo $obj->{'AcRatingCurrent'};?>">
 										</div>
-<?php /* LCM UI 相關參數, 待主程式完成後再處理
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label id="isAPPLabel">
 											<input type="checkbox" id="isAPP" name="isAPP" <?php echo $obj->{'isAPP'}==1?"checked":"";?>>
@@ -228,44 +189,12 @@ img {
 										<div class="form-group" id="QRCodeContentDiv">
 											<label>QR Code Content</label>
 											<input type="text" name="QRCodeContent" id="QRCodeContent" class="form-control" placeholder="<?php echo $obj->{'QRCodeContent'};?>" value="<?php echo $obj->{'QRCodeContent'};?>">
-										</div>*/?>
-									</section>
-								</article>
-<?php /*								<!--Aux. power Information-->
-								<article class="envor-sorting-item css" style="display:<?php echo $am001;?>">
-									<header><?php echo $lang->showWord("aux_power_information"); ?><i class="fa fa-plus"></i></header>
-									<section>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Aux Power 5V</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPower5V'};?> volt">
-											<input type="hidden" name="AuxPower5V" id="AuxPower5V" value="<?php echo $obj->{'AuxPower5V'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Aux Power 12V</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPower12V'};?> volt">
-											<input type="hidden" name="AuxPower12V" id="AuxPower12V" value="<?php echo $obj->{'AuxPower12V'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Aux Power 24V</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPower24V'};?> volt">
-											<input type="hidden" name="AuxPower24V" id="AuxPower24V" value="<?php echo $obj->{'AuxPower24V'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Aux Power 48V</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPower48V'};?> volt">
-											<input type="hidden" name="AuxPower48V" id="AuxPower48V" value="<?php echo $obj->{'AuxPower48V'};?>">
 										</div>
 									</section>
-								</article>*/?>
-								<!--Version Information-->
+								</article>
 								<article class="envor-sorting-item css">
 									<header><?php echo $lang->showWord("version_information"); ?><i class="fa fa-plus"></i></header>
 									<section>
-<?php /*										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>CsuHwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuHwRev'};?>">
-											<input type="hidden" name="CsuHwRev" id="CsuHwRev" value="<?php echo $obj->{'CsuHwRev'};?>">
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>Csu Boot Load Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuBootLoadFwRev'};?>">
@@ -286,21 +215,6 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CsuPrimFwRev'};?>">
 											<input type="hidden" name="CsuPrimFwRev" id="CsuPrimFwRev" value="<?php echo $obj->{'CsuPrimFwRev'};?>">
 										</div>
-<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>LcmHwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'LcmHwRev'};?>">
-											<input type="hidden" name="LcmHwRev" id="LcmHwRev" value="<?php echo $obj->{'LcmHwRev'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>LcmFwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'LcmFwRev'};?>">
-											<input type="hidden" name="LcmFwRev" id="LcmFwRev" value="<?php echo $obj->{'LcmFwRev'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>PsuHwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuHwRev'};?>">
-											<input type="hidden" name="PsuHwRev" id="PsuHwRev" value="<?php echo $obj->{'PsuHwRev'};?>">
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Psu Prim Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuPrimFwRev'};?>">
@@ -311,31 +225,11 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuSecFwRev'};?>">
 											<input type="hidden" name="PsuSecFwRev" id="PsuSecFwRev" value="<?php echo $obj->{'PsuSecFwRev'};?>">
 										</div>
-<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>AuxPwrHwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPwrHwRev'};?>">
-											<input type="hidden" name="AuxPwrHwRev" id="AuxPwrHwRev" value="<?php echo $obj->{'AuxPwrHwRev'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>AuxPwrFwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AuxPwrFwRev'};?>">
-											<input type="hidden" name="AuxPwrFwRev" id="AuxPwrFwRev" value="<?php echo $obj->{'AuxPwrFwRev'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>FanModuleHwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'FanModuleHwRev'};?>">
-											<input type="hidden" name="FanModuleHwRev" id="FanModuleHwRev" value="<?php echo $obj->{'FanModuleHwRev'};?>">
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Fan Module Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'FanModuleFwRev'};?>">
 											<input type="hidden" name="FanModuleFwRev" id="FanModuleFwRev" value="<?php echo $obj->{'FanModuleFwRev'};?>">
 										</div>
-<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>RelayModuleHwRev</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'RelayModuleHwRev'};?>">
-											<input type="hidden" name="RelayModuleHwRev" id="RelayModuleHwRev" value="<?php echo $obj->{'RelayModuleHwRev'};?>">
-										</div>*/?>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Relay Module Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'RelayModuleFwRev'};?>">
@@ -346,7 +240,7 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'TelcomModemFwRev'};?>">
 											<input type="hidden" name="TelcomModemFwRev" id="TelcomModemFwRev" value="<?php echo $obj->{'TelcomModemFwRev'};?>">
 										</div>
-<?php /*										<div class="form-group" id="Connector1FwRevDiv">
+										<div class="form-group" id="Connector1FwRevDiv">
 											<label>Connector1(<?php echo $connectorType1;?>) Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'Connector1FwRev'};?>">
 											<input type="hidden" name="Connector1FwRev" id="Connector1FwRev" value="<?php echo $obj->{'Connector1FwRev'};?>">
@@ -355,71 +249,14 @@ img {
 											<label>Connector2(<?php echo $connectorType2;?>) Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'Connector2FwRev'};?>">
 											<input type="hidden" name="Connector2FwRev" id="Connector2FwRev" value="<?php echo $obj->{'Connector2FwRev'};?>">
-										</div>*/?>
-<?php /*										<div class="form-group" style="display:<?php echo $am001;?>">
+										</div>
+										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Led Module Fw Rev</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'LedModuleFwRev'};?>">
 											<input type="hidden" name="LedModuleFwRev" id="LedModuleFwRev" value="<?php echo $obj->{'LedModuleFwRev'};?>">
-										</div>*/?>
-									</section>
-								</article>
-								<!--Temperature Information-->
-<?php /*								<article class="envor-sorting-item css">
-									<header><?php echo $lang->showWord("temperature_information"); ?><i class="fa fa-plus"></i></header>
-									<section>
-										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>System Ambient Temperature</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'SystemAmbientTemp'};?>">
-											<input type="hidden" name="SystemAmbientTemp" id="SystemAmbientTemp" value="<?php echo $obj->{'SystemAmbientTemp'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>System Critical Temperature</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'SystemCriticalTemp'};?>">
-											<input type="hidden" name="SystemCriticalTemp" id="SystemCriticalTemp" value="<?php echo $obj->{'SystemCriticalTemp'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Ccs Connector Temperature</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'CcsConnectorTemp'};?>">
-											<input type="hidden" name="CcsConnectorTemp" id="CcsConnectorTemp" value="<?php echo $obj->{'CcsConnectorTemp'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Psu Ambient Temperature</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'PsuAmbientTemp'};?>">
-											<input type="hidden" name="PsuAmbientTemp" id="PsuAmbientTemp" value="<?php echo $obj->{'PsuAmbientTemp'};?>">
 										</div>
 									</section>
 								</article>
-								<!--Connector Plug-in Information-->
-								<article class="envor-sorting-item css">
-									<header><?php echo $lang->showWord("connector_plug-in_information"); ?><i class="fa fa-plus"></i></header>
-									<section>
-										<div class="form-group" style="display:<?php echo $am100;?>">
-											<label>Ac PlugIn Times</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'AcPlugInTimes'};?>">
-											<input type="hidden" name="AcPlugInTimes" id="AcPlugInTimes" value="<?php echo $obj->{'AcPlugInTimes'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>GbPlugInTimes</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'GbPlugInTimes'};?>">
-											<input type="hidden" name="GbPlugInTimes" id="GbPlugInTimes" value="<?php echo $obj->{'GbPlugInTimes'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Ccs1PlugInTimes</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'Ccs1PlugInTimes'};?>">
-											<input type="hidden" name="Ccs1PlugInTimes" id="Ccs1PlugInTimes" value="<?php echo $obj->{'Ccs1PlugInTimes'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>Ccs2PlugInTimes</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'Ccs2PlugInTimes'};?>">
-											<input type="hidden" name="Ccs2PlugInTimes" id="Ccs2PlugInTimes" value="<?php echo $obj->{'Ccs2PlugInTimes'};?>">
-										</div>
-										<div class="form-group" style="display:<?php echo $am001;?>">
-											<label>ChademoPlugInTimes</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj->{'ChademoPlugInTimes'};?>">
-											<input type="hidden" name="ChademoPlugInTimes" id="ChademoPlugInTimes" value="<?php echo $obj->{'ChademoPlugInTimes'};?>">
-										</div>
-									</section>
-								</article>*/?>
 								<article class="envor-sorting-item css">
 									<div align="center"><button id="save"><?php echo $lang->showWord("set")?></button></div>
 								</article>
@@ -440,27 +277,29 @@ img {
 		$("#datetimepicker1").datetimepicker({
 			format:"YYYY-MM-DD HH:mm:ss"
 		});
-//		var t = new Date(document.getElementById("SystemDateTime").placeholder);
-//		var t_s = t.getTime();
-//		t.setTime(t_s + 1000 );//設定新時間比舊時間多一分鐘
-	//	alert(t);
 		setInterval(function(){var t = new Date(document.getElementById("SystemDateTime0").placeholder);var t_s = t.getTime();t.setTime(t_s + 1000 );document.getElementById("SystemDateTime0").placeholder= t.Format("yyyy-MM-dd hh:mm:ss");}, 1000);
-		if(document.getElementById("AuthorisationMode").value=="0"){
-			document.getElementById("AuthorisationModeText").style.display="block";
-		}
-		// if(document.getElementById("ModelName").value.substr(8,1) != "0"){
-			// document.getElementById("AcRatingCurrentDiv").style.display="block";
-		// }
-		// else{
-			// document.getElementById("AcRatingCurrentDiv").style.display="none";
+		// if(document.getElementById("AuthorisationMode").value=="0"){
+			// document.getElementById("AuthorisationModeText").style.display="block";
 		// }
-		// if(document.getElementById("ModelName").value.substr(0,1) != "D"){
-			// document.getElementById("isAPPLabel").style.display="none";
-			// document.getElementById("isQRCodeLabel").style.display="none";
-			// document.getElementById("isRFIDLabel").style.display="none";
-		// }
-//		isQRCode_clicked();
-//		QRCodeMadeMode_changed();
+		if(document.getElementById("ModelName").value.substr(8,1) != "0"){
+			document.getElementById("AcRatingCurrentDiv").style.display="block";
+		}
+		else{
+			document.getElementById("AcRatingCurrentDiv").style.display="none";
+		}
+		if(document.getElementById("ModelName").value.substr(9,1) != "0"){
+			document.getElementById("Connector2FwRevDiv").style.display="block";
+		}
+		else{
+			document.getElementById("Connector2FwRevDiv").style.display="none";
+		}
+		if(document.getElementById("ModelName").value.substr(0,1) != "D"){
+			document.getElementById("isAPPLabel").style.display="none";
+			document.getElementById("isQRCodeLabel").style.display="none";
+			document.getElementById("isRFIDLabel").style.display="none";
+		}
+		isQRCode_clicked();
+		QRCodeMadeMode_changed();
 	});
 
 	document.getElementById("save").onclick = function() {
@@ -475,15 +314,13 @@ img {
 			// POST 參數須使用 send() 發送
 			var data =  "SystemId=" + document.getElementById("SystemId").value+
 						"&SystemDateTime=" + document.getElementById("SystemDateTime").value+
-//						"&AcPhaseCount=" + document.getElementById("AcPhaseCount").value+
 						"&FactoryConfiguration=" + (document.getElementById("FactoryConfiguration").checked?1:0)+
 						"&AuthorisationMode=" + (document.getElementById("AuthorisationMode").checked?0:1)+
-						// "&isAPP=" + (document.getElementById("isAPP").checked?1:0)+
-						// "&isQRCode=" + (document.getElementById("isQRCode").checked?1:0)+
-						// "&isRFID=" + (document.getElementById("isRFID").checked?1:0)+
-						// "&QRCodeMadeMode=" + document.getElementById("QRCodeMadeMode").value+
-						// "&QRCodeContent=" + document.getElementById("QRCodeContent").value+
-//						"&DefaultLanguage=" + document.getElementById("DefaultLanguage").value+
+						"&isAPP=" + (document.getElementById("isAPP").checked?1:0)+
+						"&isQRCode=" + (document.getElementById("isQRCode").checked?1:0)+
+						"&isRFID=" + (document.getElementById("isRFID").checked?1:0)+
+						"&QRCodeMadeMode=" + document.getElementById("QRCodeMadeMode").value+
+						"&QRCodeContent=" + document.getElementById("QRCodeContent").value+
 						"&RfidCardNumEndian=" + document.getElementById("RfidCardNumEndian").value+
 						"&PsuAcInputType=" + document.getElementById("PsuAcInputType").value;
 			
@@ -522,12 +359,7 @@ img {
 			result = false;
 		}
 		
-		if(SystemDateTime.length <=0)
-		{
-			alert("SystemDateTime format is not correct, SystemDateTime is required .");
-			document.getElementById("SystemDateTime").focus();
-			result = false;
-		}*/
+*/
 		return result;
 	}
 
@@ -586,5 +418,5 @@ img {
 		return true;
 	}
 
-</script>		
+</script>
 

+ 9 - 11
EVSE/rootfs/var/www/set_system_action.php

@@ -23,11 +23,10 @@
 //		checkValue("AcPhaseCount",1);
 //		checkValue("FactoryConfiguration",1);
 		checkValue("AuthorisationMode",2);
-		// checkValue("isAPP",2);
-		// checkValue("isQRCode",2);
-		// checkValue("isRFID",2);
-		// checkValue("QRCodeMadeMode",2);
-//		checkValue("DefaultLanguage",2);
+		checkValue("isAPP",2);
+		checkValue("isQRCode",2);
+		checkValue("isRFID",2);
+		checkValue("QRCodeMadeMode",2);
 		checkValue("RfidCardNumEndian",1);
 		checkValue("PsuAcInputType",1);
 //		$json = json_decode(file_get_contents("system.txt"), true);
@@ -36,12 +35,11 @@
 //		$json['AcPhaseCount']			= $_POST['AcPhaseCount'];
 		$json['FactoryConfiguration']	= $_POST['FactoryConfiguration'];
 		$json['AuthorisationMode']		= (int)$_POST['AuthorisationMode'];
-		// $json['isAPP']					= (int)$_POST['isAPP'];
-		// $json['isQRCode']			 	= (int)$_POST['isQRCode'];
-		// $json['isRFID']					= (int)$_POST['isRFID'];
-		// $json['QRCodeMadeMode']			= (int)$_POST['QRCodeMadeMode'];
-		// $json['QRCodeContent']			= $_POST['QRCodeContent'];
-//		$json['DefaultLanguage']		= $_POST['DefaultLanguage'];
+		$json['isAPP']					= (int)$_POST['isAPP'];
+		$json['isQRCode']			 	= (int)$_POST['isQRCode'];
+		$json['isRFID']					= (int)$_POST['isRFID'];
+		$json['QRCodeMadeMode']			= (int)$_POST['QRCodeMadeMode'];
+		$json['QRCodeContent']			= $_POST['QRCodeContent'];
 		$json['RfidCardNumEndian']		= $_POST['RfidCardNumEndian'];
 		$json['PsuAcInputType']			= $_POST['PsuAcInputType'];