|
@@ -1190,7 +1190,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, "B0.39.00.0000.00");
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.40.00.0000.00");
|
|
|
|
|
|
// Get AC connector type from model name
|
|
|
for(uint8_t idx=0;idx<3;idx++)
|
|
@@ -2262,6 +2262,11 @@ int main(void)
|
|
|
// Set max current to rating current
|
|
|
ShmCharger->gun_info[gun_index].primaryMcuCp_Pwn_Duty.max_current = ShmCharger->gun_info[gun_index].primaryMcuState.rating_current;
|
|
|
|
|
|
+ // Default Ethernet / Wifi / 4G to 1:disconnected
|
|
|
+ ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectViaEthernet = ON;
|
|
|
+ ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectViaWiFi = ON;
|
|
|
+ ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectVia4Gi = ON;
|
|
|
+
|
|
|
// If Web Server OPCC URL is empty kill Module_OcppBackend
|
|
|
if(strcmp((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,"") == 0)
|
|
|
{
|
|
@@ -2561,6 +2566,7 @@ int main(void)
|
|
|
ftime(&startTime[gun_index][TMR_IDX_LOGPPRINTOUT]);
|
|
|
ftime(&startTime[gun_index][TMR_IDX_PROFILE_PREPARE]);
|
|
|
startTime[gun_index][TMR_IDX_AUTH].time -= TIMEOUT_SPEC_AUTH;
|
|
|
+ ShmOCPP16Data->SpMsg.bits.AuthorizeReq = OFF;
|
|
|
}
|
|
|
|
|
|
if((ShmCharger->gun_info[gun_index].rfidReq == ON) ||
|
|
@@ -2664,18 +2670,20 @@ int main(void)
|
|
|
{
|
|
|
if(ShmOCPP16Data->SpMsg.bits.AuthorizeConf ||
|
|
|
(ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE) ||
|
|
|
- (!ShmOCPP16Data->OcppConnStatus&&(ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_FREE)))
|
|
|
+ (!ShmOCPP16Data->OcppConnStatus && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_LOCALLIST)) ||
|
|
|
+ (!ShmOCPP16Data->OcppConnStatus && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_FREE)))
|
|
|
{
|
|
|
if((strcmp((char*)ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status, "Accepted")==0) ||
|
|
|
(ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE) ||
|
|
|
- (!ShmOCPP16Data->OcppConnStatus&&(ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_FREE)))
|
|
|
+ (!ShmOCPP16Data->OcppConnStatus && (isValidLocalWhiteCard() == PASS) && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_LOCALLIST)) ||
|
|
|
+ (!ShmOCPP16Data->OcppConnStatus && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == OFF_POLICY_FREE)))
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].isAuthPassEnd = ON;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].rfidReq = OFF;
|
|
|
-
|
|
|
+ ShmOCPP16Data->SpMsg.bits.AuthorizeReq = OFF;
|
|
|
DEBUG_INFO("Authorize fail.\r\n");
|
|
|
setSpeaker(ON,SPEAKER_INTERVAL_3COUNT);
|
|
|
setLedMotion(gun_index,LED_ACTION_RFID_FAIL);
|
|
@@ -2688,7 +2696,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // If Authorize and Rfid card match with start User, The system should terminating to the end
|
|
|
+ // If Authorize is accpted or Rfid card match with start User, The system should terminating to the end
|
|
|
if(ShmCharger->gun_info[gun_index].isAuthPassEnd || isMatchStartUser(gun_index))
|
|
|
setChargerMode(gun_index, SYS_MODE_TERMINATING);
|
|
|
}
|
|
@@ -3275,4 +3283,4 @@ int main(void)
|
|
|
}
|
|
|
|
|
|
return FAIL;
|
|
|
-}
|
|
|
+}
|