瀏覽代碼

2021-05-04 / Eason Yang
Action :
1. Added : Added condition for the system change SYS_MODE_COMPLETE to SYS_MODE_IDLE.

File :
1. main.c
Action 1

Version : D0.50.XX.XXXX.XX

8009 3 年之前
父節點
當前提交
d32395f1ad
共有 1 個文件被更改,包括 13 次插入9 次删除
  1. 13 9
      EVSE/Projects/AW-CCS/Apps/main.c

+ 13 - 9
EVSE/Projects/AW-CCS/Apps/main.c

@@ -5320,17 +5320,21 @@ int main(void)
 						setRequest(gun_index, OFF);
 						sleep(15);
 					}
+					
+					if(((ShmCharger->gun_info[gun_index].chargingMode != CHARGING_MODE_SOCKETE) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A)) ||
+					   ((ShmCharger->gun_info[gun_index].chargingMode != CHARGING_MODE_SOCKETE) && (!ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn)))
+					{
+						ShmCharger->gun_info[gun_index].rfidReq = OFF;
+						ShmCharger->gun_info[gun_index].isAuthPassEnd = OFF;
+						ShmCharger->gun_info[gun_index].bleConfigData.isRequestStop = OFF;
+						ocpp_set_remotestop(gun_index, OFF);
+						ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].schedule.isTriggerStop = OFF;
 
-					ShmCharger->gun_info[gun_index].rfidReq = OFF;
-					ShmCharger->gun_info[gun_index].isAuthPassEnd = OFF;
-					ShmCharger->gun_info[gun_index].bleConfigData.isRequestStop = OFF;
-					ocpp_set_remotestop(gun_index, OFF);
-					ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].schedule.isTriggerStop = OFF;
-
-					DB_Insert_Record(localDb, gun_index);
-					setChargerMode(gun_index, SYS_MODE_IDLE);
+						DB_Insert_Record(localDb, gun_index);
+						setChargerMode(gun_index, SYS_MODE_IDLE);
+					}
+					
 					break;
-
 				case SYS_MODE_ALARM:
 					setLedMotion(gun_index,LED_ACTION_ALARM);