|
@@ -289,7 +289,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Over voltage detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_OVER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OVP_L1 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].OV[0] > FILTER_SPEC)
|
|
|
{
|
|
@@ -305,7 +305,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].OV[0]++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_OVER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].OV[0] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP == ON)
|
|
@@ -318,7 +318,7 @@ int main(void)
|
|
|
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount == 3)
|
|
|
{
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_OVER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OVP_L2 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].OV[1] > FILTER_SPEC)
|
|
|
{
|
|
@@ -334,7 +334,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].OV[1]++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_OVER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].OV[1] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP == ON)
|
|
@@ -345,7 +345,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_OVER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OVP_L3 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].OV[2] > FILTER_SPEC)
|
|
|
{
|
|
@@ -361,7 +361,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].OV[2]++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_OVER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].OV[2] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP == ON)
|
|
@@ -376,7 +376,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Under voltage detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_UNDER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.UVP_L1 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].UV[0] > FILTER_SPEC)
|
|
|
{
|
|
@@ -392,7 +392,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].UV[0]++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_UNDER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].UV[0] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP == ON)
|
|
@@ -405,7 +405,7 @@ int main(void)
|
|
|
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount == 3)
|
|
|
{
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_UNDER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.UVP_L2 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].UV[1] > FILTER_SPEC)
|
|
|
{
|
|
@@ -421,7 +421,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].UV[1]++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_UNDER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].UV[1] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP == ON)
|
|
@@ -432,7 +432,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_UNDER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.UVP_L3 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].UV[2] > FILTER_SPEC)
|
|
|
{
|
|
@@ -448,7 +448,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].UV[2]++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_UNDER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].UV[2] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP == ON)
|
|
@@ -464,7 +464,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Over current detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_OVER_CURRENT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OCP_L1 == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == OFF)
|
|
|
{
|
|
@@ -473,7 +473,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_L1_OVER_CURRENT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if ((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_OVER_CURRENT)))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == ON)
|
|
|
{
|
|
@@ -485,7 +485,7 @@ int main(void)
|
|
|
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount == 3)
|
|
|
{
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_OVER_CURRENT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OCP_L2 == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCPL2 == OFF)
|
|
|
{
|
|
@@ -494,7 +494,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_L2_OVER_CURRENT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if ((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_OVER_CURRENT)))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCPL2 == ON)
|
|
|
{
|
|
@@ -504,7 +504,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_OVER_CURRENT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OCP_L3 == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCPL3 == OFF)
|
|
|
{
|
|
@@ -513,7 +513,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_L3_OVER_CURRENT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if ((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_OVER_CURRENT)))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCPL3 == ON)
|
|
|
{
|
|
@@ -527,7 +527,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Over temperature detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_TEMPERATURE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OTP == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].OT_AMB > FILTER_SPEC)
|
|
|
{
|
|
@@ -543,7 +543,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].OT_AMB++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_TEMPERATURE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].OT_AMB = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAmbientOTP == ON)
|
|
@@ -557,7 +557,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Ground fault detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_GROUND_FAIL)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.gmi_fault == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].GMI > FILTER_SPEC)
|
|
|
{
|
|
@@ -573,7 +573,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].GMI++;
|
|
|
}
|
|
|
}
|
|
|
- else if (!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_GROUND_FAIL))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].GMI = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.AcGroundfaultFail == ON)
|
|
@@ -587,7 +587,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// CP level fail detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CP_ERROR)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.cp_fault == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].CP_LevelFail > FILTER_SPEC)
|
|
|
{
|
|
@@ -603,7 +603,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].CP_LevelFail++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CP_ERROR))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].CP_LevelFail= 0;
|
|
|
if(ShmStatusCodeData->InfoCode.InfoEvents.bits.PilotFault == ON)
|
|
@@ -617,21 +617,21 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Current AC/DC leak detection
|
|
|
//=====================================
|
|
|
- if((ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_LEAK_AC) ||
|
|
|
- (ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_LEAK_DC))
|
|
|
+ if((ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.ac_leak == ON) ||
|
|
|
+ (ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.dc_leak == ON))
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Leakage > FILTER_SPEC)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.RcdTrip == OFF)
|
|
|
{
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.RcdTrip = ON;
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_LEAK_AC)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.ac_leak == ON)
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode |= ALARM_CURRENT_LEAK_AC;
|
|
|
ShmCharger->gun_info[gun_index].otherAlarmCode.isACLeakage = ON;
|
|
|
DEBUG_INFO("ALARM_CURRENT_LEAK_AC : alarm \n");
|
|
|
}
|
|
|
- else if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_LEAK_DC)
|
|
|
+ else if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.dc_leak == ON)
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode |= ALARM_CURRENT_LEAK_DC;
|
|
|
ShmCharger->gun_info[gun_index].otherAlarmCode.isDcLeakage = ON;
|
|
@@ -644,8 +644,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Leakage++;
|
|
|
}
|
|
|
}
|
|
|
- else if((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_LEAK_AC)) ||
|
|
|
- (!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_LEAK_DC)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Leakage = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.RcdTrip == ON)
|
|
@@ -669,7 +668,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// MCU self test fail detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_MCU_TESTFAIL)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.mcu_selftest_fail == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].MCU_SelfTestFail > FILTER_SPEC)
|
|
|
{
|
|
@@ -685,7 +684,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].MCU_SelfTestFail++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_MCU_TESTFAIL))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].MCU_SelfTestFail = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.McuSelftestFail == ON)
|
|
@@ -699,7 +698,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Hand shaking timeout detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_HANDSHAKE_TIMEOUT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.handshaking_timeout == ON)
|
|
|
{
|
|
|
if(ShmCharger->gun_info[gun_index].otherAlarmCode.isHandshakingTimeOut == OFF)
|
|
|
{
|
|
@@ -709,7 +708,7 @@ int main(void)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_HANDSHAKE_TIMEOUT))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmCharger->gun_info[gun_index].otherAlarmCode.isHandshakingTimeOut == ON)
|
|
|
{
|
|
@@ -722,7 +721,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Emergency stop detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_EMERGENCY_STOP)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.emergency_stop == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].EmrgencyBTN > FILTER_SPEC)
|
|
|
{
|
|
@@ -738,7 +737,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].EmrgencyBTN++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_EMERGENCY_STOP))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].EmrgencyBTN = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip == ON)
|
|
@@ -752,7 +751,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Relay welding detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_RELAY_WELDING)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.relay_welding == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Relay_Welding > FILTER_SPEC)
|
|
|
{
|
|
@@ -768,7 +767,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Relay_Welding++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_RELAY_WELDING))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Relay_Welding = 0;
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.AcOutputRelayWelding == ON)
|
|
@@ -782,7 +781,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Relay driving fault detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_RELAY_DRIVE_FAULT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.relay_drive_fault == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Relay_DrivingFault > FILTER_SPEC)
|
|
|
{
|
|
@@ -798,7 +797,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Relay_DrivingFault++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_RELAY_DRIVE_FAULT))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Relay_DrivingFault = 0;
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.AcOutputRelayDrivingFault == ON)
|
|
@@ -812,7 +811,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Current short detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_CIRCUIT_SHORT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.short_circuit_L1 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Short[0] > FILTER_SPEC)
|
|
|
{
|
|
@@ -828,7 +827,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Short[0]++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L1_CIRCUIT_SHORT))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Short[0] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CircuitShort == ON)
|
|
@@ -841,7 +840,7 @@ int main(void)
|
|
|
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount == 3)
|
|
|
{
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_CIRCUIT_SHORT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.short_circuit_L2 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Short[1] > FILTER_SPEC)
|
|
|
{
|
|
@@ -857,7 +856,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Short[1]++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L2_CIRCUIT_SHORT))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Short[1] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CircuitShortL2 == ON)
|
|
@@ -868,7 +867,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_CIRCUIT_SHORT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.short_circuit_L3 == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Short[2] > FILTER_SPEC)
|
|
|
{
|
|
@@ -884,7 +883,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Short[2]++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_L3_CIRCUIT_SHORT))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Short[2] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CircuitShortL3 == ON)
|
|
@@ -899,7 +898,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Rotatory switch detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_ROTATORY_SWITCH_FAULT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.rotate_switch_fault == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.RotarySwitchFault == OFF)
|
|
|
{
|
|
@@ -908,7 +907,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_ROTATORY_SWITCH_FAULT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_ROTATORY_SWITCH_FAULT))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.RotarySwitchFault == ON)
|
|
|
{
|
|
@@ -921,7 +920,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Leakage module detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_LEAK_MODULE_FAIL)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.leak_module_fail == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.RcdSelfTestFail == OFF)
|
|
|
{
|
|
@@ -930,7 +929,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_LEAK_MODULE_FAIL : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_LEAK_MODULE_FAIL))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.RcdSelfTestFail == ON)
|
|
|
{
|
|
@@ -943,7 +942,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Shutter detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_SHUTTER_FAULT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.shutter_fault == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.ShutterFault == OFF)
|
|
|
{
|
|
@@ -952,7 +951,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_SHUTTER_FAULT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_SHUTTER_FAULT))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.ShutterFault == ON)
|
|
|
{
|
|
@@ -965,7 +964,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Locker detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_LOCKER_FAULT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.locker_fault == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.AcConnectorLockFail == OFF)
|
|
|
{
|
|
@@ -974,7 +973,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_LOCKER_FAULT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_LOCKER_FAULT))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->FaultCode.FaultEvents.bits.AcConnectorLockFail == ON)
|
|
|
{
|
|
@@ -987,7 +986,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Power drop detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_POWER_DROP)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.power_drop == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputDrop == OFF)
|
|
|
{
|
|
@@ -996,7 +995,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_POWER_DROP : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_POWER_DROP))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputDrop == ON)
|
|
|
{
|
|
@@ -1009,7 +1008,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Meter communication timeout detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_METER_TIMEOUT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.meter_comm_timeout)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.MeterCommTimeout == OFF)
|
|
|
{
|
|
@@ -1018,7 +1017,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_METER_TIMEOUT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_METER_TIMEOUT))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.MeterCommTimeout == ON)
|
|
|
{
|