Commit db44e1ca authored by 李茂军's avatar 李茂军

同步LG02Y更改DTC快照信息

parent fc9c1c3f
...@@ -25,7 +25,7 @@ if not "%~1" == "" goto debugFile ...@@ -25,7 +25,7 @@ if not "%~1" == "" goto debugFile
@echo on @echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "D:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "D:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\閭뙤淃커\섈적\LE19\LE19_App\lg02y都쯤\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "E:\閭뙤淃커\섈적\LE19\LE19_App\lg02y都쯤\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off @echo off
goto end goto end
...@@ -34,7 +34,7 @@ goto end ...@@ -34,7 +34,7 @@ goto end
@echo on @echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "D:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "D:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\閭뙤淃커\섈적\LE19\LE19_App\lg02y都쯤\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "E:\閭뙤淃커\섈적\LE19\LE19_App\lg02y都쯤\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off @echo off
:end :end
\ No newline at end of file
...@@ -345,7 +345,7 @@ typedef struct ...@@ -345,7 +345,7 @@ typedef struct
typedef struct typedef struct
{ {
uint8_t ECUPowerVoltage; uint16_t ECUPowerVoltage;
uint8_t OccurrenceCounter; uint8_t OccurrenceCounter;
uint16_t VehicleSpeed; uint16_t VehicleSpeed;
uint32_t FirstMalfunction; uint32_t FirstMalfunction;
......
...@@ -606,7 +606,7 @@ void ChangeDTCData(uint8_t DTCNum, uint8_t DTCStatus) ...@@ -606,7 +606,7 @@ void ChangeDTCData(uint8_t DTCNum, uint8_t DTCStatus)
{ {
DTCToDFlashInfo.DTC[DTCNum].DTCStatus |= DTCErrorLastClear; DTCToDFlashInfo.DTC[DTCNum].DTCStatus |= DTCErrorLastClear;
} }
DTCToDFlashInfo.DTC[DTCNum].Snapshot.ECUPowerVoltage = (uint8_t)(getKL30Voltage() / 100u); DTCToDFlashInfo.DTC[DTCNum].Snapshot.ECUPowerVoltage = (getKL30Voltage() / 100u);
DTCToDFlashInfo.DTC[DTCNum].Snapshot.VehicleSpeed = Get_ID_18FEBF0B_Sig_ABSFrontAxleSpeed(); DTCToDFlashInfo.DTC[DTCNum].Snapshot.VehicleSpeed = Get_ID_18FEBF0B_Sig_ABSFrontAxleSpeed();
if(DTCToDFlashInfo.DTC[DTCNum].Snapshot.OccurrenceCounter == 0u) if(DTCToDFlashInfo.DTC[DTCNum].Snapshot.OccurrenceCounter == 0u)
{ {
......
...@@ -172,36 +172,37 @@ void UDS_19Service_Sub04(void) ...@@ -172,36 +172,37 @@ void UDS_19Service_Sub04(void)
if((uint8_t)(DTCStatus & DTCErrorLastClear) == DTCErrorLastClear) if((uint8_t)(DTCStatus & DTCErrorLastClear) == DTCErrorLastClear)
{ {
DiagMSG.msgData.SidDetail.Data[4] = 0x01u; DiagMSG.msgData.SidDetail.Data[4] = 0x01u;
DiagMSG.msgData.SidDetail.Data[5] = 0x05u; DiagMSG.msgData.SidDetail.Data[5] = 0x06u;
DiagMSG.msgData.SidDetail.Data[6] = 0xDFu; DiagMSG.msgData.SidDetail.Data[6] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[7] = 0x00u; DiagMSG.msgData.SidDetail.Data[7] = 0x00u;
DiagMSG.msgData.SidDetail.Data[8] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.ECUPowerVoltage; DiagMSG.msgData.SidDetail.Data[8] = (DTCToDFlashInfo.DTC[DTCcount].Snapshot.ECUPowerVoltage>>8);
DiagMSG.msgData.SidDetail.Data[9] = 0xDFu; DiagMSG.msgData.SidDetail.Data[9] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.ECUPowerVoltage;
DiagMSG.msgData.SidDetail.Data[10] = 0x01u; DiagMSG.msgData.SidDetail.Data[10] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[11] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.VehicleSpeed >> 8u); DiagMSG.msgData.SidDetail.Data[11] = 0x01u;
DiagMSG.msgData.SidDetail.Data[12] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.VehicleSpeed); DiagMSG.msgData.SidDetail.Data[12] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.VehicleSpeed >> 8u);
DiagMSG.msgData.SidDetail.Data[13] = 0xDFu; DiagMSG.msgData.SidDetail.Data[13] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.VehicleSpeed);
DiagMSG.msgData.SidDetail.Data[14] = 0x02u; DiagMSG.msgData.SidDetail.Data[14] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[15] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.OccurrenceCounter; DiagMSG.msgData.SidDetail.Data[15] = 0x02u;
DiagMSG.msgData.SidDetail.Data[16] = 0xDFu; DiagMSG.msgData.SidDetail.Data[16] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.OccurrenceCounter;
DiagMSG.msgData.SidDetail.Data[17] = 0x03u; DiagMSG.msgData.SidDetail.Data[17] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[18] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.FirstMalfunction >> 16u); DiagMSG.msgData.SidDetail.Data[18] = 0x03u;
DiagMSG.msgData.SidDetail.Data[19] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.FirstMalfunction >> 8u); DiagMSG.msgData.SidDetail.Data[19] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.FirstMalfunction >> 16u);
DiagMSG.msgData.SidDetail.Data[20] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.FirstMalfunction); DiagMSG.msgData.SidDetail.Data[20] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.FirstMalfunction >> 8u);
DiagMSG.msgData.SidDetail.Data[21] = 0xDFu; DiagMSG.msgData.SidDetail.Data[21] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.FirstMalfunction);
DiagMSG.msgData.SidDetail.Data[22] = 0x04u; DiagMSG.msgData.SidDetail.Data[22] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[23] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction >> 16u); DiagMSG.msgData.SidDetail.Data[23] = 0x04u;
DiagMSG.msgData.SidDetail.Data[24] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction >> 8u); DiagMSG.msgData.SidDetail.Data[24] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction >> 16u);
DiagMSG.msgData.SidDetail.Data[25] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction); DiagMSG.msgData.SidDetail.Data[25] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction >> 8u);
DiagMSG.msgData.SidDetail.Data[26] = 0xDFu; DiagMSG.msgData.SidDetail.Data[26] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction);
DiagMSG.msgData.SidDetail.Data[27] = 0x10u; DiagMSG.msgData.SidDetail.Data[27] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[28] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.min ; DiagMSG.msgData.SidDetail.Data[28] = 0x10u;
DiagMSG.msgData.SidDetail.Data[29] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.sec ; DiagMSG.msgData.SidDetail.Data[29] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.sec ;
DiagMSG.msgData.SidDetail.Data[30] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.hour ; DiagMSG.msgData.SidDetail.Data[30] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.min ;
DiagMSG.msgData.SidDetail.Data[31] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.month ; DiagMSG.msgData.SidDetail.Data[31] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.hour ;
DiagMSG.msgData.SidDetail.Data[32] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.day ; DiagMSG.msgData.SidDetail.Data[32] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.month ;
DiagMSG.msgData.SidDetail.Data[33] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.year ; DiagMSG.msgData.SidDetail.Data[33] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.day ;
UDS_Service_Response(0x19u, POSITIVE_RSP, DIAG_ID_Tx, 35u, DiagMSG.msgData.Data); DiagMSG.msgData.SidDetail.Data[34] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.year ;
UDS_Service_Response(0x19u, POSITIVE_RSP, DIAG_ID_Tx, 36u, DiagMSG.msgData.Data);
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment