|
@@ -53,7 +53,7 @@
|
|
|
#define UPGRADE_PRI 0x04
|
|
|
#define UPGRADE_AC 0x05
|
|
|
#define UPGRADE_LED 0x06
|
|
|
-#define SYSTEM_MIN_VOL 150
|
|
|
+#define SYSTEM_MIN_VOL 80
|
|
|
#define MIN_OUTPUT_CUR 0
|
|
|
#define AC_OUTPUT_VOL 220
|
|
|
|
|
@@ -154,7 +154,7 @@ bool isModelNameMatch = true;
|
|
|
|
|
|
int rfidFd = -1;
|
|
|
char* rfidPortName = "/dev/ttyS2";
|
|
|
-char* fwVersion = "V1.04.00.0000.00";
|
|
|
+char* fwVersion = "V1.05.00.0000.00";
|
|
|
|
|
|
sqlite3 *localDb;
|
|
|
bool isDb_ready;
|
|
@@ -235,7 +235,7 @@ int InitComPort(byte target)
|
|
|
tios.c_iflag = 0;
|
|
|
tios.c_oflag = 0;
|
|
|
tios.c_cc[VMIN]=0;
|
|
|
- tios.c_cc[VTIME]=(unsigned char)1;
|
|
|
+ tios.c_cc[VTIME]=(unsigned char)5;
|
|
|
tios.c_lflag=0;
|
|
|
tcflush(fd, TCIFLUSH);
|
|
|
ioctl (fd, TCSETS, &tios);
|
|
@@ -1019,6 +1019,9 @@ int isReachableInternet()
|
|
|
|
|
|
void InitEthernet()
|
|
|
{
|
|
|
+ system("ifconfig eth0 down");// eth0 down
|
|
|
+ system("ifconfig eth1 down");// eth1 down
|
|
|
+ sleep(2);
|
|
|
char tmpbuf[256];
|
|
|
// /sbin/ifconfig eth0 192.168.1.10 netmask 255.255.255.0 down
|
|
|
system("echo 1 > /sys/class/gpio/gpio110/value");//reset PHY
|
|
@@ -3482,7 +3485,6 @@ void KillTask()
|
|
|
system("killall Module_EventLogging");
|
|
|
system("killall Module_PrimaryComm");
|
|
|
system("killall Module_EvComm");
|
|
|
- system("killall Module_LcmControl");
|
|
|
system("killall Module_InternalComm");
|
|
|
system("killall Module_PsuComm");
|
|
|
//system("killall OcppBackend &");
|
|
@@ -3490,6 +3492,16 @@ void KillTask()
|
|
|
system("killall Module_Wifi &");
|
|
|
}
|
|
|
|
|
|
+void KillTaskExceptPrimary()
|
|
|
+{
|
|
|
+ ChangeLcmByIndex(_LCM_FIX);
|
|
|
+ system("killall Module_EvComm");
|
|
|
+ system("killall Module_InternalComm");
|
|
|
+ system("killall Module_PsuComm");
|
|
|
+ system("killall Module_4g &");
|
|
|
+ system("killall Module_Wifi &");
|
|
|
+}
|
|
|
+
|
|
|
void KillAllTask()
|
|
|
{
|
|
|
ChangeLcmByIndex(_LCM_FIX);
|
|
@@ -4059,6 +4071,11 @@ void CheckFwUpdateFunction()
|
|
|
{
|
|
|
DEBUG_INFO_MSG("ftp : update start. \n");
|
|
|
KillTask();
|
|
|
+ for (byte gun_index = 0; gun_index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; gun_index++)
|
|
|
+ {
|
|
|
+ setChargerMode(gun_index, MODE_UPDATE);
|
|
|
+ }
|
|
|
+
|
|
|
byte updateResult = CheckUpdateProcess();
|
|
|
|
|
|
if (updateResult == PASS)
|
|
@@ -4069,7 +4086,7 @@ void CheckFwUpdateFunction()
|
|
|
KillAllTask();
|
|
|
ShmSysConfigAndInfo->SysInfo.FirmwareUpdate = NO;
|
|
|
sleep(5);
|
|
|
- system("/root/main &");
|
|
|
+ system("/usr/bin/run_evse_restart.sh");
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -4114,7 +4131,7 @@ void CheckFwUpdateFunction()
|
|
|
strcpy((char *)ShmOCPP16Data->FirmwareStatusNotification.Status, "InstallationFailed");
|
|
|
ShmOCPP16Data->SpMsg.bits.FirmwareStatusNotificationReq = YES;
|
|
|
sleep(5);
|
|
|
- system("/root/main &");
|
|
|
+ system("/usr/bin/run_evse_restart.sh");
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -4206,7 +4223,7 @@ void CheckOcppStatus()
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetConf = YES;
|
|
|
sleep(3);
|
|
|
system("killall OcppBackend &");
|
|
|
- KillTask();
|
|
|
+ KillAllTask();
|
|
|
system("/usr/bin/run_evse_restart.sh");
|
|
|
}
|
|
|
}
|
|
@@ -4530,6 +4547,10 @@ int DB_Open(sqlite3 *db)
|
|
|
"`occurDatetime` TEXT NOT NULL, "
|
|
|
"`statusCode` INTEGER NOT NULL, unique(occurDatetime,statusCode) on conflict replace);";
|
|
|
|
|
|
+ char* createrebootSql="CREATE TABLE IF NOT EXISTS `reboot_record` ( "
|
|
|
+ "`idx` INTEGER PRIMARY KEY AUTOINCREMENT, "
|
|
|
+ "`rebootDatetime` TEXT NOT NULL, unique(rebootDatetime) on conflict replace);";
|
|
|
+
|
|
|
if(sqlite3_open(DB_FILE, &db))
|
|
|
{
|
|
|
result = FAIL;
|
|
@@ -4570,6 +4591,16 @@ int DB_Open(sqlite3 *db)
|
|
|
PRINTF_FUNC( "Opened local record table successfully\n");
|
|
|
}
|
|
|
|
|
|
+ if (sqlite3_exec(db, createrebootSql, 0, 0, &errMsg) != SQLITE_OK)
|
|
|
+ {
|
|
|
+ result = FAIL;
|
|
|
+ PRINTF_FUNC( "Create reboot record table error message: %s\n", errMsg);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PRINTF_FUNC( "Opened reboot record table successfully\n");
|
|
|
+ }
|
|
|
+
|
|
|
sqlite3_close(db);
|
|
|
}
|
|
|
|
|
@@ -4710,6 +4741,49 @@ int DB_Get_Operactive(sqlite3 *db, uint8_t gun_index)
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+int DB_Reboot_Record(sqlite3 *db)
|
|
|
+{
|
|
|
+ int result = PASS;
|
|
|
+ char* errMsg = NULL;
|
|
|
+ char insertSql[256];
|
|
|
+
|
|
|
+ sprintf(insertSql, "insert into reboot_record(rebootDatetime) values(CURRENT_TIMESTAMP);");
|
|
|
+
|
|
|
+ if(sqlite3_open(DB_FILE, &db))
|
|
|
+ {
|
|
|
+ result = FAIL;
|
|
|
+ PRINTF_FUNC( "Can't open database: %s\n", sqlite3_errmsg(db));
|
|
|
+ sqlite3_close(db);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PRINTF_FUNC( "Local charging record database open successfully.\n");
|
|
|
+ if (sqlite3_exec(db, insertSql, 0, 0, &errMsg) != SQLITE_OK)
|
|
|
+ {
|
|
|
+ result = FAIL;
|
|
|
+ PRINTF_FUNC( "Insert reboot record error message: %s\n", errMsg);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PRINTF_FUNC( "Insert reboot record successfully\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ sprintf(insertSql, "delete from reboot_record where idx < (select idx from charging_record order by idx desc limit 1)-2000;");
|
|
|
+ if (sqlite3_exec(db, insertSql, 0, 0, &errMsg) != SQLITE_OK)
|
|
|
+ {
|
|
|
+ result = FAIL;
|
|
|
+ PRINTF_FUNC( "delete reboot record error message: %s\n", errMsg);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PRINTF_FUNC( "delete reboot record successfully\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ sqlite3_close(db);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+}
|
|
|
//===============================================
|
|
|
// Config process
|
|
|
//===============================================
|
|
@@ -4831,6 +4905,18 @@ void StopProcessingLoop()
|
|
|
{
|
|
|
CheckFactoryConfigFunction();
|
|
|
CheckFwUpdateFunction();
|
|
|
+ if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2)
|
|
|
+ {
|
|
|
+ ChkPrimaryStatus();
|
|
|
+ if (ShmSysConfigAndInfo->SysWarningInfo.Level == 0)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("Soft reboot for retry self-tets (Primary). \n");
|
|
|
+ KillAllTask();
|
|
|
+ sleep(3);
|
|
|
+ system("/usr/bin/run_evse_restart.sh");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
sleep(1);
|
|
|
}
|
|
|
}
|
|
@@ -5227,7 +5313,7 @@ int main(void)
|
|
|
PRINTF_FUNC("Soft reboot for retry self-tets. \n");
|
|
|
sleep(3);
|
|
|
system("killall OcppBackend &");
|
|
|
- KillTask();
|
|
|
+ KillAllTask();
|
|
|
system("/usr/bin/run_evse_restart.sh");
|
|
|
}
|
|
|
}
|
|
@@ -5236,9 +5322,14 @@ int main(void)
|
|
|
{
|
|
|
ChargingAlarmProcess(gun_index);
|
|
|
}
|
|
|
- ChangeLcmByIndex(_LCM_FIX);
|
|
|
+ //ChangeLcmByIndex(_LCM_FIX);
|
|
|
sleep(3);
|
|
|
- KillTask();
|
|
|
+ if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2)
|
|
|
+ {
|
|
|
+ KillTaskExceptPrimary();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ KillTask();
|
|
|
StopProcessingLoop();
|
|
|
}
|
|
|
else
|
|
@@ -5264,6 +5355,7 @@ int main(void)
|
|
|
{
|
|
|
chargingInfo[_index]->IsAvailable = DB_Get_Operactive(localDb, _index);
|
|
|
}
|
|
|
+ DB_Reboot_Record(localDb);
|
|
|
}
|
|
|
|
|
|
ChangeLcmByIndex(_LCM_IDLE);
|
|
@@ -5360,6 +5452,8 @@ int main(void)
|
|
|
PRINTF_FUNC("================= S_IDLE (%x) ================ \n", gun_index);
|
|
|
chargingInfo[gun_index]->PresentChargedDuration = 0;
|
|
|
chargingInfo[gun_index]->RemainChargingDuration = 0;
|
|
|
+ chargingInfo[gun_index]->PresentChargingVoltage = 0;
|
|
|
+ chargingInfo[gun_index]->PresentChargingCurrent = 0;
|
|
|
strcpy((char *)chargingInfo[gun_index]->StartDateTime, "");
|
|
|
strcpy((char *)chargingInfo[gun_index]->StopDateTime, "");
|
|
|
strcpy((char *)chargingInfo[gun_index]->StartUserId, "");
|
|
@@ -5631,11 +5725,19 @@ int main(void)
|
|
|
if (isEvBoardStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (錯誤)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingAlarmProcess(gun_index);
|
|
|
}
|
|
|
else if (isEvBoardNormalStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (正常)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingTerminalProcess(gun_index);
|
|
|
}
|
|
|
else if (OcppRemoteStop(gun_index) == YES ||
|
|
@@ -5687,11 +5789,19 @@ int main(void)
|
|
|
if (isEvBoardStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (錯誤)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingAlarmProcess(gun_index);
|
|
|
}
|
|
|
else if (isEvBoardNormalStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (正常)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingTerminalProcess(gun_index);
|
|
|
}
|
|
|
else if (OcppRemoteStop(gun_index) == YES ||
|
|
@@ -5778,11 +5888,19 @@ int main(void)
|
|
|
if (isEvBoardStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (錯誤)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingAlarmProcess(gun_index);
|
|
|
}
|
|
|
else if (isEvBoardNormalStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (正常)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingTerminalProcess(gun_index);
|
|
|
}
|
|
|
else if (OcppRemoteStop(gun_index) == YES ||
|
|
@@ -5822,13 +5940,13 @@ int main(void)
|
|
|
// GFD 錯誤停止
|
|
|
RecordAlarmCode(gun_index, "012234");
|
|
|
}
|
|
|
- else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
- {
|
|
|
- // UVP
|
|
|
- RecordAlarmCode(gun_index, "012289");
|
|
|
- ChargingTerminalProcess(gun_index);
|
|
|
- }
|
|
|
+// else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
+// (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
+// {
|
|
|
+// // UVP
|
|
|
+// RecordAlarmCode(gun_index, "012289");
|
|
|
+// ChargingTerminalProcess(gun_index);
|
|
|
+// }
|
|
|
else if (chargingInfo[gun_index]->GroundFaultStatus == GFD_WARNING)
|
|
|
{
|
|
|
// GFD 警告
|
|
@@ -5842,14 +5960,14 @@ int main(void)
|
|
|
// GFD 錯誤停止
|
|
|
RecordAlarmCode(gun_index, "012236");
|
|
|
}
|
|
|
- else if (isPrechargeStatus_gb(gun_index) == 10 &&
|
|
|
- (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)))
|
|
|
- {
|
|
|
- // UVP
|
|
|
- RecordAlarmCode(gun_index, "012290");
|
|
|
- ChargingTerminalProcess(gun_index);
|
|
|
- }
|
|
|
+// else if (isPrechargeStatus_gb(gun_index) == 10 &&
|
|
|
+// (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
+// (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)))
|
|
|
+// {
|
|
|
+// // UVP
|
|
|
+// RecordAlarmCode(gun_index, "012290");
|
|
|
+// ChargingTerminalProcess(gun_index);
|
|
|
+// }
|
|
|
else if (chargingInfo[gun_index]->GroundFaultStatus == GFD_WARNING)
|
|
|
{
|
|
|
// GFD 警告
|
|
@@ -5863,13 +5981,13 @@ int main(void)
|
|
|
// GFD 錯誤停止
|
|
|
RecordAlarmCode(gun_index, "012235");
|
|
|
}
|
|
|
- else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
- {
|
|
|
- // UVP
|
|
|
- RecordAlarmCode(gun_index, "012288");
|
|
|
- ChargingTerminalProcess(gun_index);
|
|
|
- }
|
|
|
+// else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
+// (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
+// {
|
|
|
+// // UVP
|
|
|
+// RecordAlarmCode(gun_index, "012288");
|
|
|
+// ChargingTerminalProcess(gun_index);
|
|
|
+// }
|
|
|
else if (chargingInfo[gun_index]->GroundFaultStatus == GFD_WARNING)
|
|
|
{
|
|
|
// GFD 警告
|
|
@@ -5880,11 +5998,19 @@ int main(void)
|
|
|
if (isEvBoardStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (錯誤)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingAlarmProcess(gun_index);
|
|
|
}
|
|
|
else if (isEvBoardNormalStopChargeFlag(gun_index) == YES)
|
|
|
{
|
|
|
// 板端要求停止 (正常)
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
+ }
|
|
|
ChargingTerminalProcess(gun_index);
|
|
|
}
|
|
|
else if (OcppRemoteStop(gun_index) == YES ||
|
|
@@ -5907,6 +6033,11 @@ int main(void)
|
|
|
{
|
|
|
if (isModeChange(gun_index))
|
|
|
{
|
|
|
+ if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
+ {
|
|
|
+ strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "Local");
|
|
|
+ }
|
|
|
+
|
|
|
if (chargingInfo[gun_index]->SystemStatus == S_ALARM)
|
|
|
{
|
|
|
PRINTF_FUNC("================== S_ALARM (%x) ================ \n", gun_index);
|
|
@@ -5923,20 +6054,12 @@ int main(void)
|
|
|
{
|
|
|
PRINTF_FUNC("================== S_TERMINATING (%x) ================ \n", gun_index);
|
|
|
}
|
|
|
+
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
|
}
|
|
|
|
|
|
if (chargingInfo[gun_index]->Type == _Type_Chademo)
|
|
|
{
|
|
|
- // 非車端的停止 : 需等待小板送出停止指令,讓車端解除槍
|
|
|
- if (isEvStopCharging_chademo(gun_index) == YES)
|
|
|
- {
|
|
|
- if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
- {
|
|
|
- strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "Local");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (chargingInfo[gun_index]->GroundFaultStatus == GFD_FAIL)
|
|
|
{
|
|
|
// GFD 錯誤停止
|
|
@@ -5951,15 +6074,6 @@ int main(void)
|
|
|
else if (chargingInfo[gun_index]->Type == _Type_GB)
|
|
|
{
|
|
|
//PRINTF_FUNC("************ GB lock Status = %d, status = %d \n", isEvStopCharging_gb(gun_index), isPrechargeStatus_gb(gun_index));
|
|
|
- // 非車端的停止 : 需等待小板送出停止指令,讓車端解除槍
|
|
|
- if (isEvStopCharging_gb(gun_index) == YES)
|
|
|
- {
|
|
|
- if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
- {
|
|
|
- strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "Local");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (chargingInfo[gun_index]->GroundFaultStatus == GFD_FAIL)
|
|
|
{
|
|
|
// GFD 錯誤停止
|
|
@@ -5973,15 +6087,6 @@ int main(void)
|
|
|
}
|
|
|
else if (chargingInfo[gun_index]->Type == _Type_CCS_2)
|
|
|
{
|
|
|
- // 非車端的停止 : 需等待小板送出停止指令,讓車端解除槍
|
|
|
- if (isEvStopCharging_ccs(gun_index) == YES)
|
|
|
- {
|
|
|
- if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
- {
|
|
|
- strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "Local");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (chargingInfo[gun_index]->GroundFaultStatus == GFD_FAIL)
|
|
|
{
|
|
|
// GFD 錯誤停止
|
|
@@ -5994,12 +6099,6 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 車端的停止
|
|
|
- if (strcmp((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "") == EQUAL)
|
|
|
- {
|
|
|
- strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
|
|
|
- }
|
|
|
-
|
|
|
if (chargingInfo[gun_index]->SystemStatus == S_ALARM)
|
|
|
{
|
|
|
if(chargingInfo[gun_index]->ConnectorPlugIn == NO &&
|