|
@@ -1846,47 +1846,57 @@ int main(void)
|
|
|
{
|
|
|
if(ShmCharger->gun_info[gun_index].PilotVoltage.PilotVoltageNegative >= -12)
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_G;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_G;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_H;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_H;
|
|
|
}
|
|
|
}
|
|
|
else if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A)
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_A;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_A;
|
|
|
}
|
|
|
else if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_B)
|
|
|
{
|
|
|
if(ShmCharger->gun_info[gun_index].PilotVoltage.PilotVoltageNegative == 0.0)
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_B1;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_B1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_B2;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_B2;
|
|
|
}
|
|
|
}
|
|
|
else if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_C)
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_C;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_C;
|
|
|
}
|
|
|
else if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_D)
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_D;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_D;
|
|
|
}
|
|
|
else if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_E)
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_E;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_E;
|
|
|
}
|
|
|
else //CP_STATE_F
|
|
|
{
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentState = CCS_CP_STATE_F;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState = CCS_CP_STATE_F;
|
|
|
}
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPositiveVoltage = ShmCharger->gun_info[gun_index].PilotVoltage.PilotVoltagePositive;
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPNegativeVoltage = ShmCharger->gun_info[gun_index].PilotVoltage.PilotVoltageNegative;
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.CPPresentPWMDuty = ShmCharger->gun_info[gun_index].primaryMcuState.current_limit;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPositiveVoltage = ShmCharger->gun_info[gun_index].PilotVoltage.PilotVoltagePositive;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpNegativeVoltage = ShmCharger->gun_info[gun_index].PilotVoltage.PilotVoltageNegative;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentPWMDuty = ShmCharger->gun_info[gun_index].primaryMcuState.current_limit;
|
|
|
+
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][0]>0)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.OutputRelayStatus = ON;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.OutputRelayStatus = OFF;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
failCount[gun_index] = 0;
|
|
|
}
|
|
@@ -2280,8 +2290,15 @@ int main(void)
|
|
|
ShmSysConfigAndInfo->SysInfo.InputVoltageR = ShmCharger->gun_info[gun_index].inputVoltage.L1N_L12;
|
|
|
ShmSysConfigAndInfo->SysInfo.InputVoltageS = ShmCharger->gun_info[gun_index].inputVoltage.L2N_L23;
|
|
|
ShmSysConfigAndInfo->SysInfo.InputVoltageT = ShmCharger->gun_info[gun_index].inputVoltage.L3N_L31;
|
|
|
+
|
|
|
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingVoltage = ShmCharger->gun_info[gun_index].inputVoltage.L1N_L12;
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingVoltageL2 = ShmCharger->gun_info[gun_index].inputVoltage.L2N_L23;
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingVoltageL3 = ShmCharger->gun_info[gun_index].inputVoltage.L3N_L31;
|
|
|
+
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.GridVoltage[0] = ShmSysConfigAndInfo->SysInfo.InputVoltageR;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.GridVoltage[1] = ShmSysConfigAndInfo->SysInfo.InputVoltageS;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.GridVoltage[2] = ShmSysConfigAndInfo->SysInfo.InputVoltageT;
|
|
|
|
|
|
failCount[gun_index] = 0;
|
|
|
}
|
|
@@ -2301,6 +2318,13 @@ int main(void)
|
|
|
if(Query_Present_OutputCurrent(Uart1Fd, (gun_index>0?ADDR_AC_PRIMARY_2:ADDR_AC_PRIMARY_1), &ShmCharger->gun_info[gun_index].outputCurrent) == PASS)
|
|
|
{
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingCurrent = (float)ShmCharger->gun_info[gun_index].outputCurrent.L1N_L12[0];
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingCurrentL2 = (float)ShmCharger->gun_info[gun_index].outputCurrent.L2N_L23[0];
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingCurrentL3 = (float)ShmCharger->gun_info[gun_index].outputCurrent.L3N_L31[0];
|
|
|
+
|
|
|
+
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVSEPresentCurrent[0] = (float)ShmCharger->gun_info[gun_index].outputCurrent.L1N_L12[0];
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVSEPresentCurrent[1] = (float)ShmCharger->gun_info[gun_index].outputCurrent.L1N_L12[0];
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVSEPresentCurrent[2] = (float)ShmCharger->gun_info[gun_index].outputCurrent.L1N_L12[0];
|
|
|
|
|
|
failCount[gun_index] = 0;
|
|
|
}
|