소스 검색

[Improve][AW-CCS][main]

2021.08.05 / Folus Wen

Actions:
1. When charger enable local power sharging and siconnect from sharing server target current set to 0.

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 년 전
부모
커밋
cecb5aa7f2
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      EVSE/Projects/AW-CCS/Apps/main.c

+ 10 - 2
EVSE/Projects/AW-CCS/Apps/main.c

@@ -5442,9 +5442,17 @@ int main(void)
 						checkChargingProfileLimit(gun_index);
 
 						// Charging session target current check if OCPP disconnect and power sharing server connected
-						if(!ocpp_get_connection_status() && ShmSysConfigAndInfo->SysInfo.localSharingInfo.isConnectedSharingServer)
+						if(!ocpp_get_connection_status() && ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharging)
 						{
-							ShmCharger->gun_info[gun_index].targetCurrent = ShmSysConfigAndInfo->SysInfo.localSharingInfo.AvailableShargingCurrent;
+							if(ShmSysConfigAndInfo->SysInfo.localSharingInfo.isConnectedSharingServer)
+								ShmCharger->gun_info[gun_index].targetCurrent = ShmSysConfigAndInfo->SysInfo.localSharingInfo.AvailableShargingCurrent;
+							else
+							{
+								if(ShmCharger->gun_info[gun_index].targetCurrent != 0)
+									DEBUG_WARN("Disconnect from power sharing server, target current set to 0.\n");
+
+								ShmCharger->gun_info[gun_index].targetCurrent = 0;
+							}
 						}
 
 						// Determine max charging current to MCU