Przeglądaj źródła

2021-07-12 / ct_chen

Actions:
1. Webservice fix bugs

Files:
1. as list
ct_chen 3 lat temu
rodzic
commit
f23c26ca17

+ 3 - 0
EVSE/Modularization/WebService.c

@@ -1867,6 +1867,7 @@ int main(int argc, char *argv[]) {
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
 				StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
 				ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
+				ChillerTemp[0] = json_object_new_int(255);
 				PowerConsumption[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PowerConsumption);
 				AcGunQty++;
 			}
@@ -1982,6 +1983,7 @@ int main(int argc, char *argv[]) {
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
 				StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
 				ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
+				ChillerTemp[1] = json_object_new_int(255);
 				PowerConsumption[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PowerConsumption);
 				AcGunQty++;
 			}
@@ -2097,6 +2099,7 @@ int main(int argc, char *argv[]) {
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
 				StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
 				ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
+				ChillerTemp[2] = json_object_new_int(255);
 				PowerConsumption[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PowerConsumption);
 				AcGunQty++;
 			}

+ 1 - 1
EVSE/rootfs/var/www/set_backend.php

@@ -220,7 +220,7 @@ img {
 		return true;
 	}
 	function OcppSecurityProfile_changed(){
-		if(document.getElementById("OcppSecurityProfile").value == "0" || document.getElementById("OcppSecurityProfile").value == "1"){
+		if(document.getElementById("OcppSecurityProfile").value == "1" || document.getElementById("OcppSecurityProfile").value == "2"){
 			document.getElementById("OcppSecurityPasswordDiv").style.display="block";
 		}
 		else{

+ 24 - 28
EVSE/rootfs/var/www/set_charging.php

@@ -1147,10 +1147,9 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['ConnectorTemp']!=255?$obj['ChargingInfo1']['ConnectorTemp']." ℃":"not supported";?>">
 											<input type="hidden" name="ConnectorTemp1" id="ConnectorTemp1" value="<?php echo $obj['ChargingInfo1']['ConnectorTemp'];?>">
 										</div>
-										<div class="form-group ChillerTemp1">
+										<div class="form-group" id="ChillerTemp1">
 											<label>Chiller Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['ChillerTemp']!=255?$obj['ChargingInfo1']['ChillerTemp']." ℃":"not supported";?>">
-											<input type="hidden" name="ChillerTemp" id="ChillerTemp" value="<?php echo $obj['ChargingInfo1']['ChillerTemp'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Present Charging Voltage</label>
@@ -1239,10 +1238,9 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['ConnectorTemp']!=255?$obj['ChargingInfo2']['ConnectorTemp']." ℃":"not supported";?>">
 											<input type="hidden" name="ConnectorTemp2" id="ConnectorTemp2" value="<?php echo $obj['ChargingInfo2']['ConnectorTemp'];?>">
 										</div>
-										<div class="form-group ChillerTemp2">
+										<div class="form-group" id="ChillerTemp2">
 											<label>Chiller Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['ChillerTemp']!=255?$obj['ChargingInfo2']['ChillerTemp']." ℃":"not supported";?>">
-											<input type="hidden" name="ChillerTemp2" id="ChillerTemp2" value="<?php echo $obj['ChargingInfo2']['ChillerTemp'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Present Charging Voltage</label>
@@ -1331,10 +1329,9 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['ConnectorTemp']!=255?$obj['ChargingInfo3']['ConnectorTemp']." ℃":"not supported";?>">
 											<input type="hidden" name="ConnectorTemp3" id="ConnectorTemp3" value="<?php echo $obj['ChargingInfo3']['ConnectorTemp'];?>">
 										</div>
-										<div class="form-group ChillerTemp3">
+										<div class="form-group" id="ChillerTemp3">
 											<label>Chiller Temperature</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['ChillerTemp']!=255?$obj['ChargingInfo3']['ChillerTemp']." ℃":"not supported";?>">
-											<input type="hidden" name="ChillerTemp3" id="ChillerTemp3" value="<?php echo $obj['ChargingInfo3']['ChillerTemp'];?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label>Present Charging Voltage</label>
@@ -1472,31 +1469,30 @@ img {
 				document.getElementById(this.id+"Text").style.display="none";
 			}
 		});
-		if(document.getElementById("ModelName").value.substr(0,2) == "DO" || document.getElementById("ModelName").value.substr(0,2) == "DK"){
-			document.getElementsByClassName("ChillerTemp").style.display="block";
-		}
-		else{
-			document.getElementsByClassName("ChillerTemp").style.display="none";
-		}
-		if(document.getElementById("ModelName").value.substr(7,1) == "V" || document.getElementById("ModelName").value.substr(7,1) == "F" || document.getElementById("ModelName").value.substr(7,1) == "P" || document.getElementById("ModelName").value.substr(7,1) == "R"){
-			document.getElementsByClassName("ChillerTemp1").style.display="block";
-		}
-		else{
-			document.getElementsByClassName("ChillerTemp1").style.display="none";
-		}
-		if(document.getElementById("ModelName").value.substr(9,1) == "V" || document.getElementById("ModelName").value.substr(9,1) == "F" || document.getElementById("ModelName").value.substr(9,1) == "P" || document.getElementById("ModelName").value.substr(9,1) == "R"){
-			document.getElementsByClassName("ChillerTemp2").style.display="block";
-		}
-		else{
-			document.getElementsByClassName("ChillerTemp2").style.display="none";
+		if(document.getElementById("ModelName").value.substr(7,1)!=0){
+			if(document.getElementById("ModelName").value.substr(7,1) == "V" || document.getElementById("ModelName").value.substr(7,1) == "F" || document.getElementById("ModelName").value.substr(7,1) == "P" || document.getElementById("ModelName").value.substr(7,1) == "R"){
+				document.getElementById("ChillerTemp1").style.display="block";
+			}
+			else{
+				document.getElementById("ChillerTemp1").style.display="none";
+			}
 		}
-		if(document.getElementById("ModelName").value.substr(8,1) == "V" || document.getElementById("ModelName").value.substr(8,1) == "F" || document.getElementById("ModelName").value.substr(8,1) == "P" || document.getElementById("ModelName").value.substr(8,1) == "R"){
-			document.getElementsByClassName("ChillerTemp3").style.display="block";
+		if(document.getElementById("ModelName").value.substr(9,1)!=0){
+			if(document.getElementById("ModelName").value.substr(9,1) == "V" || document.getElementById("ModelName").value.substr(9,1) == "F" || document.getElementById("ModelName").value.substr(9,1) == "P" || document.getElementById("ModelName").value.substr(9,1) == "R"){
+				document.getElementById("ChillerTemp2").style.display="block";
+			}
+			else{
+				document.getElementById("ChillerTemp2").style.display="none";
+			}
 		}
-		else{
-			document.getElementsByClassName("ChillerTemp3").style.display="none";
+		if(document.getElementById("ModelName").value.substr(8,1)!=0){
+			if(document.getElementById("ModelName").value.substr(8,1) == "V" || document.getElementById("ModelName").value.substr(8,1) == "F" || document.getElementById("ModelName").value.substr(8,1) == "P" || document.getElementById("ModelName").value.substr(8,1) == "R"){
+				document.getElementById("ChillerTemp3").style.display="block";
+			}
+			else{
+				document.getElementById("ChillerTemp3").style.display="none";
+			}
 		}
-
 	});
 
 	document.getElementById("save").onclick = function() {