Commit 108ed7ec authored by hu's avatar hu

增加不同CAN数据处理

parent 863aed76
...@@ -55,7 +55,7 @@ void Key_Operation_Up(Key_Event_en_t enKeyEvent) ...@@ -55,7 +55,7 @@ void Key_Operation_Up(Key_Event_en_t enKeyEvent)
{ {
if (enKeyEvent == KEY_EVENT_SHORT_PRESS) if (enKeyEvent == KEY_EVENT_SHORT_PRESS)
{ {
/*主界面 一级菜单 二级菜单*/ /*主界面 一级菜单 二级菜单*/
if (((bCurMenuIDX >= _MN_DSP_LEVEL1MENU_1) && (bCurMenuIDX <= _MN_DSP_LEVEL2_6_MENU_2)) || if (((bCurMenuIDX >= _MN_DSP_LEVEL1MENU_1) && (bCurMenuIDX <= _MN_DSP_LEVEL2_6_MENU_2)) ||
((bCurMenuIDX >= _MN_DSP_LEVEL3_4_MENU_41) && (bCurMenuIDX <= _MN_DSP_LEVEL3_4_MENU_47))) ((bCurMenuIDX >= _MN_DSP_LEVEL3_4_MENU_41) && (bCurMenuIDX <= _MN_DSP_LEVEL3_4_MENU_47)))
{ {
......
...@@ -87,6 +87,8 @@ static uint32_t LOW_VOLTAGE; ...@@ -87,6 +87,8 @@ static uint32_t LOW_VOLTAGE;
static uint32_t TPMS_TEST_OFF_TIME; static uint32_t TPMS_TEST_OFF_TIME;
static uint32_t Menu_FacDea_Time; static uint32_t Menu_FacDea_Time;
uint32_t UdsCanIDSta;
#pragma ghs section bss=".myNonInitArea" #pragma ghs section bss=".myNonInitArea"
static uint32_t Menu_Off_Time; static uint32_t Menu_Off_Time;
#pragma ghs section bss=default #pragma ghs section bss=default
...@@ -136,6 +138,7 @@ void Common_DataInit(void) ...@@ -136,6 +138,7 @@ void Common_DataInit(void)
Set_18EF1718_Msg_Sta = COMMON_InValid; Set_18EF1718_Msg_Sta = COMMON_InValid;
//Menu_Off_Time = 0x00u; //Menu_Off_Time = 0x00u;
UdsCanIDSta = 0x00u;
} }
/*以下由各个处理模块按需调用*/ /*以下由各个处理模块按需调用*/
...@@ -902,3 +905,12 @@ void Common_Set_K_Line_Value(void) ...@@ -902,3 +905,12 @@ void Common_Set_K_Line_Value(void)
//} //}
} }
} }
void Common_Set_UdsCanIDSta(uint32_t Val)
{
UdsCanIDSta = Val;
}
uint32_t Common_Get_UdsCanIDSta(void)
{
return UdsCanIDSta;
}
\ No newline at end of file
...@@ -62,4 +62,7 @@ DataValid_t Common_Get_18EF1718_Msg_Sta(void); ...@@ -62,4 +62,7 @@ DataValid_t Common_Get_18EF1718_Msg_Sta(void);
void ReadDTCEOLValue_Meter_K_LINE(void); void ReadDTCEOLValue_Meter_K_LINE(void);
void Common_Set_K_Line_Value(void); void Common_Set_K_Line_Value(void);
void Common_Set_UdsCanIDSta(uint32_t Val);
uint32_t Common_Get_UdsCanIDSta(void);
#endif #endif
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "RSCAN.h" #include "RSCAN.h"
#include "Link_Layer.h" #include "Link_Layer.h"
#include "kwp2000_service.h" #include "kwp2000_service.h"
#include "Common_Interface.h"
static uint16_t Can_Init_Lock = 0U; static uint16_t Can_Init_Lock = 0U;
...@@ -147,17 +148,19 @@ void Can_Read_Msg(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg[]) ...@@ -147,17 +148,19 @@ void Can_Read_Msg(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg[])
Co_Can_Buff_Set(Co_Can_ConvertSubID(m_id), m_dlc, m_Msg); Co_Can_Buff_Set(Co_Can_ConvertSubID(m_id), m_dlc, m_Msg);
//if ((m_id == DIAG_ID_Rx_FUN) || (m_id == DIAG_ID_Rx_PHY)) if ((m_id == 0x18DAF003) || (m_id == 0x18DAF00B))
//{ {
// DoCAN_L_Data_Indication(m_id, m_dlc, m_Msg); Common_Set_UdsCanIDSta(m_id);
//} LK_Link_main(m_id, (uint8_t*)m_Msg, (m_dlc & 0x0f));
}
} }
void Can_Read_Msg2(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg[]) void Can_Read_Msg2(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg[])
{ {
if (m_id == ID_BCM_ResAddr) if (m_id == ID_BCM_ResAddr)
{ {
LK_Link_main(ID_BCM_ResAddr, (uint8_t*)m_Msg, (m_dlc & 0x0f)); Common_Set_UdsCanIDSta(m_id);
LK_Link_main(m_id, (uint8_t*)m_Msg, (m_dlc & 0x0f));
} }
if ((m_id == DIAG_ID_Rx_FUN) || (m_id == DIAG_ID_Rx_PHY)) if ((m_id == DIAG_ID_Rx_FUN) || (m_id == DIAG_ID_Rx_PHY))
{ {
......
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