|
@@ -289,7 +289,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Over voltage detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OVP == 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_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_OVER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OVP == 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_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_OVER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OVP == 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_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_UNDER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.UVP == 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_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_UNDER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.UVP == 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_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_UNDER_VOLTAGE)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.UVP == 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_UNDER_VOLTAGE)))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].UV[2] = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP == ON)
|
|
@@ -463,7 +463,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Over current detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_CURRENT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OCP == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == OFF)
|
|
|
{
|
|
@@ -472,7 +472,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_OVER_CURRENT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if ((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_CURRENT)))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == ON)
|
|
|
{
|
|
@@ -484,7 +484,7 @@ int main(void)
|
|
|
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount == 3)
|
|
|
{
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_CURRENT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OCP == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == OFF)
|
|
|
{
|
|
@@ -493,7 +493,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_OVER_CURRENT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if ((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_CURRENT)))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == ON)
|
|
|
{
|
|
@@ -503,7 +503,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_CURRENT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.OCP == ON)
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == OFF)
|
|
|
{
|
|
@@ -512,7 +512,7 @@ int main(void)
|
|
|
DEBUG_INFO("ALARM_OVER_CURRENT : alarm \n");
|
|
|
}
|
|
|
}
|
|
|
- else if ((!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_OVER_CURRENT)))
|
|
|
+ else
|
|
|
{
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP == ON)
|
|
|
{
|
|
@@ -526,7 +526,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)
|
|
|
{
|
|
@@ -542,7 +542,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)
|
|
@@ -556,7 +556,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)
|
|
|
{
|
|
@@ -572,7 +572,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)
|
|
@@ -586,7 +586,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)
|
|
|
{
|
|
@@ -602,7 +602,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)
|
|
@@ -616,21 +616,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;
|
|
@@ -643,8 +643,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)
|
|
@@ -668,7 +667,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)
|
|
|
{
|
|
@@ -684,7 +683,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)
|
|
@@ -698,7 +697,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)
|
|
|
{
|
|
@@ -708,7 +707,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)
|
|
|
{
|
|
@@ -721,7 +720,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)
|
|
|
{
|
|
@@ -737,7 +736,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)
|
|
@@ -751,7 +750,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)
|
|
|
{
|
|
@@ -767,7 +766,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)
|
|
@@ -781,7 +780,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)
|
|
|
{
|
|
@@ -797,7 +796,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)
|
|
@@ -811,7 +810,7 @@ int main(void)
|
|
|
//=====================================
|
|
|
// Current short detection
|
|
|
//=====================================
|
|
|
- if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_SHORT)
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuAlarm.bits.circuit_short == ON)
|
|
|
{
|
|
|
if(Alarm_Counter[gun_index].Short > FILTER_SPEC)
|
|
|
{
|
|
@@ -827,7 +826,7 @@ int main(void)
|
|
|
Alarm_Counter[gun_index].Short++;
|
|
|
}
|
|
|
}
|
|
|
- else if(!(ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode & ALARM_CURRENT_SHORT))
|
|
|
+ else
|
|
|
{
|
|
|
Alarm_Counter[gun_index].Short = 0;
|
|
|
if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CircuitShort == ON)
|
|
@@ -841,7 +840,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)
|
|
|
{
|
|
@@ -850,7 +849,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)
|
|
|
{
|
|
@@ -863,7 +862,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)
|
|
|
{
|
|
@@ -872,7 +871,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)
|
|
|
{
|
|
@@ -885,7 +884,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)
|
|
|
{
|
|
@@ -894,7 +893,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)
|
|
|
{
|
|
@@ -907,7 +906,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)
|
|
|
{
|
|
@@ -916,7 +915,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)
|
|
|
{
|
|
@@ -929,7 +928,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)
|
|
|
{
|
|
@@ -938,7 +937,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)
|
|
|
{
|