Sfoglia il codice sorgente

[Improve][AW-CCS][main.c]
2022-03-21 / EASON YANG
Action
1. Improve: The EVSE will stop the PWM request, if the EVSE occurs alarm during charging and unplug the connector. Protect for energy stolen.

File.
1. main.c
Action 1

FIRMWARE VERSION: B0.61.XX.XXXX.PX

8009 3 anni fa
parent
commit
204c425f95
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      EVSE/Projects/AW-CCS/Apps/main.c

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

@@ -6632,6 +6632,19 @@ int main(void)
 					setLedMotion(gun_index,LED_ACTION_ALARM);
 					setRelay(gun_index, OFF);
 
+					if((ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_BS) || (ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_HLC))
+					{
+						if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A))
+							setRequest(gun_index,OFF);
+					}
+					else if(ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_SOCKETE)
+					{
+						if(ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn != ON)
+							setRequest(gun_index,OFF);
+					}
+					else
+					{}
+
 					if((ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode == 0) && !ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CCSboardStestFail)
 					{
 						if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_CHARGING) ||