|
@@ -5442,9 +5442,17 @@ int main(void)
|
|
|
checkChargingProfileLimit(gun_index);
|
|
|
|
|
|
|
|
|
- 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;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|