Przeglądaj źródła

[Improve][AW-CCS][main]

2021.xx.xx / Folus Wen

Actions:
1. Enable whitelist on webpage when OCPP URL does not empty.
2. checkTask() logic improve for OcppBackend.

Files:
1. As follow commit history

Image version: D0.55.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 lat temu
rodzic
commit
0ffa2384d3
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      EVSE/Projects/AW-CCS/Apps/main.c

+ 5 - 1
EVSE/Projects/AW-CCS/Apps/main.c

@@ -3675,6 +3675,8 @@ void checkTask()
 				DEBUG_WARN("OcppBackend watch dog timeout task restart.\n");
 				ShmOCPP16Data->procDogTime =  time((time_t*)NULL);
 				system("pkill OcppBackend");
+				sleep(3);
+				ocpp_process_start();
 			}
 
 			if(system("pidof -s OcppBackend > /dev/null") != 0)
@@ -3690,6 +3692,8 @@ void checkTask()
 				DEBUG_WARN("OcppBackend20 watch dog timeout task restart.\n");
 				ShmOCPP20Data->procDogTime =  time((time_t*)NULL);
 				system("pkill OcppBackend20");
+				sleep(3);
+				ocpp_process_start();
 			}
 
 			if(system("pidof -s OcppBackend20 > /dev/null") != 0)
@@ -4356,7 +4360,7 @@ void checkRfidAuthrize()
 		{
 			if(ocpp_get_auth_conf() ||
 			   (!ocpp_get_connection_status() && ((ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_FREE) || (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_NOCHARGE))) ||
-			   (!ocpp_get_connection_status() && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_LOCALLIST) && (strcmp((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,"") == 0))
+			   (!ocpp_get_connection_status() && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_LOCALLIST) && (DiffTimebWithNow(startTime[0][TMR_IDX_AUTH]) > 2000))
 			  )
 			{
 				if(ocpp_get_auth_result(NO) ||