|
@@ -4673,7 +4673,7 @@ void checkConnectionTimeout()
|
|
|
ShmCharger->timeoutSpec.Setting_Timeout_Spec = ocpp_get_connection_timeout();
|
|
|
DEBUG_INFO("[ConnectionTimeOut] Receive timeout specification: [%d] \n", ShmCharger->timeoutSpec.Setting_Timeout_Spec);
|
|
|
|
|
|
- if(ShmCharger->timeoutSpec.Setting_Timeout_Spec >= (TIMEOUT_SPEC_BS_HLC_HANDSHAKE+10))
|
|
|
+ if((ShmCharger->timeoutSpec.Setting_Timeout_Spec >= (TIMEOUT_SPEC_BS_HLC_HANDSHAKE+5)) && (ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 3600))
|
|
|
{
|
|
|
DEBUG_INFO("[ConnectionTimeOut] Valid value: [%d] \n", ShmCharger->timeoutSpec.Setting_Timeout_Spec);
|
|
|
}
|
|
@@ -4684,7 +4684,8 @@ void checkConnectionTimeout()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ShmCharger->timeoutSpec.Setting_Timeout_Spec >= (TIMEOUT_SPEC_BS_HLC_HANDSHAKE+10))
|
|
|
+ // Connection timeout minimum: 30 seconds / maximum: 3600 seconds
|
|
|
+ if((ShmCharger->timeoutSpec.Setting_Timeout_Spec >= (TIMEOUT_SPEC_BS_HLC_HANDSHAKE+5)) && (ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 3600))
|
|
|
{
|
|
|
if(ShmCharger->timeoutSpec.Setting_Timeout_Spec != ShmCharger->timeoutSpec.Present_Timeout_Spec)
|
|
|
{
|
|
@@ -4731,6 +4732,7 @@ void checkAuthorizeTimeout()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Authorize timeout minimum: 10 seconds / maximum: 300 seconds
|
|
|
if((ShmCharger->timeoutSpec.Setting_Authorize_Timeout_Spec >= 10) && (ShmCharger->timeoutSpec.Setting_Authorize_Timeout_Spec <= 300))
|
|
|
{
|
|
|
if(ShmCharger->timeoutSpec.Setting_Authorize_Timeout_Spec != ShmCharger->timeoutSpec.Present_Authorize_Timeout_Spec)
|
|
@@ -6006,6 +6008,38 @@ void checkConnectorStatus(uint8_t gun_index)
|
|
|
{}
|
|
|
}
|
|
|
|
|
|
+void checkEnable15118()
|
|
|
+{
|
|
|
+ if(ShmSysConfigAndInfo->SysConfig.isEnable15118 != ShmCharger->isCcsEnable)
|
|
|
+ {
|
|
|
+ if(ShmSysConfigAndInfo->SysConfig.isEnable15118 == ON)
|
|
|
+ {
|
|
|
+ if(ShmCharger->isCcsEnable != ON)
|
|
|
+ {
|
|
|
+ ShmCharger->isCcsEnable = ShmSysConfigAndInfo->SysConfig.isEnable15118;
|
|
|
+
|
|
|
+ if(gpio_get_value(GPIO_OUT_RST_QCA) != ON)
|
|
|
+ system("echo 1 > /sys/class/gpio/gpio115/value");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(ShmCharger->isCcsEnable != OFF)
|
|
|
+ {
|
|
|
+ ShmCharger->isCcsEnable = ShmSysConfigAndInfo->SysConfig.isEnable15118;
|
|
|
+
|
|
|
+ if(gpio_get_value(GPIO_OUT_RST_QCA) != OFF)
|
|
|
+ system("echo 0 > /sys/class/gpio/gpio115/value");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ DEBUG_INFO("======================================== \n");
|
|
|
+ DEBUG_INFO("isCcsEnable status: [%s] \n",(ShmCharger->isCcsEnable == ON? "ON":"OFF"));
|
|
|
+ DEBUG_INFO("isEnable15118 status: [%s] \n", (ShmSysConfigAndInfo->SysConfig.isEnable15118 == ON? "ON":"OFF"));
|
|
|
+ DEBUG_INFO("GPIO_115 status: [%s] \n", (gpio_get_value(GPIO_OUT_RST_QCA) == ON? "ON":"OFF"));
|
|
|
+ DEBUG_INFO("======================================== \n");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//======================================================
|
|
|
// Main process
|
|
|
//======================================================
|
|
@@ -6068,6 +6102,9 @@ int main(void)
|
|
|
|
|
|
// Check authorize timeout specification
|
|
|
checkAuthorizeTimeout();
|
|
|
+
|
|
|
+ // Check is Enable 15118
|
|
|
+ checkEnable15118();
|
|
|
}
|
|
|
|
|
|
refreshStartTimer(&startTime[0][TMR_IDX_CHECK_TASK]);
|