Ver Fonte

2020.04.01 / TC Hsu

Actions: limit the detection type of cable check to
GBT/ChaDeMo/CCS, but not include type 9 (engineer mode type).

Image version    : N/A
Image checksum   : N/A

Hardware PWB P/N : N/A
Hardware Version : N/A

Files:

	modified:   EVSE/Projects/DM30/Apps/Module_InternalComm.c
TC_Hsu há 5 anos atrás
pai
commit
5fd0d1a1e8
1 ficheiros alterados com 41 adições e 16 exclusões
  1. 41 16
      EVSE/Projects/DM30/Apps/Module_InternalComm.c

+ 41 - 16
EVSE/Projects/DM30/Apps/Module_InternalComm.c

@@ -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)