Преглед на файлове

[Improve][DM30][DW30][firmware version] For CCS formal firmware version, the web page should not display redundant '.' character.

2020.08.18 / TC Hsu

Actions: If the 3rd character is '.' (0x2E), it is formal firmware version, copy the firmware version CCS board directly. Otherwise, insert '.' character into firmware version array.

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 години
родител
ревизия
53a77d83a6
променени са 2 файла, в които са добавени 30 реда и са изтрити 12 реда
  1. 15 6
      EVSE/Projects/DM30/Apps/Module_EvComm.c
  2. 15 6
      EVSE/Projects/DW30/Apps/Module_EvComm.c

+ 15 - 6
EVSE/Projects/DM30/Apps/Module_EvComm.c

@@ -2769,15 +2769,24 @@ void CANReceiver()
                         {
                             if (ShmCcsData->CommProtocol == _CCS_COMM_V2GMessage_DIN70121)
                             {
-                                for (byte _vCount = 0, _vPoint = 0; _vCount < frame.can_dlc; _vCount++)
+                                //For previous CCS test version, if the firmware version without '.', insert '.'(0x2E) into array.
+                                if(frame.data[2] != 0x2E)
                                 {
-                                    if (_vCount % 2 == 0 && _vCount != 0)
+                                    for (byte _vCount = 0, _vPoint = 0; _vCount < frame.can_dlc; _vCount++)
                                     {
-                                        ver[_vCount + _vPoint] = 0x2E;
-                                        _vPoint++;
-                                    }
+                                        if (_vCount % 2 == 0 && _vCount != 0)
+                                        {
+                                            ver[_vCount + _vPoint] = 0x2E;
+                                            _vPoint++;
+                                        }
 
-                                    ver[_vCount + _vPoint] = frame.data[_vCount];
+                                        ver[_vCount + _vPoint] = frame.data[_vCount];
+                                    }
+                                }
+                                //For formal CCS firmware version, use the string from CCS directly.
+                                else
+                                {
+                                    memcpy(ver, frame.data, frame.can_dlc);
                                 }
 
                                 memcpy(&ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index].version, ver, ARRAY_SIZE(ver));

+ 15 - 6
EVSE/Projects/DW30/Apps/Module_EvComm.c

@@ -2769,15 +2769,24 @@ void CANReceiver()
                         {
                             if (ShmCcsData->CommProtocol == _CCS_COMM_V2GMessage_DIN70121)
                             {
-                                for (byte _vCount = 0, _vPoint = 0; _vCount < frame.can_dlc; _vCount++)
+                                //For previous CCS test version, if the firmware version without '.', insert '.'(0x2E) into array.
+                                if(frame.data[2] != 0x2E)
                                 {
-                                    if (_vCount % 2 == 0 && _vCount != 0)
+                                    for (byte _vCount = 0, _vPoint = 0; _vCount < frame.can_dlc; _vCount++)
                                     {
-                                        ver[_vCount + _vPoint] = 0x2E;
-                                        _vPoint++;
-                                    }
+                                        if (_vCount % 2 == 0 && _vCount != 0)
+                                        {
+                                            ver[_vCount + _vPoint] = 0x2E;
+                                            _vPoint++;
+                                        }
 
-                                    ver[_vCount + _vPoint] = frame.data[_vCount];
+                                        ver[_vCount + _vPoint] = frame.data[_vCount];
+                                    }
+                                }
+                                //For formal CCS firmware version, use the string from CCS directly.
+                                else
+                                {
+                                    memcpy(ver, frame.data, frame.can_dlc);
                                 }
 
                                 memcpy(&ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index].version, ver, ARRAY_SIZE(ver));