|
@@ -2847,11 +2847,13 @@ void InitEthernet()
|
|
|
// Check is need to reset WIFI/4G module power
|
|
|
if(!ShmSysConfigAndInfo->SysInfo.OcppConnStatus &&
|
|
|
|
|
|
- ((ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode == 0) ||
|
|
|
+ ((system("pidof -s Module_Wifi > /dev/null") != 0) ||
|
|
|
+ (ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode == 0) ||
|
|
|
((ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode == 1) && (ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectViaWiFi == ON)) ||
|
|
|
((ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode == 2) && (ShmStatusCodeData->InfoCode.InfoEvents.bits.ApDisconnectViaWiFi == ON))) &&
|
|
|
|
|
|
- ((ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomEnabled == 0) ||
|
|
|
+ ((system("pidof -s Module_4g > /dev/null") != 0) ||
|
|
|
+ (ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomEnabled == 0) ||
|
|
|
((ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomEnabled == 1) && (ShmStatusCodeData->InfoCode.InfoEvents.bits.ApnDisconnectVia4Gi == ON))))
|
|
|
{
|
|
|
if(getDiffSecNow(startTime[0][TMR_IDX_RESET_WIFI]) > TIMEOUT_SPEC_RESET_WIFI_MODULE)
|
|
@@ -5625,6 +5627,7 @@ int main(void)
|
|
|
ShmCharger->gun_info[gun_index].isDoEvReadyOnce = OFF;
|
|
|
ShmCharger->gun_info[gun_index].resultAuthorization = DEFAULT_RFID;
|
|
|
DB_Check_Record_Buf(localDb, gun_index);
|
|
|
+ ShmCharger->gun_info[gun_index].isEmergencyStopReport = OFF;
|
|
|
}
|
|
|
|
|
|
// LED status in Idle mode
|
|
@@ -6323,10 +6326,26 @@ int main(void)
|
|
|
setLedMotion(gun_index,LED_ACTION_ALARM);
|
|
|
setRelay(gun_index, OFF);
|
|
|
|
|
|
+ /*
|
|
|
+ * TODO:
|
|
|
+ * 1. Customize emergency stop and report stop transaction then return to idle mode if error recover.
|
|
|
+ * 2. Customer: Bambang
|
|
|
+ */
|
|
|
+ if((ShmSysConfigAndInfo->SysConfig.ModelName[12] == 'B') &&
|
|
|
+ (ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode == ALARM_EMERGENCY_STOP))
|
|
|
+ {
|
|
|
+ if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_TERMINATING)) &&
|
|
|
+ !ShmCharger->gun_info[gun_index].isEmergencyStopReport)
|
|
|
+ {
|
|
|
+ checkStopReason(gun_index);
|
|
|
+ ShmCharger->gun_info[gun_index].isEmergencyStopReport = ON;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if((ShmCharger->gun_info[gun_index].systemAlarmCode.SystemAlarmCode == 0) && !ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CCSboardStestFail && !ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemAcOutputOCP)
|
|
|
{
|
|
|
- if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_CHARGING) ||
|
|
|
- (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_TERMINATING))
|
|
|
+ if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_CHARGING) || (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus == SYS_MODE_TERMINATING)) &&
|
|
|
+ !ShmCharger->gun_info[gun_index].isEmergencyStopReport)
|
|
|
{
|
|
|
setChargerMode(gun_index, ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus);
|
|
|
}
|