|
@@ -1655,7 +1655,7 @@ void CP_Detection()
|
|
|
|
|
|
//ftime(&EndTime);
|
|
|
//DEBUG_PRINTF_EVCOMM_DETAIL("duration:%.02lf\n", DiffTimeb(StartTime, EndTime));
|
|
|
- usleep(100000);
|
|
|
+ usleep(1000);
|
|
|
}//while
|
|
|
}
|
|
|
|
|
@@ -1724,7 +1724,7 @@ void PP_Detection()
|
|
|
sleep(5);
|
|
|
printf("V_pp = %.02f\n", TotalTmpVolt);
|
|
|
#endif
|
|
|
- usleep(100000);
|
|
|
+ usleep(1000);
|
|
|
}//while
|
|
|
}
|
|
|
|
|
@@ -2031,7 +2031,7 @@ void Error_Monitor()
|
|
|
Update_V2G_Flow_Status(Other_Fault);
|
|
|
End_Process();
|
|
|
}
|
|
|
- usleep(100000);
|
|
|
+ usleep(1000);
|
|
|
}//while
|
|
|
}
|
|
|
|
|
@@ -2401,10 +2401,13 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
struct MmeHeader *MmePacket;
|
|
|
static unsigned char counter;
|
|
|
unsigned char state = 0;
|
|
|
- unsigned char *EvMac_in;
|
|
|
- unsigned char *RunID_in;
|
|
|
+ unsigned char tmpBuf[2048]={0};
|
|
|
int Rtn = 0;
|
|
|
+#if(NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
|
|
|
int idx = 0;
|
|
|
+ unsigned char *EvMac_in;
|
|
|
+ unsigned char *RunID_in;
|
|
|
+#endif
|
|
|
|
|
|
MmePacket = (struct MmeHeader *)Buffer;
|
|
|
state = Check_V2G_Flow_Status();
|
|
@@ -2646,7 +2649,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
|
|
|
#if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Response MME Packet *****\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("***** Response MME Packet *****\n");
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
|
|
|
SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
|
|
@@ -2679,6 +2682,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n",SendMmePacketSize,Rtn);
|
|
|
|
|
|
ftime(&SeqStartTime);
|
|
|
+ counter = 0;
|
|
|
break;
|
|
|
}
|
|
|
#else
|
|
@@ -2768,7 +2772,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
|
|
|
#if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_START_ATTEN_CHAR_IND (counter : %d/3 ) ---\n",counter + 1);
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_START_ATTEN_CHAR_IND (counter : %d/3 ) ---\n", counter);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("NUM_SOUNDS: 0x%x\n", MmePacket->MMENTRY[2]);
|
|
@@ -2793,7 +2797,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
if (idx >= 0)
|
|
|
{
|
|
|
Update_V2G_Flow_Status(CM_START_ATTEN_CHAR_IND);
|
|
|
-
|
|
|
+ counter++;
|
|
|
//[TC_SECC_VTB_AttenuationCharacterization_013]
|
|
|
if (MmePacket->MMENTRY[0] != 0) //APPLICATION_TYPE must be 0x00(EV-EVSE Matching)
|
|
|
{
|
|
@@ -2926,9 +2930,14 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
|
|
|
+ if(V2gFlowStatus == CM_START_ATTEN_CHAR_IND)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_MNBC_SOUND_IND (counter : %d/%d) ---\n",counter + 1 , MnbcSoundNum);
|
|
|
+ counter = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
+ {
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_MNBC_SOUND_IND (counter : %d/%d) ---\n", counter, SLAC_INFO.array[idx].MnbcSoundNum);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SenderID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
|
|
@@ -2963,6 +2972,7 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
if (idx >= 0)
|
|
|
{
|
|
|
Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
|
|
|
+ counter++;
|
|
|
|
|
|
//Check for RunID
|
|
|
if (SLAC_DB_Check_EvMac_RunID_Matching(&SLAC_INFO, EvMac_in, RunID_in) == TRUE)
|
|
@@ -3011,9 +3021,9 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
|
|
|
+ #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_ATTEN_PROFILE_IND (counter : %d/%d) ---\n", counter, MnbcSoundNum);
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_ATTEN_PROFILE_IND (counter : %d/%d) ---\n", counter, SLAC_INFO.array[idx].MnbcSoundNum);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("EV MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
|
|
MmePacket->MMENTRY[0], MmePacket->MMENTRY[1], MmePacket->MMENTRY[2], MmePacket->MMENTRY[3],
|
|
|
MmePacket->MMENTRY[4], MmePacket->MMENTRY[5]);
|
|
@@ -3021,13 +3031,13 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
//NumGroups: Number of OFDM carrier groups used for the SLAC signal characterization.
|
|
|
//AAG[i]: Average Attenuation of Group i (i = 1 ~ 58)
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: 0x%x\n", MmePacket->MMENTRY[7]);
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("AAG: \n");
|
|
|
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(Rtn = 0; Rtn < MmePacket->MMENTRY[6]; Rtn++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[8 + Rtn]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, MmePacket->MMENTRY[8 + Rtn]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("AAG: %s\n", tmpBuf);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
@@ -3112,18 +3122,20 @@ int MmeProcess(unsigned char *Buffer, int DataLength)
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
|
|
|
MmePacket->MMENTRY[8],MmePacket->MMENTRY[9],MmePacket->MMENTRY[10],MmePacket->MMENTRY[11],
|
|
|
MmePacket->MMENTRY[12],MmePacket->MMENTRY[13],MmePacket->MMENTRY[14],MmePacket->MMENTRY[15]);
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: \n");
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(Rtn = 0; Rtn < 17; Rtn++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[16 + Rtn]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, MmePacket->MMENTRY[16 + Rtn]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: \n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: %s\n", tmpBuf);
|
|
|
+ ;
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(Rtn = 0; Rtn < 17; Rtn++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[33 + Rtn]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, MmePacket->MMENTRY[33 + Rtn]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: %s\n", tmpBuf);
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("Result: 0x%x\n", MmePacket->MMENTRY[50]); //Fixed value of 0x00 indicates a successful SLAC process
|
|
|
}
|
|
|
#endif
|
|
@@ -3904,14 +3916,16 @@ GLOBAL VARIABLES:
|
|
|
int SlacComm()
|
|
|
{
|
|
|
static unsigned char qca7k_comm_retry = 0;
|
|
|
- unsigned char *EvMac_in;
|
|
|
- unsigned char *RunID_in;
|
|
|
double t_diff = 0;
|
|
|
int packet_size = 0;
|
|
|
int count = 0;
|
|
|
//int idx = 0;
|
|
|
+ unsigned char tmpBuf[2048]={0};
|
|
|
+#if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
|
|
|
+ unsigned char *EvMac_in;
|
|
|
+ unsigned char *RunID_in;
|
|
|
int i = 0;
|
|
|
-
|
|
|
+#endif
|
|
|
if(RawSock >= 0)
|
|
|
{
|
|
|
memset(V2gtpMsgRxBuf, 0, V2GTP_MSG_RX_BUFFER_SIZE);
|
|
@@ -4327,7 +4341,7 @@ int SlacComm()
|
|
|
}
|
|
|
SendMmePacketSize += 19; //the size before MMENTRY
|
|
|
|
|
|
- #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
|
|
|
+ #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
{
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Send MME Packet *****\n");
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
|
|
@@ -4347,25 +4361,29 @@ int SlacComm()
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
|
|
|
SendMmePacket.MMENTRY[8],SendMmePacket.MMENTRY[9],SendMmePacket.MMENTRY[10],SendMmePacket.MMENTRY[11],
|
|
|
SendMmePacket.MMENTRY[12],SendMmePacket.MMENTRY[13],SendMmePacket.MMENTRY[14],SendMmePacket.MMENTRY[15]);
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: \n");
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(count=0; count<17; count++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[16+count]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, SendMmePacket.MMENTRY[16+count]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: \n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: %s\n", tmpBuf);
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(count=0; count<17; count++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[33+count]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, SendMmePacket.MMENTRY[33+count]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: %s\n", tmpBuf);
|
|
|
+
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("NumSounds: 0x%x\n", SendMmePacket.MMENTRY[50]);
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("ATTEN_PROFILE: \n");
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(count=0; count<AagGroupsNum; count++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[51+count]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, SendMmePacket.MMENTRY[51+count]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("ATTEN_PROFILE: %s\n", tmpBuf);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
@@ -4471,7 +4489,7 @@ int SlacComm()
|
|
|
}
|
|
|
SendMmePacketSize += 19; //the size before MMENTRY
|
|
|
|
|
|
- #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
|
|
|
+ #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
|
|
|
{
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Send MME Packet *****\n");
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
|
|
@@ -4491,25 +4509,29 @@ int SlacComm()
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
|
|
|
SendMmePacket.MMENTRY[8],SendMmePacket.MMENTRY[9],SendMmePacket.MMENTRY[10],SendMmePacket.MMENTRY[11],
|
|
|
SendMmePacket.MMENTRY[12],SendMmePacket.MMENTRY[13],SendMmePacket.MMENTRY[14],SendMmePacket.MMENTRY[15]);
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: \n");
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(count=0; count<17; count++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[16+count]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, SendMmePacket.MMENTRY[16+count]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: \n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: %s\n", tmpBuf);
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));;
|
|
|
for(count=0; count<17; count++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[33+count]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, SendMmePacket.MMENTRY[33+count]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: %s\n", tmpBuf);
|
|
|
+
|
|
|
DEBUG_PRINTF_EVCOMM_DETAIL("NumSounds: 0x%x\n", SendMmePacket.MMENTRY[50]);
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("ATTEN_PROFILE: \n");
|
|
|
+
|
|
|
+ memset(tmpBuf, 0x00, ARRAY_SIZE(tmpBuf));
|
|
|
for(count=0; count<AagGroupsNum; count++)
|
|
|
{
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[51+count]);
|
|
|
+ sprintf((char*)tmpBuf, "%s%02x,", tmpBuf, SendMmePacket.MMENTRY[51+count]);
|
|
|
}
|
|
|
- DEBUG_PRINTF_EVCOMM_DETAIL("\n");
|
|
|
+ DEBUG_PRINTF_EVCOMM_DETAIL("ATTEN_PROFILE: %s\n", tmpBuf);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
@@ -16216,6 +16238,76 @@ int Parameters_Init()
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+/*===========================================================================
|
|
|
+FUNCTION: AC share memory synchronize
|
|
|
+DESCRIPTION:
|
|
|
+PRE-CONDITION:
|
|
|
+INPUT:
|
|
|
+OUTPUT:
|
|
|
+GLOBAL VARIABLES:
|
|
|
+=============================================================================*/
|
|
|
+int SyncAcShreaMemory()
|
|
|
+{
|
|
|
+#if (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE)
|
|
|
+ pid_t pid;
|
|
|
+
|
|
|
+ pid = fork();
|
|
|
+ if(pid == 0)
|
|
|
+ {
|
|
|
+ for(;;)
|
|
|
+ {
|
|
|
+ if(!EVCOMM_SYS_INFO.End_Process_inused)
|
|
|
+ {
|
|
|
+ for(uint8_t gun_index=0;gun_index<1;gun_index++)
|
|
|
+ {
|
|
|
+ //========================================
|
|
|
+ // CSU -> CCS setting
|
|
|
+ //========================================
|
|
|
+ // Permission
|
|
|
+ if(ShmInternalComm->ChargingPermission != ShmCharger->gun_info[gun_index].acCcsInfo.ChargingPermission)
|
|
|
+ {
|
|
|
+ DEBUG_INFO("AC permission: %d -> %d\n", ShmInternalComm->ChargingPermission, ShmCharger->gun_info[gun_index].acCcsInfo.ChargingPermission);
|
|
|
+ ShmInternalComm->ChargingPermission_new = ShmCharger->gun_info[gun_index].acCcsInfo.ChargingPermission;
|
|
|
+ ShmInternalComm->ChargingPermission_pre = ShmInternalComm->ChargingPermission;
|
|
|
+ ShmInternalComm->ChargingPermission = ShmInternalComm->ChargingPermission_new;
|
|
|
+ }
|
|
|
+
|
|
|
+ // CP
|
|
|
+ ShmInternalComm->AC_CpPositiveVoltage = ShmCharger->gun_info[gun_index].acCcsInfo.CpPositiveVoltage;
|
|
|
+ if(ShmInternalComm->AC_CpPresentState != ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState)
|
|
|
+ {
|
|
|
+ DEBUG_INFO("CP state: %d -> %d\n", ShmInternalComm->AC_CpPresentState, ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState);
|
|
|
+ ShmInternalComm->AC_CpPresentState = ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentState;
|
|
|
+ }
|
|
|
+
|
|
|
+ //========================================
|
|
|
+ // CCS -> CSU check
|
|
|
+ //========================================
|
|
|
+ // CP check status
|
|
|
+ /*
|
|
|
+ if(ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty != ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentPWMDuty)
|
|
|
+ {
|
|
|
+ DEBUG_INFO("acCcsInfo.CpSetPWMDuty: %d -> %d\n", ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty, ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentPWMDuty);
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty = ShmCharger->gun_info[gun_index].acCcsInfo.CpPresentPWMDuty;
|
|
|
+ }*/
|
|
|
+
|
|
|
+ // V2G message flow status
|
|
|
+ if(ShmCharger->gun_info[gun_index].acCcsInfo.PresentMsgFlowStatus != Check_V2G_Flow_Status())
|
|
|
+ {
|
|
|
+ //DEBUG_INFO("PresentMsgFlowStatus: %d -> %d\n", ShmCharger->gun_info[gun_index].acCcsInfo.PresentMsgFlowStatus, Check_V2G_Flow_Status());
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.PresentMsgFlowStatus = Check_V2G_Flow_Status();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ usleep(1000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
|
|
|
/*===========================================================================
|
|
|
FUNCTION: main
|
|
@@ -16302,6 +16394,8 @@ int main(int argc, char *argv[])
|
|
|
sleep(1); //wait for tcpdump getting ready
|
|
|
#endif
|
|
|
|
|
|
+ SyncAcShreaMemory();
|
|
|
+
|
|
|
SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Init]DONE");
|
|
|
|
|
|
while(1)
|
|
@@ -16393,6 +16487,6 @@ int main(int argc, char *argv[])
|
|
|
//null
|
|
|
}
|
|
|
}
|
|
|
- usleep(100000);
|
|
|
+ usleep(1000);
|
|
|
} //while
|
|
|
}//main while
|