Selaa lähdekoodia

2021-09-28 / ct_chen

Actions:
1. Webservice fix MaxChargingCurrent must >=6 except 0 (unlimit)

Files:
1. EVSE/rootfs/var/www/set_charging.php
   EVSE/rootfs/var/www/set_charging_action.php
ct_chen 3 vuotta sitten
vanhempi
commit
1ec794b1ef

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

@@ -2456,7 +2456,7 @@ CORE STYLES ABOVE - NO TOUCHY
 			return false;
 		}
 		
-		if(document.getElementById("ModelName").value.substr(0,1)=="A" && MaxChargingCurrent < 6)
+		if(document.getElementById("ModelName").value.substr(0,1)=="A" && MaxChargingCurrent < 6 && MaxChargingCurrent !=0)
 		{
 			alert("MaxChargingCurrent must > 6!");
 			document.getElementById("MaxChargingCurrent").focus();

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

@@ -28,7 +28,7 @@
 		checkMaxValue("AcMaxChargingCurrent");
 		checkMaxValue("MaxChargingDuration");
 		checkValue("StopChargingByButton");
-		if(substr($_POST['ModelName'],0,1)=="A" && $_POST['MaxChargingCurrent']<6){
+		if(substr($_POST['ModelName'],0,1)=="A" && $_POST['MaxChargingCurrent']<6 && $_POST['MaxChargingCurrent']!=0){
 			$jsone['result'] = "Fail";
 			$jsone['message'] = "MaxChargingCurrent must > 6";
 			echo json_encode($jsone);