|
@@ -546,6 +546,15 @@ void GetGfdAdc()
|
|
|
{
|
|
|
for (int i = 0; i < gunCount; i++)
|
|
|
{
|
|
|
+ if (_chargingData[i]->Type == 9)
|
|
|
+ {
|
|
|
+ if (_chargingData[i]->PresentChargingVoltage >= 1500)
|
|
|
+ {
|
|
|
+ _chargingData[i]->GroundFaultStatus = GFD_PASS;
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
if (i == 0)
|
|
|
{
|
|
|
_chargingData[i]->GroundFaultStatus = gfd_adc.result_conn1;
|
|
@@ -556,6 +565,12 @@ void GetGfdAdc()
|
|
|
PRINTF_FUNC("GFD Fail. index = %d, R = %d, Vol = %d \n",
|
|
|
i, gfd_adc.Resister_conn1, gfd_adc.voltage_conn1);
|
|
|
}
|
|
|
+ else if (_chargingData[i]->GroundFaultStatus == GFD_PASS ||
|
|
|
+ _chargingData[i]->GroundFaultStatus == GFD_WARNING)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("GFD Result. index = %d, Result = %d, R= %d, Vol = %d \n",
|
|
|
+ i, _chargingData[i]->GroundFaultStatus, gfd_adc.Resister_conn1, gfd_adc.voltage_conn1);
|
|
|
+ }
|
|
|
}
|
|
|
else if (i == 1)
|
|
|
{
|
|
@@ -567,6 +582,13 @@ void GetGfdAdc()
|
|
|
PRINTF_FUNC("GFD Fail. index = %d, R = %d, Vol = %d \n",
|
|
|
i, gfd_adc.Resister_conn2, gfd_adc.voltage_conn2);
|
|
|
}
|
|
|
+ else if (_chargingData[i]->GroundFaultStatus == GFD_PASS ||
|
|
|
+ _chargingData[i]->GroundFaultStatus == GFD_WARNING)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("GFD Result. index = %d, Result = %d, R= %d, Vol = %d \n",
|
|
|
+ i, _chargingData[i]->GroundFaultStatus, gfd_adc.Resister_conn2, gfd_adc.voltage_conn2);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1188,28 +1210,31 @@ void CableCheckDetected(byte index)
|
|
|
// Warning : Rgfd <= 150 歐/V 假設電壓為 500V 則~ Rgfd <= 75000 歐
|
|
|
// Pre-Warning : 150 歐/V < Rgfd <= 500 歐/V 假設電壓為 500V 則 75000 歐 < Rgfd <= 250000
|
|
|
// SO Normal : Rgfd > 500 歐/V 假設電壓為 500 V 則 Rgfd > 250000 歐
|
|
|
- if ((_chargingData[index]->SystemStatus >= S_PREPARING_FOR_EVSE && _chargingData[index]->SystemStatus <= S_CHARGING) ||
|
|
|
- (_chargingData[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 && _chargingData[index]->SystemStatus <= S_CCS_PRECHARGE_ST1))
|
|
|
+ if (_chargingData[index]->Type >= _Type_Chademo && _chargingData[index]->Type <= _Type_GB)
|
|
|
{
|
|
|
- if (_chargingData[index]->SystemStatus == S_PREPARING_FOR_EVSE)
|
|
|
- {
|
|
|
- SetGfdConfig(index, GFD_CABLECHK);
|
|
|
- }
|
|
|
- else if (_chargingData[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
|
|
|
- _chargingData[index]->SystemStatus <= S_CCS_PRECHARGE_ST1)
|
|
|
+ if ((_chargingData[index]->SystemStatus >= S_PREPARING_FOR_EVSE && _chargingData[index]->SystemStatus <= S_CHARGING) ||
|
|
|
+ (_chargingData[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 && _chargingData[index]->SystemStatus <= S_CCS_PRECHARGE_ST1))
|
|
|
{
|
|
|
- SetGfdConfig(index, GFD_PRECHARGE);
|
|
|
+ if (_chargingData[index]->SystemStatus == S_PREPARING_FOR_EVSE && _chargingData[index]->RelayWeldingCheck == YES)
|
|
|
+ {
|
|
|
+ SetGfdConfig(index, GFD_CABLECHK);
|
|
|
+ }
|
|
|
+ else if (_chargingData[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
|
|
|
+ _chargingData[index]->SystemStatus <= S_CCS_PRECHARGE_ST1)
|
|
|
+ {
|
|
|
+ SetGfdConfig(index, GFD_PRECHARGE);
|
|
|
+ }
|
|
|
+ else if (_chargingData[index]->SystemStatus <= S_CHARGING)
|
|
|
+ {
|
|
|
+ SetGfdConfig(index, GFD_CHARGING);
|
|
|
+ }
|
|
|
}
|
|
|
- else if (_chargingData[index]->SystemStatus <= S_CHARGING)
|
|
|
+ else if(_chargingData[index]->SystemStatus == S_COMPLETE || _chargingData[index]->SystemStatus == S_PREPARNING
|
|
|
+ || _chargingData[index]->SystemStatus == S_IDLE)
|
|
|
{
|
|
|
- SetGfdConfig(index, GFD_CHARGING);
|
|
|
+ SetGfdConfig(index, GFD_IDLE);
|
|
|
}
|
|
|
}
|
|
|
- else if(_chargingData[index]->SystemStatus == S_COMPLETE || _chargingData[index]->SystemStatus == S_PREPARNING
|
|
|
- || _chargingData[index]->SystemStatus == S_IDLE)
|
|
|
- {
|
|
|
- SetGfdConfig(index, GFD_IDLE);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
void CheckOutputPowerOverCarReq(byte index)
|