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