|
@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
|
|
uint8_t bd1_1_status = 0;
|
|
uint8_t bd1_1_status = 0;
|
|
uint8_t bd1_2_status = 0;
|
|
uint8_t bd1_2_status = 0;
|
|
|
|
|
|
-char *fwVersion = "V1.11.00.0000.00";
|
|
+char *fwVersion = "V1.12.00.0000.00";
|
|
|
|
|
|
|
|
|
|
bool isDb_ready;
|
|
bool isDb_ready;
|
|
@@ -96,6 +96,7 @@ void RecordAlarmCode(uint8_t gunIndex, char *code);
|
|
void ReleaseAlarmCode(uint8_t gunIndex);
|
|
void ReleaseAlarmCode(uint8_t gunIndex);
|
|
void ResetChargerAlarmCode(uint8_t gunIndex, char *code);
|
|
void ResetChargerAlarmCode(uint8_t gunIndex, char *code);
|
|
void AdjustChargerCurrent(void);
|
|
void AdjustChargerCurrent(void);
|
|
|
|
+void UpdateErrorCodeToOcpp(uint8_t index);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -390,15 +391,51 @@ static void checkGunOTPState(uint8_t gunIndex)
|
|
if (((ShmDcCommonData->ChillerValve.MultiChillerGun & 0x80) >> 7) == YES) {
|
|
if (((ShmDcCommonData->ChillerValve.MultiChillerGun & 0x80) >> 7) == YES) {
|
|
if (pDcChargingInfo->ChillerTemp != UNDEFINED_TEMP) {
|
|
if (pDcChargingInfo->ChillerTemp != UNDEFINED_TEMP) {
|
|
if (pDcChargingInfo->ChillerTemp >= GUN_OTP_VALUE) {
|
|
if (pDcChargingInfo->ChillerTemp >= GUN_OTP_VALUE) {
|
|
- RecordAlarmCode(gunIndex, "012323");
|
|
+ if (((gunIndex == 0) &&
|
|
|
|
+ ((strncmp((char *)&pSysConfig->ModelName[7], "V", 1) == 0) ||
|
|
|
|
+ (strncmp((char *)&pSysConfig->ModelName[7], "F", 1) == 0)))
|
|
|
|
+ ||
|
|
|
|
+ ((gunIndex == 1) &&
|
|
|
|
+ ((strncmp((char *)&pSysConfig->ModelName[9], "V", 1) == 0) ||
|
|
|
|
+ (strncmp((char *)&pSysConfig->ModelName[9], "F", 1) == 0)))
|
|
|
|
+ ) {
|
|
|
|
+ RecordAlarmCode(gunIndex, "012323");
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerOTP = YES;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerOTP = NO;
|
|
|
|
+ }
|
|
} else if (pDcChargingInfo->ChillerTemp != 0 &&
|
|
} else if (pDcChargingInfo->ChillerTemp != 0 &&
|
|
pDcChargingInfo->ChillerTemp < GUN_OTP_RECOVERY) {
|
|
pDcChargingInfo->ChillerTemp < GUN_OTP_RECOVERY) {
|
|
- ResetChargerAlarmCode(gunIndex, "012323");
|
|
+
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerOTP = NO;
|
|
}
|
|
}
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = NO;
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- RecordAlarmCode(gunIndex, "011038");
|
|
+
|
|
- ResetChargerAlarmCode(gunIndex, "012323");
|
|
+
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerOTP = NO;
|
|
|
|
+ if (((gunIndex == 0) &&
|
|
|
|
+ ((strncmp((char *)&pSysConfig->ModelName[7], "V", 1) == 0) ||
|
|
|
|
+ (strncmp((char *)&pSysConfig->ModelName[7], "F", 1) == 0)))
|
|
|
|
+ ||
|
|
|
|
+ ((gunIndex == 1) &&
|
|
|
|
+ ((strncmp((char *)&pSysConfig->ModelName[9], "V", 1) == 0) ||
|
|
|
|
+ (strncmp((char *)&pSysConfig->ModelName[9], "F", 1) == 0)))
|
|
|
|
+ ) {
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = YES;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = NO;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(pFaultCode->FaultEvents.bits.CcsLiquidChillerWaterLevelFault == YES)
|
|
|
|
+ {
|
|
|
|
+ RecordAlarmCode(gunIndex, "011037");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -407,14 +444,19 @@ static void checkGunOTPState(uint8_t gunIndex)
|
|
if (pDcChargingInfo->ConnectorTemp != UNDEFINED_TEMP) {
|
|
if (pDcChargingInfo->ConnectorTemp != UNDEFINED_TEMP) {
|
|
if (pDcChargingInfo->ConnectorTemp >= GUN_OTP_VALUE) {
|
|
if (pDcChargingInfo->ConnectorTemp >= GUN_OTP_VALUE) {
|
|
RecordAlarmCode(gunIndex, "012229");
|
|
RecordAlarmCode(gunIndex, "012229");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP = YES;
|
|
} else if (pDcChargingInfo->ConnectorTemp != 0 &&
|
|
} else if (pDcChargingInfo->ConnectorTemp != 0 &&
|
|
pDcChargingInfo->ConnectorTemp < GUN_OTP_RECOVERY) {
|
|
pDcChargingInfo->ConnectorTemp < GUN_OTP_RECOVERY) {
|
|
- ResetChargerAlarmCode(gunIndex, "012229");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP = NO;
|
|
}
|
|
}
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectTempSensorFail = NO;
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
|
|
|
- ResetChargerAlarmCode(gunIndex, "012229");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectTempSensorFail = YES;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -425,16 +467,20 @@ static void checkGunOTPState(uint8_t gunIndex)
|
|
|
|
|
|
if (pDcChargingInfo->ConnectorTemp >= GUN_OTP_VALUE) {
|
|
if (pDcChargingInfo->ConnectorTemp >= GUN_OTP_VALUE) {
|
|
RecordAlarmCode(gunIndex, "012230");
|
|
RecordAlarmCode(gunIndex, "012230");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOTP = YES;
|
|
} else if (pDcChargingInfo->ConnectorTemp != 0 &&
|
|
} else if (pDcChargingInfo->ConnectorTemp != 0 &&
|
|
pDcChargingInfo->ConnectorTemp < GUN_OTP_RECOVERY) {
|
|
pDcChargingInfo->ConnectorTemp < GUN_OTP_RECOVERY) {
|
|
- ResetChargerAlarmCode(gunIndex, "012230");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOTP = NO;
|
|
}
|
|
}
|
|
-
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectTempSensorFail = NO;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- RecordAlarmCode(gunIndex, "011019");
|
|
+
|
|
- ResetChargerAlarmCode(gunIndex, "012230");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOTP = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectTempSensorFail = YES;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -442,14 +488,19 @@ static void checkGunOTPState(uint8_t gunIndex)
|
|
if (pDcChargingInfo->ConnectorTemp != UNDEFINED_TEMP) {
|
|
if (pDcChargingInfo->ConnectorTemp != UNDEFINED_TEMP) {
|
|
if (pDcChargingInfo->ConnectorTemp >= GUN_OTP_VALUE) {
|
|
if (pDcChargingInfo->ConnectorTemp >= GUN_OTP_VALUE) {
|
|
RecordAlarmCode(gunIndex, "012231");
|
|
RecordAlarmCode(gunIndex, "012231");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOTP = YES;
|
|
} else if (pDcChargingInfo->ConnectorTemp != 0 &&
|
|
} else if (pDcChargingInfo->ConnectorTemp != 0 &&
|
|
pDcChargingInfo->ConnectorTemp < GUN_OTP_RECOVERY) {
|
|
pDcChargingInfo->ConnectorTemp < GUN_OTP_RECOVERY) {
|
|
- ResetChargerAlarmCode(gunIndex, "012231");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOTP = NO;
|
|
}
|
|
}
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectTempSensorFail = NO;
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- RecordAlarmCode(gunIndex, "011020");
|
|
+
|
|
- ResetChargerAlarmCode(gunIndex, "012231");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOTP = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectTempSensorFail = YES;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -1690,30 +1741,46 @@ void ResetChargerAlarmCode(uint8_t gunIndex, char *code)
|
|
ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = NO;
|
|
ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = NO;
|
|
}
|
|
}
|
|
|
|
|
|
- if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "", 6) != EQUAL) {
|
|
+
|
|
- if (ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdTrip == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdTrip == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSUvpFail == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaUvpFail == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTUvpFail == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOTP == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOTP == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayWeldingFault == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayWeldingFault == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayWeldingFault == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayDrivingFault == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayDrivingFault == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayDrivingFault == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectTempSensorFail == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectTempSensorFail == NO &&
|
|
+
|
|
- ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectTempSensorFail == NO &&
|
|
+
|
|
- ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerOTP == NO &&
|
|
+
|
|
- ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail == NO
|
|
+
|
|
- ) {
|
|
+
|
|
- strncpy((char *)pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
+
|
|
- }
|
|
+
|
|
|
|
+
|
|
|
|
+ if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012229", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012230", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012231", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011011", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011013", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011015", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011012", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011014", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011016", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011018", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011019", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011020", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012323", 6) == EQUAL ||
|
|
|
|
+ strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "011038", 6) == EQUAL) {
|
|
|
|
+ strncpy((char *)pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1721,10 +1788,20 @@ void RecordAlarmCode(uint8_t gunIndex, char *code)
|
|
{
|
|
{
|
|
pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
|
|
pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
|
|
|
|
|
|
- if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "", 6) == EQUAL) {
|
|
+ if((pDcChargingInfo->SystemStatus > S_IDLE && pDcChargingInfo->SystemStatus < S_TERMINATING) ||
|
|
- memcpy(pDcChargingInfo->ConnectorAlarmCode, code, 6);
|
|
+ (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 && pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1))
|
|
|
|
+ {
|
|
|
|
+ if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "", 6) == EQUAL) {
|
|
|
|
+ memcpy(pDcChargingInfo->ConnectorAlarmCode, code, 6);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (pDcChargingInfo->StopChargeFlag == NO)
|
|
|
|
+ {
|
|
|
|
+ pDcChargingInfo->StopChargeFlag = YES;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0
|
|
if (strcmp(code, "012234") == EQUAL) {
|
|
if (strcmp(code, "012234") == EQUAL) {
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = YES;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = YES;
|
|
} else if (strcmp(code, "012235") == EQUAL) {
|
|
} else if (strcmp(code, "012235") == EQUAL) {
|
|
@@ -1792,6 +1869,7 @@ void RecordAlarmCode(uint8_t gunIndex, char *code)
|
|
ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = YES;
|
|
ShmDcCommonData->ChillerTempErr[gunIndex].StatusBit.ChillerTempSensorFail = YES;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
void ReleaseAlarmCode(uint8_t gunIndex)
|
|
void ReleaseAlarmCode(uint8_t gunIndex)
|
|
@@ -1801,26 +1879,29 @@ void ReleaseAlarmCode(uint8_t gunIndex)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
+#if 0
|
|
|
|
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012251", 6) == EQUAL ||
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012251", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012252", 6) == EQUAL) {
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012252", 6) == EQUAL) {
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
}
|
|
}
|
|
-
|
|
+#endif
|
|
switch (pDcChargingInfo->Type) {
|
|
switch (pDcChargingInfo->Type) {
|
|
case _Type_Chademo:
|
|
case _Type_Chademo:
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaUvpFail = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaUvpFail = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOVP = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOVP = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdWarning = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdWarning = NO;
|
|
-
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayWeldingFault = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayDrivingFault = NO;
|
|
|
|
+#if 0
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012234", 6) == EQUAL ||
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012234", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012289", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012289", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012217", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012217", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012296", 6) == EQUAL) {
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012296", 6) == EQUAL) {
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
break;
|
|
break;
|
|
|
|
|
|
case _Type_CCS_2:
|
|
case _Type_CCS_2:
|
|
@@ -1828,13 +1909,16 @@ void ReleaseAlarmCode(uint8_t gunIndex)
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSUvpFail = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSUvpFail = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOVP = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOVP = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdWarning = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdWarning = NO;
|
|
-
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayWeldingFault = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayDrivingFault = NO;
|
|
|
|
+#if 0
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012235", 6) == EQUAL ||
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012235", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012288", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012288", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012219", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012219", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012297", 6) == EQUAL) {
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012297", 6) == EQUAL) {
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
break;
|
|
break;
|
|
|
|
|
|
case _Type_GB:
|
|
case _Type_GB:
|
|
@@ -1842,16 +1926,19 @@ void ReleaseAlarmCode(uint8_t gunIndex)
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTUvpFail = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTUvpFail = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOVP = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOVP = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdWarning = NO;
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdWarning = NO;
|
|
-
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayWeldingFault = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayDrivingFault = NO;
|
|
|
|
+#if 0
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012236", 6) == EQUAL ||
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012236", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012290", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012290", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012221", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012221", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012298", 6) == EQUAL) {
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012298", 6) == EQUAL) {
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
+#if 0
|
|
|
|
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012251", 6) == EQUAL ||
|
|
if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012251", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012252", 6) == EQUAL ||
|
|
strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "012252", 6) == EQUAL ||
|
|
@@ -1862,6 +1949,8 @@ void ReleaseAlarmCode(uint8_t gunIndex)
|
|
) {
|
|
) {
|
|
memset(pDcChargingInfo->ConnectorAlarmCode, 0, sizeof(pDcChargingInfo->ConnectorAlarmCode));
|
|
memset(pDcChargingInfo->ConnectorAlarmCode, 0, sizeof(pDcChargingInfo->ConnectorAlarmCode));
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
+ memcpy(pDcChargingInfo->ConnectorAlarmCode, "", 6);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1874,6 +1963,7 @@ void ChargingTerminalProcess(uint8_t gunIndex)
|
|
|
|
|
|
void ChargingAlarmProcess(uint8_t gunIndex)
|
|
void ChargingAlarmProcess(uint8_t gunIndex)
|
|
{
|
|
{
|
|
|
|
+ UpdateErrorCodeToOcpp(gunIndex);
|
|
setChargerMode(gunIndex, MODE_ALARM);
|
|
setChargerMode(gunIndex, MODE_ALARM);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1966,6 +2056,9 @@ void EmcOccureByString(char *code)
|
|
(pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
|
|
(pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
|
|
pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)) {
|
|
pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)) {
|
|
|
|
|
|
|
|
+ if (strncmp((char *)pDcChargingInfo->ConnectorAlarmCode, "", 6) == EQUAL) {
|
|
|
|
+ memcpy(pDcChargingInfo->ConnectorAlarmCode, code, 6);
|
|
|
|
+ }
|
|
ChargingAlarmProcess(gun);
|
|
ChargingAlarmProcess(gun);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2007,6 +2100,31 @@ void ReleaseEmsOccureByString(uint8_t index, char *code)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void checkOvpState(uint8_t gunIndex, uint8_t gunType)
|
|
|
|
+{
|
|
|
|
+ switch(gunType)
|
|
|
|
+ {
|
|
|
|
+ case _Type_Chademo:
|
|
|
|
+ if(ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOVP == YES)
|
|
|
|
+ {
|
|
|
|
+ RecordAlarmCode(gunIndex, "012217");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case _Type_CCS_2:
|
|
|
|
+ if(ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSConnectOVP == YES)
|
|
|
|
+ {
|
|
|
|
+ RecordAlarmCode(gunIndex, "012219");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case _Type_GB:
|
|
|
|
+ if(ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTConnectOVP == YES)
|
|
|
|
+ {
|
|
|
|
+ RecordAlarmCode(gunIndex, "012221");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2083,6 +2201,8 @@ void CheckErrorOccurStatus(uint8_t index)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ checkOvpState(index, pDcChargingInfo->Type);
|
|
|
|
+
|
|
|
|
|
|
if (strlen((char *)pDcChargingInfo->ConnectorAlarmCode) == 0) {
|
|
if (strlen((char *)pDcChargingInfo->ConnectorAlarmCode) == 0) {
|
|
|
|
|
|
@@ -2096,11 +2216,11 @@ void CheckErrorOccurStatus(uint8_t index)
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "012304", 6);
|
|
memcpy(pDcChargingInfo->ConnectorAlarmCode, "012304", 6);
|
|
}
|
|
}
|
|
|
|
|
|
- else if (pAlarmCode->AlarmEvents.bits.SystemChillerOTP == YES) {
|
|
+
|
|
- memcpy(pDcChargingInfo->ConnectorAlarmCode, "012323", 6);
|
|
+
|
|
- } else if (pFaultCode->FaultEvents.bits.ChillerTempSensorBroken == YES) {
|
|
+
|
|
- memcpy(pDcChargingInfo->ConnectorAlarmCode, "011038", 6);
|
|
+
|
|
- }
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3500,8 +3620,8 @@ void UpdateErrorCodeToOcpp(uint8_t index)
|
|
{
|
|
{
|
|
pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(index);
|
|
pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(index);
|
|
|
|
|
|
-
|
|
+
|
|
-
|
|
+
|
|
if (strcmp((char *)pDcChargingInfo->ConnectorAlarmCode, "") != EQUAL) {
|
|
if (strcmp((char *)pDcChargingInfo->ConnectorAlarmCode, "") != EQUAL) {
|
|
|
|
|
|
strcpy((char *)ShmOCPP16Data->StatusNotification[index].ErrorCode, "InternalError");
|
|
strcpy((char *)ShmOCPP16Data->StatusNotification[index].ErrorCode, "InternalError");
|
|
@@ -3512,7 +3632,7 @@ void UpdateErrorCodeToOcpp(uint8_t index)
|
|
strcpy((char *)ShmOCPP16Data->StatusNotification[index].VendorErrorCode, (char *)pDcChargingInfo->EvConnAlarmCode);
|
|
strcpy((char *)ShmOCPP16Data->StatusNotification[index].VendorErrorCode, (char *)pDcChargingInfo->EvConnAlarmCode);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
void AdjustChargerCurrent()
|
|
void AdjustChargerCurrent()
|
|
@@ -3583,10 +3703,10 @@ static bool PrecheckIsPass(uint8_t gunIndex)
|
|
|
|
|
|
static void ReviewCriticalAlarm(void)
|
|
static void ReviewCriticalAlarm(void)
|
|
{
|
|
{
|
|
- if (ShmDcCommonData->GunRelayDrivingOccur[0] == YES ||
|
|
+ if (
|
|
- ShmDcCommonData->GunRelayDrivingOccur[1] == YES ||
|
|
+
|
|
- ShmDcCommonData->GunRelayWeldingOccur[0] == YES ||
|
|
+
|
|
- ShmDcCommonData->GunRelayWeldingOccur[1] == YES ||
|
|
+
|
|
pAlarmCode->AlarmEvents.bits.EmergencyStopTrip == YES ||
|
|
pAlarmCode->AlarmEvents.bits.EmergencyStopTrip == YES ||
|
|
pAlarmCode->AlarmEvents.bits.MainPowerBreakerTrip == YES ||
|
|
pAlarmCode->AlarmEvents.bits.MainPowerBreakerTrip == YES ||
|
|
pAlarmCode->AlarmEvents.bits.DoorOpen == YES ||
|
|
pAlarmCode->AlarmEvents.bits.DoorOpen == YES ||
|
|
@@ -3613,7 +3733,7 @@ static void CheckRelayWeldingOrDrivingFault(uint8_t gunIndex)
|
|
|
|
|
|
|
|
|
|
uint8_t faultCode = RELAY_STATUS_ERROR_NONE;
|
|
uint8_t faultCode = RELAY_STATUS_ERROR_NONE;
|
|
- static uint8_t drivingCount = 0;
|
|
+
|
|
|
|
|
|
if (gunIndex == 0) {
|
|
if (gunIndex == 0) {
|
|
if (ShmDcCommonData->CheckRelayStatus[RELAY_SMR1_P_STATUS] == RELAY_STATUS_ERROR_WELDING ||
|
|
if (ShmDcCommonData->CheckRelayStatus[RELAY_SMR1_P_STATUS] == RELAY_STATUS_ERROR_WELDING ||
|
|
@@ -3649,45 +3769,58 @@ static void CheckRelayWeldingOrDrivingFault(uint8_t gunIndex)
|
|
|
|
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
RecordAlarmCode(gunIndex, "011011");
|
|
RecordAlarmCode(gunIndex, "011011");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayWeldingFault = YES;
|
|
} else if (pDcChargingInfo->Type == _Type_GB) {
|
|
} else if (pDcChargingInfo->Type == _Type_GB) {
|
|
RecordAlarmCode(gunIndex, "011015");
|
|
RecordAlarmCode(gunIndex, "011015");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayWeldingFault = YES;
|
|
} else if (pDcChargingInfo->Type == _Type_CCS_2) {
|
|
} else if (pDcChargingInfo->Type == _Type_CCS_2) {
|
|
RecordAlarmCode(gunIndex, "011013");
|
|
RecordAlarmCode(gunIndex, "011013");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayWeldingFault = YES;
|
|
}
|
|
}
|
|
|
|
|
|
ShmDcCommonData->GunRelayWeldingOccur[gunIndex] = YES;
|
|
ShmDcCommonData->GunRelayWeldingOccur[gunIndex] = YES;
|
|
- EmcOccureByString("");
|
|
+
|
|
} else if (faultCode == RELAY_STATUS_ERROR_DRIVING) {
|
|
} else if (faultCode == RELAY_STATUS_ERROR_DRIVING) {
|
|
- if (drivingCount++ != 2) {
|
|
+
|
|
- return;
|
|
+
|
|
- }
|
|
+
|
|
|
|
|
|
|
|
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
RecordAlarmCode(gunIndex, "011012");
|
|
RecordAlarmCode(gunIndex, "011012");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayDrivingFault = YES;
|
|
} else if (pDcChargingInfo->Type == _Type_GB) {
|
|
} else if (pDcChargingInfo->Type == _Type_GB) {
|
|
RecordAlarmCode(gunIndex, "011016");
|
|
RecordAlarmCode(gunIndex, "011016");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayDrivingFault = YES;
|
|
} else if (pDcChargingInfo->Type == _Type_CCS_2) {
|
|
} else if (pDcChargingInfo->Type == _Type_CCS_2) {
|
|
RecordAlarmCode(gunIndex, "011014");
|
|
RecordAlarmCode(gunIndex, "011014");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayDrivingFault = YES;
|
|
}
|
|
}
|
|
|
|
|
|
ShmDcCommonData->GunRelayDrivingOccur[gunIndex] = YES;
|
|
ShmDcCommonData->GunRelayDrivingOccur[gunIndex] = YES;
|
|
- EmcOccureByString("");
|
|
+
|
|
} else {
|
|
} else {
|
|
ShmDcCommonData->GunRelayWeldingOccur[gunIndex] = NO;
|
|
ShmDcCommonData->GunRelayWeldingOccur[gunIndex] = NO;
|
|
ShmDcCommonData->GunRelayDrivingOccur[gunIndex] = NO;
|
|
ShmDcCommonData->GunRelayDrivingOccur[gunIndex] = NO;
|
|
- drivingCount = 0;
|
|
+
|
|
-
|
|
+#if 0
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
- ResetChargerAlarmCode(gunIndex, "011012");
|
|
+
|
|
- ResetChargerAlarmCode(gunIndex, "011011");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayWeldingFault = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaRelayDrivingFault = NO;
|
|
} else if (pDcChargingInfo->Type == _Type_CCS_2) {
|
|
} else if (pDcChargingInfo->Type == _Type_CCS_2) {
|
|
- ResetChargerAlarmCode(gunIndex, "011014");
|
|
+
|
|
- ResetChargerAlarmCode(gunIndex, "011013");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayWeldingFault = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSRelayDrivingFault = NO;
|
|
} else if (pDcChargingInfo->Type == _Type_GB) {
|
|
} else if (pDcChargingInfo->Type == _Type_GB) {
|
|
- ResetChargerAlarmCode(gunIndex, "011016");
|
|
+
|
|
- ResetChargerAlarmCode(gunIndex, "011015");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayWeldingFault = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTRelayDrivingFault = NO;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3810,9 +3943,18 @@ static void checkPileEndGfdResult(uint8_t gunIndex, uint8_t gunType, uint8_t sys
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
|
|
|
|
RecordAlarmCode(gunIndex, "012234");
|
|
RecordAlarmCode(gunIndex, "012234");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = YES;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdWarning = NO;
|
|
} else if (pDcChargingInfo->GroundFaultStatus == GFD_WARNING) {
|
|
} else if (pDcChargingInfo->GroundFaultStatus == GFD_WARNING) {
|
|
|
|
|
|
- RecordAlarmCode(gunIndex, "012296");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdWarning = YES;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdWarning = NO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3849,9 +3991,18 @@ static void checkPileEndGfdResult(uint8_t gunIndex, uint8_t gunType, uint8_t sys
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
|
|
|
|
RecordAlarmCode(gunIndex, "012236");
|
|
RecordAlarmCode(gunIndex, "012236");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdTrip = YES;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdWarning = NO;
|
|
} else if (pDcChargingInfo->GroundFaultStatus == GFD_WARNING) {
|
|
} else if (pDcChargingInfo->GroundFaultStatus == GFD_WARNING) {
|
|
|
|
|
|
- RecordAlarmCode(gunIndex, "012298");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdTrip = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdWarning = YES;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdTrip = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.GBTGfdWarning = NO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3890,9 +4041,18 @@ static void checkPileEndGfdResult(uint8_t gunIndex, uint8_t gunType, uint8_t sys
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
|
|
|
|
RecordAlarmCode(gunIndex, "012235");
|
|
RecordAlarmCode(gunIndex, "012235");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdTrip = YES;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdWarning = NO;
|
|
} else if (pDcChargingInfo->GroundFaultStatus == GFD_WARNING) {
|
|
} else if (pDcChargingInfo->GroundFaultStatus == GFD_WARNING) {
|
|
|
|
|
|
- RecordAlarmCode(gunIndex, "012297");
|
|
+
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdTrip = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdWarning = YES;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdTrip = NO;
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdWarning = NO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -4153,6 +4313,16 @@ int main(void)
|
|
|
|
|
|
gEvBoardErr.GunErrMessage = 0;
|
|
gEvBoardErr.GunErrMessage = 0;
|
|
gChillerTempErr.TempErrMsg = 0;
|
|
gChillerTempErr.TempErrMsg = 0;
|
|
|
|
+ for (gunIndex = 0; gunIndex < pSysConfig->TotalConnectorCount; gunIndex++) {
|
|
|
|
+
|
|
|
|
+ collectError(gunIndex);
|
|
|
|
+ }
|
|
|
|
+ for (gunIndex = 0; gunIndex < pSysConfig->TotalConnectorCount; gunIndex++) {
|
|
|
|
+ pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
|
|
|
|
+
|
|
|
|
+ checkEvBoardAlarmState(pDcChargingInfo->Type);
|
|
|
|
+ }
|
|
|
|
+ checkChillerAlarmState();
|
|
|
|
|
|
for (gunIndex = 0; gunIndex < pSysConfig->TotalConnectorCount; gunIndex++) {
|
|
for (gunIndex = 0; gunIndex < pSysConfig->TotalConnectorCount; gunIndex++) {
|
|
pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
|
|
pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
|
|
@@ -4166,9 +4336,6 @@ int main(void)
|
|
|
|
|
|
CheckRelayWeldingOrDrivingFault(gunIndex);
|
|
CheckRelayWeldingOrDrivingFault(gunIndex);
|
|
|
|
|
|
-
|
|
|
|
- collectError(gunIndex);
|
|
|
|
-
|
|
|
|
ChkOcppStatus(gunIndex);
|
|
ChkOcppStatus(gunIndex);
|
|
|
|
|
|
if ((pDcChargingInfo->SystemStatus >= S_PREPARING_FOR_EVSE &&
|
|
if ((pDcChargingInfo->SystemStatus >= S_PREPARING_FOR_EVSE &&
|
|
@@ -4183,7 +4350,6 @@ int main(void)
|
|
|
|
|
|
switch (pDcChargingInfo->SystemStatus) {
|
|
switch (pDcChargingInfo->SystemStatus) {
|
|
case S_IDLE:
|
|
case S_IDLE:
|
|
- ReleaseAlarmCode(gunIndex);
|
|
|
|
|
|
|
|
if (isModeChange(gunIndex)) {
|
|
if (isModeChange(gunIndex)) {
|
|
log_info("S_IDLE================================== %x \n", gunIndex);
|
|
log_info("S_IDLE================================== %x \n", gunIndex);
|
|
@@ -4205,6 +4371,7 @@ int main(void)
|
|
ShmSelectGunInfo->AuthorStateFromCabinet[gunIndex] = NO;
|
|
ShmSelectGunInfo->AuthorStateFromCabinet[gunIndex] = NO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ReleaseAlarmCode(gunIndex);
|
|
}
|
|
}
|
|
|
|
|
|
case S_RESERVATION:
|
|
case S_RESERVATION:
|
|
@@ -4219,16 +4386,26 @@ int main(void)
|
|
|
|
|
|
case S_MAINTAIN:
|
|
case S_MAINTAIN:
|
|
case S_FAULT:
|
|
case S_FAULT:
|
|
|
|
+ if (isModeChange(gunIndex)) {
|
|
|
|
+ if(pDcChargingInfo->SystemStatus == S_MAINTAIN)
|
|
|
|
+ {
|
|
|
|
+ log_info("S_MAINTAIN================================== %x \n", gunIndex);
|
|
|
|
+ }
|
|
|
|
+ if(pDcChargingInfo->SystemStatus == S_FAULT)
|
|
|
|
+ {
|
|
|
|
+ log_info("S_FAULT================================== %x \n", gunIndex);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (pSysWarning->Level == WARN_LV_ER) {
|
|
if (pSysWarning->Level == WARN_LV_ER) {
|
|
- pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
|
|
+ struct ChargingInfoData *pSelectedDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
|
|
|
|
|
|
if (gunIndex == pSysInfo->CurGunSelected) {
|
|
if (gunIndex == pSysInfo->CurGunSelected) {
|
|
pSysInfo->SystemPage = _LCM_FIX;
|
|
pSysInfo->SystemPage = _LCM_FIX;
|
|
- } else if (pDcChargingInfo->SystemStatus != S_IDLE &&
|
|
+ } else if (pSelectedDcChargingInfo->SystemStatus != S_IDLE &&
|
|
- pDcChargingInfo->SystemStatus != S_RESERVATION &&
|
|
+ pSelectedDcChargingInfo->SystemStatus != S_RESERVATION &&
|
|
- pDcChargingInfo->SystemStatus != S_MAINTAIN &&
|
|
+ pSelectedDcChargingInfo->SystemStatus != S_MAINTAIN &&
|
|
- pDcChargingInfo->SystemStatus != S_FAULT) {
|
|
+ pSelectedDcChargingInfo->SystemStatus != S_FAULT) {
|
|
- if (pDcChargingInfo->SystemStatus == S_CHARGING) {
|
|
+ if (pSelectedDcChargingInfo->SystemStatus == S_CHARGING) {
|
|
pSysInfo->SystemPage = _LCM_COMPLETE;
|
|
pSysInfo->SystemPage = _LCM_COMPLETE;
|
|
} else {
|
|
} else {
|
|
systemPageRestoreInit();
|
|
systemPageRestoreInit();
|
|
@@ -4237,9 +4414,11 @@ int main(void)
|
|
|
|
|
|
ClearDetectPluginFlag();
|
|
ClearDetectPluginFlag();
|
|
|
|
|
|
- UpdateErrorCodeToOcpp(gunIndex);
|
|
+ if (pDcChargingInfo->SystemStatus != S_FAULT)
|
|
-
|
|
+ {
|
|
- setChargerMode(gunIndex, MODE_FAULT);
|
|
+ UpdateErrorCodeToOcpp(gunIndex);
|
|
|
|
+ setChargerMode(gunIndex, MODE_FAULT);
|
|
|
|
+ }
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4669,7 +4848,7 @@ int main(void)
|
|
StopGunInfoTimeoutDet(gunIndex);
|
|
StopGunInfoTimeoutDet(gunIndex);
|
|
}
|
|
}
|
|
|
|
|
|
- checkPileEndGfdResult(gunIndex, pDcChargingInfo->Type, pDcChargingInfo->SystemStatus);
|
|
+
|
|
#if 0
|
|
#if 0
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
if (pDcChargingInfo->Type == _Type_Chademo) {
|
|
|
|
|
|
@@ -4808,6 +4987,7 @@ int main(void)
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
|
|
|
|
RecordAlarmCode(gunIndex, "012235");
|
|
RecordAlarmCode(gunIndex, "012235");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdTrip = YES;
|
|
}
|
|
}
|
|
|
|
|
|
checkEvBoardReqStop(pDcChargingInfo->SystemStatus, gunIndex);
|
|
checkEvBoardReqStop(pDcChargingInfo->SystemStatus, gunIndex);
|
|
@@ -4854,6 +5034,7 @@ int main(void)
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
if (pDcChargingInfo->GroundFaultStatus == GFD_FAIL) {
|
|
|
|
|
|
RecordAlarmCode(gunIndex, "012235");
|
|
RecordAlarmCode(gunIndex, "012235");
|
|
|
|
+ ShmDcCommonData->ConnectErrList[gunIndex].GunBits.CCSGfdTrip = YES;
|
|
}
|
|
}
|
|
|
|
|
|
checkEvBoardReqStop(pDcChargingInfo->SystemStatus, gunIndex);
|
|
checkEvBoardReqStop(pDcChargingInfo->SystemStatus, gunIndex);
|
|
@@ -4870,9 +5051,6 @@ int main(void)
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
|
|
- checkEvBoardAlarmState(pDcChargingInfo->Type);
|
|
|
|
- checkChillerAlarmState();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#if defined DD360Audi
|
|
#if defined DD360Audi
|