|
@@ -1186,7 +1186,7 @@ void get_firmware_version(unsigned char gun_index)
|
|
|
strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
|
|
|
|
|
|
// Get CSU root file system version
|
|
|
- sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.19.00.0000.00");
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.20.00.0000.00");
|
|
|
|
|
|
// Get AC connector type from model name
|
|
|
for(uint8_t idx=0;idx<3;idx++)
|
|
@@ -2642,17 +2642,7 @@ int main(void)
|
|
|
case HANDSHAKE_BS_MODE:
|
|
|
if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_C)
|
|
|
setRelay(gun_index,ON);
|
|
|
- if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_HANDSHAKING]) > ShmCharger->timeoutSpec.Present_Timeout_Spec)
|
|
|
- {
|
|
|
- setLedMotion(gun_index, LED_ACTION_HANDSHAKE_FAIL);
|
|
|
-
|
|
|
- if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_HANDSHAKING]) > (ShmCharger->timeoutSpec.Present_Timeout_Spec+5000))
|
|
|
- {
|
|
|
- DEBUG_INFO("Handshaking timeout...\r\n");
|
|
|
- setChargerMode(gun_index, SYS_MODE_IDLE);
|
|
|
- }
|
|
|
- }
|
|
|
- else if((ShmCharger->gun_info[gun_index].primaryMcuState.relay_state == ON))
|
|
|
+ if((ShmCharger->gun_info[gun_index].primaryMcuState.relay_state == ON))
|
|
|
{
|
|
|
ShmCharger->gun_info[ShmOCPP16Data->UnlockConnector[gun_index].ConnectorId-1].isUnlockerConnetor = OFF;
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy = 0;
|
|
@@ -2741,9 +2731,9 @@ int main(void)
|
|
|
ShmCharger->gun_info[gun_index].acCcsInfo.EVSENotification = 1;
|
|
|
ShmCharger->gun_info[gun_index].isCCSWaitChangeDuty = ON;
|
|
|
|
|
|
-//#ifdef CCS_SIMULATION_DATA
|
|
|
+#ifdef CCS_SIMULATION_DATA
|
|
|
ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty = CCS_PWM_DUTY_100;
|
|
|
-//#endif //CCS_SIMULATION_DATA
|
|
|
+#endif //CCS_SIMULATION_DATA
|
|
|
}
|
|
|
|
|
|
// Use RFID card to stop handshaking
|
|
@@ -2767,6 +2757,25 @@ int main(void)
|
|
|
ShmCharger->gun_info[gun_index].rfidReq = OFF;
|
|
|
}
|
|
|
|
|
|
+ if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_HANDSHAKING]) > ShmCharger->timeoutSpec.Present_Timeout_Spec)
|
|
|
+ {
|
|
|
+ setLedMotion(gun_index, LED_ACTION_HANDSHAKE_FAIL);
|
|
|
+
|
|
|
+ if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_HANDSHAKING]) > (ShmCharger->timeoutSpec.Present_Timeout_Spec+5000))
|
|
|
+ {
|
|
|
+ DEBUG_INFO("Handshaking timeout...\r\n");
|
|
|
+
|
|
|
+ //Cancel CCS task negotiating
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.ChargingPermission = OFF;
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVSENotification = 1;
|
|
|
+ ShmCharger->gun_info[gun_index].isCCSWaitChangeDuty = ON;
|
|
|
+
|
|
|
+#ifdef CCS_SIMULATION_DATA
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty = CCS_PWM_DUTY_100;
|
|
|
+#endif //CCS_SIMULATION_DATA
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if((ShmCharger->gun_info[gun_index].isCCSWaitChangeDuty == ON) && ShmCharger->gun_info[gun_index].acCcsInfo.CpSetPWMDuty != CCS_PWM_DUTY_5)
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].primaryMcuCp_Pwn_Duty.max_current = CCS_PWM_DUTY_100;
|