|
@@ -1354,6 +1354,26 @@ uint8_t ocpp_isAuthorizeRemoteStart()
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+uint8_t ocpp_get_freevend_idtag(uint8_t * userId)
|
|
|
+{
|
|
|
+ uint8_t result = NO;
|
|
|
+
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ {
|
|
|
+ strcpy((char*)userId, (char*)ShmOCPP16Data->ConfigurationTable.CoreProfile[FreeVendIdtag].ItemData);
|
|
|
+
|
|
|
+ result = YES;
|
|
|
+ }
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ {
|
|
|
+ strcpy((char*)userId, (char*)ShmOCPP20Data->ControllerComponentVariable[ChargingStation_FreeVendIdtag].variableAttribute[0].value);
|
|
|
+
|
|
|
+ result = YES;
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+}
|
|
|
+
|
|
|
//======================================================
|
|
|
// Check interface status
|
|
|
//======================================================
|
|
@@ -5447,7 +5467,8 @@ int main(void)
|
|
|
{
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartMethod = START_METHOD_FREE;
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartIdType = IdTokenType_NoAuthorization;
|
|
|
- memcpy(ShmSysConfigAndInfo->SysConfig.UserId, ShmSysConfigAndInfo->SysConfig.SerialNumber, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.SerialNumber));
|
|
|
+ //memcpy(ShmSysConfigAndInfo->SysConfig.UserId, ShmSysConfigAndInfo->SysConfig.SerialNumber, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.SerialNumber));
|
|
|
+ ocpp_get_freevend_idtag(ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
setSpeaker(ON, SPEAKER_SHORT);
|
|
|
DEBUG_INFO("Start Method : FREE...\n");
|
|
|
}
|