|
@@ -44,13 +44,13 @@
|
|
|
#define COLOR_MAX_LV 100
|
|
|
#define COLOR_MIN_LV 0
|
|
|
|
|
|
+#define AC_DEFAULT_VOL 220
|
|
|
+
|
|
|
struct SysConfigAndInfo *ShmSysConfigAndInfo;
|
|
|
struct StatusCodeData *ShmStatusCodeData;
|
|
|
struct FanModuleData *ShmFanModuleData;
|
|
|
struct RelayModuleData *ShmRelayModuleData;
|
|
|
struct LedModuleData *ShmLedModuleData;
|
|
|
-struct CHAdeMOData *ShmCHAdeMOData;
|
|
|
-struct CcsData *ShmCcsData;
|
|
|
struct PsuData *ShmPsuData;
|
|
|
|
|
|
#define VIN_MAX_VOLTAGE_IEC 285 // 大於該值 : OVP
|
|
@@ -114,6 +114,7 @@ struct timeb _ac_startChargingTime;
|
|
|
struct timeb _ac_endChargingTime;
|
|
|
|
|
|
unsigned short _setFanSpeed = 0;
|
|
|
+float _beforeChargingTotalEnergy = 0.0;
|
|
|
byte _checkLedChanged = 3;
|
|
|
|
|
|
Ver ver;
|
|
@@ -266,7 +267,7 @@ void GetFwAndHwVersion_Relay()
|
|
|
{
|
|
|
if (Query_FW_Ver(Uart5Fd, Addr.Relay, &ver) == PASS)
|
|
|
{
|
|
|
- // FanModuleData
|
|
|
+ // RelayModuleData
|
|
|
strcpy((char *) ShmRelayModuleData->version, ver.Version_FW);
|
|
|
// SystemInfo
|
|
|
strcpy((char *) ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev, ver.Version_FW);
|
|
@@ -307,6 +308,15 @@ void GetFwVersion_AC()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void GetAcModelName()
|
|
|
+{
|
|
|
+ memset(ShmSysConfigAndInfo->SysConfig.AcModelName, 0x00, sizeof(ShmSysConfigAndInfo->SysConfig.AcModelName));
|
|
|
+ if (Query_Model_Name(Uart5Fd, Addr.AcPlug, ShmSysConfigAndInfo->SysConfig.AcModelName) == PASS)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("ac model name = %s \n", ShmSysConfigAndInfo->SysConfig.AcModelName);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void SetRtcData_Relay()
|
|
|
{
|
|
|
struct timeb csuTime;
|
|
@@ -404,34 +414,52 @@ void GetPresentInputVol()
|
|
|
if (ShmSysConfigAndInfo->SysInfo.ChargerType == _CHARGER_TYPE_IEC)
|
|
|
{
|
|
|
if (inputVoltage.L1N_L12 < VIN_MIN_VOLTAGE_IEC)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Uvp L1N_L12 = %d \n", inputVoltage.L1N_L12);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP = NO;
|
|
|
|
|
|
if (inputVoltage.L2N_L23 < VIN_MIN_VOLTAGE_IEC)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Uvp L2N_L23 = %d \n", inputVoltage.L2N_L23);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP = NO;
|
|
|
|
|
|
if (inputVoltage.L3N_L31 < VIN_MIN_VOLTAGE_IEC)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Uvp L3N_L31 = %d \n", inputVoltage.L3N_L31);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP = NO;
|
|
|
}
|
|
|
else if (ShmSysConfigAndInfo->SysInfo.ChargerType == _CHARGER_TYPE_UL)
|
|
|
{
|
|
|
if (inputVoltage.L1N_L12 < VIN_MIN_VOLTAGE_UL)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Uvp L1N_L12 = %d \n", inputVoltage.L1N_L12);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP = NO;
|
|
|
|
|
|
if (inputVoltage.L2N_L23 < VIN_MIN_VOLTAGE_UL)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Uvp L2N_L23 = %d \n", inputVoltage.L2N_L23);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP = NO;
|
|
|
|
|
|
if (inputVoltage.L3N_L31 < VIN_MIN_VOLTAGE_UL)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Uvp L3N_L31 = %d \n", inputVoltage.L3N_L31);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP = NO;
|
|
|
}
|
|
@@ -440,34 +468,52 @@ void GetPresentInputVol()
|
|
|
if (ShmSysConfigAndInfo->SysInfo.ChargerType == _CHARGER_TYPE_IEC)
|
|
|
{
|
|
|
if (inputVoltage.L1N_L12 > VIN_MAX_VOLTAGE_IEC)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Ovp L1N_L12 = %d \n", inputVoltage.L1N_L12);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP = NO;
|
|
|
|
|
|
if (inputVoltage.L2N_L23 > VIN_MAX_VOLTAGE_IEC)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Ovp L2N_L23 = %d \n", inputVoltage.L2N_L23);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP = NO;
|
|
|
|
|
|
if (inputVoltage.L3N_L31 > VIN_MAX_VOLTAGE_IEC)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Ovp L3N_L31 = %d \n", inputVoltage.L3N_L31);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP = NO;
|
|
|
}
|
|
|
else if (ShmSysConfigAndInfo->SysInfo.ChargerType == _CHARGER_TYPE_UL)
|
|
|
{
|
|
|
if (inputVoltage.L1N_L12 > VIN_MAX_VOLTAGE_UL)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Ovp L1N_L12 = %d \n", inputVoltage.L1N_L12);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP = NO;
|
|
|
|
|
|
if (inputVoltage.L2N_L23 > VIN_MAX_VOLTAGE_UL)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Ovp L2N_L23 = %d \n", inputVoltage.L2N_L23);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP = NO;
|
|
|
|
|
|
if (inputVoltage.L3N_L31 > VIN_MAX_VOLTAGE_UL)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("In Ovp L3N_L31 = %d \n", inputVoltage.L3N_L31);
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP = YES;
|
|
|
+ }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP = NO;
|
|
|
}
|
|
@@ -948,7 +994,8 @@ void CheckPhaseLossStatus(byte index)
|
|
|
|
|
|
void SetParalleRelayStatus()
|
|
|
{
|
|
|
- if (gunCount >= 2 && ShmSysConfigAndInfo->SysInfo.IsAlternatvieConf == NO)
|
|
|
+ // 之後雙槍單模機種,橋接都會上
|
|
|
+ if (gunCount >= 2)
|
|
|
{
|
|
|
if (_chargingData[0]->SystemStatus == S_BOOTING || _chargingData[1]->SystemStatus == S_BOOTING ||
|
|
|
(_chargingData[0]->SystemStatus == S_IDLE && _chargingData[1]->SystemStatus == S_IDLE))
|
|
@@ -1028,7 +1075,7 @@ void CheckAlarmOccur()
|
|
|
case AC_DC_LEAKAGE: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.RcdTrip = YES; break;
|
|
|
case AC_SYSTEM_SELFTEST_FAULT: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.McuSelftestFail = YES; break;
|
|
|
case AC_HANDSHAKE_TIMEOUT: break;
|
|
|
- case AC_EMC_STOP: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = YES; break;
|
|
|
+ //case AC_EMC_STOP: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = YES; break;
|
|
|
case AC_RELAY_WELDING: ShmStatusCodeData->FaultCode.FaultEvents.bits.AcOutputRelayWelding = YES; break;
|
|
|
case AC_GF_MODULE_FAULT: ShmStatusCodeData->FaultCode.FaultEvents.bits.RcdSelfTestFail = YES; break;
|
|
|
case AC_SHUTTER_FAULT: break;
|
|
@@ -1053,7 +1100,7 @@ void CheckAlarmOccur()
|
|
|
case AC_DC_LEAKAGE: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.RcdTrip = NO; break;
|
|
|
case AC_SYSTEM_SELFTEST_FAULT: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.McuSelftestFail = NO; break;
|
|
|
case AC_HANDSHAKE_TIMEOUT: break;
|
|
|
- case AC_EMC_STOP: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = NO; break;
|
|
|
+ //case AC_EMC_STOP: ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = NO; break;
|
|
|
case AC_RELAY_WELDING: ShmStatusCodeData->FaultCode.FaultEvents.bits.AcOutputRelayWelding = NO; break;
|
|
|
case AC_GF_MODULE_FAULT: ShmStatusCodeData->FaultCode.FaultEvents.bits.RcdSelfTestFail = NO; break;
|
|
|
case AC_SHUTTER_FAULT: break;
|
|
@@ -1243,6 +1290,7 @@ int InitShareMemory()
|
|
|
#endif
|
|
|
result = FAIL;
|
|
|
}
|
|
|
+ memset(ShmRelayModuleData,0,sizeof(struct RelayModuleData));
|
|
|
|
|
|
//creat ShmLedModuleData
|
|
|
if ((MeterSMId = shmget(ShmLedBdKey, sizeof(struct LedModuleData), 0777)) < 0)
|
|
@@ -1276,43 +1324,6 @@ int InitShareMemory()
|
|
|
#endif
|
|
|
result = FAIL;
|
|
|
}
|
|
|
- memset(ShmPsuData,0,sizeof(struct PsuData));
|
|
|
-
|
|
|
- if(CHAdeMO_QUANTITY > 0)
|
|
|
- {
|
|
|
- if ((MeterSMId = shmget(ShmCHAdeMOCommKey, sizeof(struct CHAdeMOData), IPC_CREAT | 0777)) < 0)
|
|
|
- {
|
|
|
- #ifdef SystemLogMessage
|
|
|
- DEBUG_ERROR("[shmget ShmCHAdeMOData NG \n");
|
|
|
- #endif
|
|
|
- return FAIL;
|
|
|
- }
|
|
|
- else if ((ShmCHAdeMOData = shmat(MeterSMId, NULL, 0)) == (void *) -1) {
|
|
|
- #ifdef SystemLogMessage
|
|
|
- DEBUG_ERROR("shmat ShmCHAdeMOData NG \n");
|
|
|
- #endif
|
|
|
- return FAIL;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(CCS_QUANTITY > 0)
|
|
|
- {
|
|
|
- if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData), IPC_CREAT | 0777)) < 0)
|
|
|
- {
|
|
|
- #ifdef SystemLogMessage
|
|
|
- DEBUG_ERROR("shmget ShmCcsData NG \n");
|
|
|
- #endif
|
|
|
- return FAIL;
|
|
|
- }
|
|
|
- else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
|
|
|
- {
|
|
|
- #ifdef SystemLogMessage
|
|
|
- DEBUG_ERROR("shmat ShmCcsData NG \n");
|
|
|
- #endif
|
|
|
- return FAIL;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
return result;
|
|
|
}
|
|
@@ -1411,7 +1422,7 @@ void Initialization()
|
|
|
{
|
|
|
if (!FindChargingInfoData(_index, &_chargingData[0]))
|
|
|
{
|
|
|
- DEBUG_ERROR("EvComm : FindChargingInfoData false \n");
|
|
|
+ DEBUG_ERROR("InternalComm : FindChargingInfoData false \n");
|
|
|
isPass = false;
|
|
|
break;
|
|
|
}
|
|
@@ -1688,6 +1699,7 @@ void GetAcStatus()
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcMaxChargingCurrent == 0)
|
|
|
ShmSysConfigAndInfo->SysConfig.AcMaxChargingCurrent = ShmSysConfigAndInfo->SysConfig.AcRatingCurrent;
|
|
|
|
|
|
+ ac_chargingInfo[0]->ConnectorPlugIn = acStatus.CpStatus;
|
|
|
// printf("CpStatus = %d \n", acStatus.CpStatus);
|
|
|
// printf("CurLimit = %d \n", acStatus.CurLimit);
|
|
|
// printf("PilotVol_P = %d \n", acStatus.PilotVol_P);
|
|
@@ -1755,6 +1767,24 @@ void ChangeToCsuMode()
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
+void ChangeStartOrStopDateTime(byte isStart)
|
|
|
+{
|
|
|
+ char cmdBuf[32];
|
|
|
+ struct timeb csuTime;
|
|
|
+ struct tm *tmCSU;
|
|
|
+
|
|
|
+ ftime(&csuTime);
|
|
|
+ tmCSU = localtime(&csuTime.time);
|
|
|
+
|
|
|
+ sprintf(cmdBuf, "%04d-%02d-%02d %02d:%02d:%02d", tmCSU->tm_year + 1900,
|
|
|
+ tmCSU->tm_mon + 1, tmCSU->tm_mday, tmCSU->tm_hour, tmCSU->tm_min,
|
|
|
+ tmCSU->tm_sec);
|
|
|
+ if (isStart)
|
|
|
+ strcpy((char *)ac_chargingInfo[0]->StartDateTime, cmdBuf);
|
|
|
+ else
|
|
|
+ strcpy((char *)ac_chargingInfo[0]->StopDateTime, cmdBuf);
|
|
|
+}
|
|
|
+
|
|
|
void AcChargeTypeProcess()
|
|
|
{
|
|
|
if (acgunCount > 0)
|
|
@@ -1763,6 +1793,7 @@ void AcChargeTypeProcess()
|
|
|
{
|
|
|
ac_chargingInfo[0]->IsModeChagned = NO;
|
|
|
GetFwVersion_AC();
|
|
|
+ GetAcModelName();
|
|
|
}
|
|
|
else if (ac_chargingInfo[0]->SelfTest_Comp == YES)
|
|
|
{
|
|
@@ -1803,6 +1834,16 @@ void AcChargeTypeProcess()
|
|
|
(ShmSysConfigAndInfo->SysInfo.WaitForPlugit == YES ||
|
|
|
ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE))
|
|
|
{
|
|
|
+ if (ShmSysConfigAndInfo->SysInfo.OrderCharging != FAIL &&
|
|
|
+ ShmSysConfigAndInfo->SysInfo.OrderCharging == DEFAULT_AC_INDEX)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("** AC Remote \n");
|
|
|
+ strcpy((char *)ac_chargingInfo[0]->StartUserId, "");
|
|
|
+ ShmSysConfigAndInfo->SysInfo.WaitForPlugit = NO;
|
|
|
+ _status = S_PREPARNING;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
PRINTF_FUNC("** UserId = %s \n", ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
strcpy((char *)ac_chargingInfo[0]->StartUserId, (char *)ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
PRINTF_FUNC("** CardNumber = %s \n", ac_chargingInfo[0]->StartUserId);
|
|
@@ -1810,6 +1851,7 @@ void AcChargeTypeProcess()
|
|
|
ShmSysConfigAndInfo->SysInfo.WaitForPlugit = NO;
|
|
|
_status = S_PREPARNING;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
//printf("_status = %d \n", _status);
|
|
|
|
|
@@ -1827,6 +1869,9 @@ void AcChargeTypeProcess()
|
|
|
if (_isStatusChanged)
|
|
|
{
|
|
|
ac_chargingInfo[0]->PresentChargedEnergy = 0.0;
|
|
|
+ ac_chargingInfo[0]->PresentChargingVoltage = 0;
|
|
|
+ ac_chargingInfo[0]->ChargingFee = 0.0;
|
|
|
+ _beforeChargingTotalEnergy = 0.0;
|
|
|
}
|
|
|
|
|
|
ChangeLedStatus();
|
|
@@ -1838,12 +1883,13 @@ void AcChargeTypeProcess()
|
|
|
{
|
|
|
ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_NONE;
|
|
|
ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc = DEFAULT_AC_INDEX;
|
|
|
+ ShmSysConfigAndInfo->SysInfo.OrderCharging = FAIL;
|
|
|
gettimeofday(&_ac_preparing, NULL);
|
|
|
}
|
|
|
|
|
|
if (GetChargingEnergy() == PASS)
|
|
|
{
|
|
|
- ac_chargingInfo[0]->PresentChargedEnergy = acChargingEnergy.Energy / 100;
|
|
|
+ _beforeChargingTotalEnergy = acChargingEnergy.Energy;
|
|
|
}
|
|
|
|
|
|
SetLegacyReq(YES);
|
|
@@ -1855,17 +1901,31 @@ void AcChargeTypeProcess()
|
|
|
if (_isStatusChanged)
|
|
|
{
|
|
|
ftime(&_ac_startChargingTime);
|
|
|
+ ChangeStartOrStopDateTime(YES);
|
|
|
ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc = DEFAULT_AC_INDEX;
|
|
|
}
|
|
|
|
|
|
if (GetChargingEnergy() == PASS)
|
|
|
- ac_chargingInfo[0]->PresentChargedEnergy = acChargingEnergy.Energy / 100;
|
|
|
+ {
|
|
|
+ if ((acChargingEnergy.Energy - _beforeChargingTotalEnergy) > 0)
|
|
|
+ {
|
|
|
+ ac_chargingInfo[0]->PresentChargedEnergy += (acChargingEnergy.Energy - _beforeChargingTotalEnergy) / 100;
|
|
|
+ if (ShmSysConfigAndInfo->SysConfig.BillingData.isBilling)
|
|
|
+ {
|
|
|
+ ac_chargingInfo[0]->ChargingFee += ac_chargingInfo[0]->PresentChargedEnergy * ShmSysConfigAndInfo->SysConfig.BillingData.Cur_fee;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ _beforeChargingTotalEnergy = acChargingEnergy.Energy;
|
|
|
+ }
|
|
|
|
|
|
if (GetChargingCurrent() == PASS)
|
|
|
- ac_chargingInfo[0]->PresentChargingPower = (220 * (acChargingCurrent.OuputCurrentL1 / 10)) / 1000;
|
|
|
+ ac_chargingInfo[0]->PresentChargingPower = (AC_DEFAULT_VOL * (acChargingCurrent.OuputCurrentL1 / 10)) / 1000;
|
|
|
|
|
|
ftime(&_ac_endChargingTime);
|
|
|
ac_chargingInfo[0]->PresentChargedDuration = DiffTimeb(_ac_startChargingTime, _ac_endChargingTime);
|
|
|
+ ac_chargingInfo[0]->PresentChargingVoltage = AC_DEFAULT_VOL;
|
|
|
+ ac_chargingInfo[0]->PresentChargingCurrent = acChargingCurrent.OuputCurrentL1 / 10;
|
|
|
|
|
|
// 用以判斷是否有在輸出
|
|
|
ac_chargingInfo[0]->IsCharging = acStatus.RelayStatus;
|
|
@@ -1878,6 +1938,7 @@ void AcChargeTypeProcess()
|
|
|
{
|
|
|
if (_isStatusChanged)
|
|
|
{
|
|
|
+ ChangeStartOrStopDateTime(NO);
|
|
|
gettimeofday(&_ac_charging_comp, NULL);
|
|
|
}
|
|
|
|
|
@@ -1892,6 +1953,7 @@ void AcChargeTypeProcess()
|
|
|
{
|
|
|
gettimeofday(&_ac_charging_comp, NULL);
|
|
|
ftime(&_ac_endChargingTime);
|
|
|
+ ChangeStartOrStopDateTime(NO);
|
|
|
ac_chargingInfo[0]->PresentChargedDuration = DiffTimeb(_ac_startChargingTime, _ac_endChargingTime);
|
|
|
}
|
|
|
}
|
|
@@ -2105,6 +2167,14 @@ int main(void)
|
|
|
|
|
|
if (ShmFanModuleData->SelfTest_Comp == YES)
|
|
|
{
|
|
|
+ // 風控修改 :
|
|
|
+ // ******************************************************* //
|
|
|
+ //
|
|
|
+ // 當前PSU輸出總 KW PSU Temp
|
|
|
+ // 30 x -------------------- x ---------- + 14 x (PSU Temp - 45)
|
|
|
+ // 當前樁最大功率 KW 45
|
|
|
+ //
|
|
|
+ // ******************************************************* //
|
|
|
if (GetTimeoutValue(_priority_time) / 1000 >= 1000)
|
|
|
{
|
|
|
GetPsuTempForFanSpeed();
|