Commit dcd21f87 authored by huangguoqing's avatar huangguoqing

feat:CAN诊断nfc

parent 1db795da
...@@ -37,11 +37,11 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg) ...@@ -37,11 +37,11 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
void COM_TX_Process(void) void COM_TX_Process(void)
{ {
Can_Write_Fun(&CAN_CH4_CanMsgTxOp, 50000u); Can_Write_Fun(&CAN_CH4_CanMsgTxOp, 20000u);
} }
void COM_RX_Process(void) void COM_RX_Process(void)
{ {
CanMSg_XMS_Analysis(&CAN_CH4_CanMsgOp, 5u); CanMSg_XMS_Analysis(&CAN_CH4_CanMsgOp, 2u);
} }
...@@ -109,12 +109,6 @@ uint8_t Get_DID_Low_Byte(uint16_t Input_DID) ...@@ -109,12 +109,6 @@ uint8_t Get_DID_Low_Byte(uint16_t Input_DID)
return (uint8_t)(Res); return (uint8_t)(Res);
} }
void HW_CHECK_IPK_EXIST(void) void HW_CHECK_IPK_EXIST(void)
{ {
...@@ -162,7 +156,7 @@ void CHECK_IPK_COUNT(void) ...@@ -162,7 +156,7 @@ void CHECK_IPK_COUNT(void)
memset(Voltage_UDS, 0xFF, sizeof(Voltage_UDS)); memset(Voltage_UDS, 0xFF, sizeof(Voltage_UDS));
Display_Menu_Type = 0; Display_Menu_Type = 0;
Display_TFT_Clear( ); //Display_TFT_Clear();
Send_Init(); Send_Init();
// MENU_CHECK_Init( ); // MENU_CHECK_Init( );
Global_Session = 0;//掉线时,认为会话模式归零,重连CAN线后,重新将会话模式切到03扩展会话。 Global_Session = 0;//掉线时,认为会话模式归零,重连CAN线后,重新将会话模式切到03扩展会话。
......
...@@ -50,7 +50,6 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent) ...@@ -50,7 +50,6 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{ {
POWER_CTRL_KL15 = 1; POWER_CTRL_KL15 = 1;
} }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -166,7 +165,6 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent) ...@@ -166,7 +165,6 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{ {
} }
} }
void Key_Operation_SW8(Key_Event_en_t enKeyEvent) void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
...@@ -215,6 +213,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent) ...@@ -215,6 +213,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
...@@ -235,13 +234,13 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent) ...@@ -235,13 +234,13 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
if(Check_Control_Mode == 2) if(Check_Control_Mode == 2)
{ {
if((( All_Flag.u8flag[0] == 0) && ( All_Flag.u8flag[1] == 0)&& ( All_Flag.u8flag[2] == 0) && (( All_Flag.u8flag[3] == 0)))) if((( All_Flag.u8flag[0] == 0) && ( All_Flag.u8flag[1] == 0)&& ( All_Flag.u8flag[2] == 0) && (( All_Flag.u8flag[3] == 0))))
{
Check_Steps++;
Display_flag(Check_Steps);
if(Check_Steps > Check_Couont)
{ {
Check_Steps = 0; Check_Steps++;
} Display_flag(Check_Steps);
if(Check_Steps > Check_Couont)
{
Check_Steps = 0;
}
} }
} }
...@@ -378,6 +377,9 @@ Key_Real_Status_en_t Key_Real_sw10(void) ...@@ -378,6 +377,9 @@ Key_Real_Status_en_t Key_Real_sw10(void)
return enKeyRealStatus; return enKeyRealStatus;
} }
void User_CheckMode_Service(uint8_t CbkCycle) void User_CheckMode_Service(uint8_t CbkCycle)
{ {
if(Check_Control_Mode == 1) if(Check_Control_Mode == 1)
...@@ -416,6 +418,7 @@ void User_CheckMode_Service(uint8_t CbkCycle) ...@@ -416,6 +418,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led = 0; Left_Led = 0;
Right_Led = 0; Right_Led = 0;
Headlights_Led = 0; Headlights_Led = 0;
NFC_C_card = 0;
break; break;
case 1: case 1:
...@@ -435,6 +438,7 @@ void User_CheckMode_Service(uint8_t CbkCycle) ...@@ -435,6 +438,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led = 1; Left_Led = 1;
Right_Led = 1; Right_Led = 1;
Headlights_Led = 0; Headlights_Led = 0;
NFC_C_card = 1;
break; break;
case 2: case 2:
Vspeed = 19; Vspeed = 19;
...@@ -453,6 +457,7 @@ void User_CheckMode_Service(uint8_t CbkCycle) ...@@ -453,6 +457,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led = 0; Left_Led = 0;
Right_Led = 0; Right_Led = 0;
Headlights_Led = 1; Headlights_Led = 1;
NFC_C_card=2;
break; break;
case 3: case 3:
Vspeed = 29; Vspeed = 29;
...@@ -471,6 +476,7 @@ void User_CheckMode_Service(uint8_t CbkCycle) ...@@ -471,6 +476,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led = 0; Left_Led = 0;
Right_Led = 0; Right_Led = 0;
Headlights_Led = 0; Headlights_Led = 0;
NFC_C_card=0;
break; break;
case 4: case 4:
Vspeed = 38; Vspeed = 38;
......
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