Эх сурвалжийг харах

2020.05.22 / TC Hsu

Actions: For CCS, add GFD status notify feature between cable check state to charging state.

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_EvComm.c
TC_Hsu 4 жил өмнө
parent
commit
788b57a22c

+ 28 - 5
EVSE/Projects/DM30/Apps/Module_EvComm.c

@@ -3278,11 +3278,22 @@ int main(int argc, char *argv[])
                         {
                             unsigned char _result = _chargingData[_index]->GroundFaultStatus;
 
-                            if (_result == GFD_WARNING)
+                            if(_chargingData[_index]->Type == _Type_Chademo || _chargingData[_index]->Type == _Type_GB)
                             {
-                                _result = GFD_PASS;
+                                if (_result == GFD_WARNING)
+                                {
+                                    _result = GFD_PASS;
+                                }
+                                SetIsolationStatus(_index, _result, _chargingData[_index]->Evboard_id);
+                            }
+                            else if(_chargingData[_index]->Type == _Type_CCS_2)
+                            {
+                                SetIsolationStatus(_index, _result, _chargingData[_index]->Evboard_id);
+                            }
+                            else
+                            {
+                                //NULL
                             }
-                            SetIsolationStatus(_index, _result, _chargingData[_index]->Evboard_id);
                         }
 
                         if(_chargingData[_index]->SystemStatus == S_CCS_PRECHARGE_ST0 &&
@@ -3338,13 +3349,25 @@ int main(int argc, char *argv[])
                             SetPresentChargingOutputCap(_chargingData[0], _chargingData[1]);
                     }
 
-                    // GFD 失敗再通知
                     if (priorityLow == 1)
                     {
-                        if(_chargingData[_index]->GroundFaultStatus == GFD_FAIL)
+                        // Chademo & GB/T GFD 失敗再通知
+                        if(_chargingData[_index]->Type == _Type_Chademo || _chargingData[_index]->Type == _Type_GB)
+                        {
+                            if(_chargingData[_index]->GroundFaultStatus == GFD_FAIL)
+                            {
+                                SetIsolationStatus(_index, _chargingData[_index]->GroundFaultStatus, _chargingData[_index]->Evboard_id);
+                            }
+                        }
+                        // CCS will be continuous notify GFD state
+                        else if(_chargingData[_index]->Type == _Type_CCS_2)
                         {
                             SetIsolationStatus(_index, _chargingData[_index]->GroundFaultStatus, _chargingData[_index]->Evboard_id);
                         }
+                        else
+                        {
+                            //NULL
+                        }
 
                         if(_chargingData[_index]->Type == _Type_CCS_2 &&
                             _chargingData[_index]->PrechargeStatus == PRECHARGE_READY)