Commit 89a85a9b authored by 李茂军's avatar 李茂军

同步LG02Y DTC快照增加DF10

parent 11760a7c
...@@ -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 "E:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "E:\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 "E:\work\le19基于lg02y的变更单号0059的基础上改\lg02y源码\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "E:\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
...@@ -970,6 +970,12 @@ void DTCToDFlashInfoInit(void) ...@@ -970,6 +970,12 @@ void DTCToDFlashInfoInit(void)
DTCToDFlashInfo.DTC[i].Snapshot.OccurrenceCounter = 0x00u; DTCToDFlashInfo.DTC[i].Snapshot.OccurrenceCounter = 0x00u;
DTCToDFlashInfo.DTC[i].Snapshot.FirstMalfunction = 0x00000000u; DTCToDFlashInfo.DTC[i].Snapshot.FirstMalfunction = 0x00000000u;
DTCToDFlashInfo.DTC[i].Snapshot.LastMalfunction = 0x00000000u; DTCToDFlashInfo.DTC[i].Snapshot.LastMalfunction = 0x00000000u;
DTCToDFlashInfo.DTC[i].Snapshot.Time.min = 0x00u;
DTCToDFlashInfo.DTC[i].Snapshot.Time.sec = 0x00u;
DTCToDFlashInfo.DTC[i].Snapshot.Time.hour = 0x00u;
DTCToDFlashInfo.DTC[i].Snapshot.Time.month = 0x01u;
DTCToDFlashInfo.DTC[i].Snapshot.Time.day = 0x01u;
DTCToDFlashInfo.DTC[i].Snapshot.Time.year = 0x00u;
} }
for(i = 0u; i < (sizeof(msgList) / sizeof(msgList[0u])); ++i) for(i = 0u; i < (sizeof(msgList) / sizeof(msgList[0u])); ++i)
{ {
......
...@@ -350,6 +350,16 @@ typedef struct ...@@ -350,6 +350,16 @@ typedef struct
uint16_t VehicleSpeed; uint16_t VehicleSpeed;
uint32_t FirstMalfunction; uint32_t FirstMalfunction;
uint32_t LastMalfunction; uint32_t LastMalfunction;
struct
{
uint8_t sec;
uint8_t min;
uint8_t hour;
uint8_t month;
uint8_t day;
uint8_t year;
}Time;
} SnapshotUnion; } SnapshotUnion;
......
...@@ -617,6 +617,12 @@ void ChangeDTCData(uint8_t DTCNum, uint8_t DTCStatus) ...@@ -617,6 +617,12 @@ void ChangeDTCData(uint8_t DTCNum, uint8_t DTCStatus)
DTCToDFlashInfo.DTC[DTCNum].Snapshot.OccurrenceCounter++; DTCToDFlashInfo.DTC[DTCNum].Snapshot.OccurrenceCounter++;
} }
DTCToDFlashInfo.DTC[DTCNum].Snapshot.LastMalfunction = (Data_ODO_Read() / 10u); DTCToDFlashInfo.DTC[DTCNum].Snapshot.LastMalfunction = (Data_ODO_Read() / 10u);
DTCToDFlashInfo.DTC[DTCNum].Snapshot.Time.min = Get_RTC_MINUTE();//Get_ID_18FEE69F_Sig_TBOX_Minute();
DTCToDFlashInfo.DTC[DTCNum].Snapshot.Time.sec = Get_RTC_SECOND()*4;//Get_ID_18FEE69F_Sig_TBOX_Second();
DTCToDFlashInfo.DTC[DTCNum].Snapshot.Time.hour = Get_RTC_HOUR();//Get_ID_18FEE69F_Sig_TBOX_Hour();
DTCToDFlashInfo.DTC[DTCNum].Snapshot.Time.month = Get_RTC_MONTH();//Get_ID_18FEE69F_Sig_TBOX_Month();
DTCToDFlashInfo.DTC[DTCNum].Snapshot.Time.day = Get_RTC_DATE()*4;//Get_ID_18FEE69F_Sig_TBOX_Day();
DTCToDFlashInfo.DTC[DTCNum].Snapshot.Time.year = Get_ID_18FEE69F_Sig_TBOX_Year(); //Get_RTC_YEAR();因为起始年份是1985与矩阵对应
isNeedSaveDTC = 1u; isNeedSaveDTC = 1u;
} }
} }
......
...@@ -193,7 +193,15 @@ void UDS_19Service_Sub04(void) ...@@ -193,7 +193,15 @@ void UDS_19Service_Sub04(void)
DiagMSG.msgData.SidDetail.Data[23] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction >> 16u); DiagMSG.msgData.SidDetail.Data[23] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction >> 16u);
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 >> 8u);
DiagMSG.msgData.SidDetail.Data[25] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction); DiagMSG.msgData.SidDetail.Data[25] = (uint8_t)(DTCToDFlashInfo.DTC[DTCcount].Snapshot.LastMalfunction);
UDS_Service_Response(0x19u, POSITIVE_RSP, DIAG_ID_Tx, 27u, DiagMSG.msgData.Data); DiagMSG.msgData.SidDetail.Data[26] = 0xDFu;
DiagMSG.msgData.SidDetail.Data[27] = 0x10u;
DiagMSG.msgData.SidDetail.Data[28] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.min ;
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[31] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.month ;
DiagMSG.msgData.SidDetail.Data[32] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.day ;
DiagMSG.msgData.SidDetail.Data[33] = DTCToDFlashInfo.DTC[DTCcount].Snapshot.Time.year ;
UDS_Service_Response(0x19u, POSITIVE_RSP, DIAG_ID_Tx, 35u, DiagMSG.msgData.Data);
} }
else else
{ {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define WFLASH_BLOCK_02_SIZE (20U) #define WFLASH_BLOCK_02_SIZE (20U)
#define WFLASH_BLOCK_03_SIZE (116u) #define WFLASH_BLOCK_03_SIZE (116u)
#define WFLASH_BLOCK_04_SIZE (356U) #define WFLASH_BLOCK_04_SIZE (356U)
#define WFLASH_BLOCK_05_SIZE (236) #define WFLASH_BLOCK_05_SIZE (360)
#define WFLASH_BLOCK_06_SIZE (20U) #define WFLASH_BLOCK_06_SIZE (20U)
#define WFLASH_BLOCK_07_SIZE (40U) #define WFLASH_BLOCK_07_SIZE (40U)
......
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