소스 검색

[Improve][DM30][DW30][EV communication]: Modify the GFD status message for EV board

2020.06.18 / TC Hsu

Actions: Modify the GFD status message tranceive method for EV board when cable check, it become to tranceive periodly. Add unexpected GFD status handle method (when GFD status is not wait/pass/warning/failed, print log out and set to wait).

Actions:

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
	modified:   EVSE/Projects/DW30/Apps/Module_EvComm.c
TC_Hsu 4 년 전
부모
커밋
6c96b818ba
2개의 변경된 파일34개의 추가작업 그리고 34개의 파일을 삭제
  1. 17 17
      EVSE/Projects/DM30/Apps/Module_EvComm.c
  2. 17 17
      EVSE/Projects/DW30/Apps/Module_EvComm.c

+ 17 - 17
EVSE/Projects/DM30/Apps/Module_EvComm.c

@@ -3326,28 +3326,28 @@ int main(int argc, char *argv[])
 //                          _chargingData[_index]->GroundFaultStatus = GFD_PASS;
 
                         //PRINTF_FUNC("To EV_%d GFD = %d \n",   _index, _chargingData[_index]->GroundFaultStatus);
-                        if(_chargingData[_index]->GroundFaultStatus != GFD_WAIT)
-                        {
-                            unsigned char _result = _chargingData[_index]->GroundFaultStatus;
 
-                            if(_chargingData[_index]->Type == _Type_Chademo || _chargingData[_index]->Type == _Type_GB)
-                            {
-                                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
+                        unsigned char _result = GFD_WAIT;
+                        _result = _chargingData[_index]->GroundFaultStatus;
+
+                        if(_chargingData[_index]->Type == _Type_Chademo ||
+                           _chargingData[_index]->Type == _Type_GB)
+                        {
+                            if (_result == GFD_WARNING)
                             {
-                                //NULL
+                                _result = GFD_PASS;
                             }
                         }
 
+                        if(_result < GFD_WAIT &&
+                           _result > GFD_WARNING)
+                        {
+                            PRINTF_FUNC("Unexpected GFD status : %d \n", _result);
+                            _result = GFD_WAIT;
+                        }
+
+                        SetIsolationStatus(_index, _result, _chargingData[_index]->Evboard_id);
+
                         if(_chargingData[_index]->SystemStatus == S_CCS_PRECHARGE_ST0 &&
                             _chargingData[_index]->PrechargeStatus == PRECHARGE_READY)
                         {

+ 17 - 17
EVSE/Projects/DW30/Apps/Module_EvComm.c

@@ -3326,28 +3326,28 @@ int main(int argc, char *argv[])
 //                          _chargingData[_index]->GroundFaultStatus = GFD_PASS;
 
                         //PRINTF_FUNC("To EV_%d GFD = %d \n",   _index, _chargingData[_index]->GroundFaultStatus);
-                        if(_chargingData[_index]->GroundFaultStatus != GFD_WAIT)
-                        {
-                            unsigned char _result = _chargingData[_index]->GroundFaultStatus;
 
-                            if(_chargingData[_index]->Type == _Type_Chademo || _chargingData[_index]->Type == _Type_GB)
-                            {
-                                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
+                        unsigned char _result = GFD_WAIT;
+                        _result = _chargingData[_index]->GroundFaultStatus;
+
+                        if(_chargingData[_index]->Type == _Type_Chademo ||
+                           _chargingData[_index]->Type == _Type_GB)
+                        {
+                            if (_result == GFD_WARNING)
                             {
-                                //NULL
+                                _result = GFD_PASS;
                             }
                         }
 
+                        if(_result < GFD_WAIT &&
+                           _result > GFD_WARNING)
+                        {
+                            PRINTF_FUNC("Unexpected GFD status : %d \n", _result);
+                            _result = GFD_WAIT;
+                        }
+
+                        SetIsolationStatus(_index, _result, _chargingData[_index]->Evboard_id);
+
                         if(_chargingData[_index]->SystemStatus == S_CCS_PRECHARGE_ST0 &&
                             _chargingData[_index]->PrechargeStatus == PRECHARGE_READY)
                         {