Commit 6e3316b1 authored by 何锐's avatar 何锐

🐞 fix:检测台终版

parent 772d0fe1
...@@ -1072,7 +1072,7 @@ void can_submit(void) ...@@ -1072,7 +1072,7 @@ void can_submit(void)
data2[4] = 0x13; data2[4] = 0x13;
init_CAN_Frame(&m_msg2, 0x600, 8, 1, data2); init_CAN_Frame(&m_msg2, 0x600, 8, 1, data2);
data3[0] = 0x2E; //手机电量 data3[0] = 0x2E; //手机电量
data3[1] = 0xF4; //未接指示灯,音乐 data3[1] = 0xF6; //未接指示灯,音乐
data3[3] = 0x12; //加热手柄指示灯 data3[3] = 0x12; //加热手柄指示灯
init_CAN_Frame(&m_msg3, 0x687, 8, 1, data3); init_CAN_Frame(&m_msg3, 0x687, 8, 1, data3);
......
...@@ -264,9 +264,9 @@ uint8_t Get_CAN_CH0_ID_590_Engine_Fault_Sig(void) ...@@ -264,9 +264,9 @@ uint8_t Get_CAN_CH0_ID_590_Engine_Fault_Sig(void)
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x590_Msg_Count, 2u) >> 6u) & 0x01u)); return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x590_Msg_Count, 2u) >> 6u) & 0x01u));
} }
uint8_t Get_CAN_CH0_ID_100_oilPressuret_Sig(void) uint8_t Get_CAN_CH0_ID_590_oilPressuret_Sig(void)
{ {
return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x590_Msg_Count, 5u) >> 0u) & 0x01u)); return (((uint8_t)((uint8_t)CAN_MSG_Read(CAN_CH0_ID_0x590_Msg_Count, 2u) >> 7u) & 0x01u));
} }
uint8_t Get_CAN_CH0_ID_590_low_fuel_level_Sig(void) uint8_t Get_CAN_CH0_ID_590_low_fuel_level_Sig(void)
......
...@@ -74,7 +74,7 @@ extern uint8_t Get_CAN_CH0_ID_7EB_byte5_Sig(void); ...@@ -74,7 +74,7 @@ extern uint8_t Get_CAN_CH0_ID_7EB_byte5_Sig(void);
extern uint8_t Get_CAN_CH0_ID_7EB_byte6_Sig(void); extern uint8_t Get_CAN_CH0_ID_7EB_byte6_Sig(void);
extern uint8_t Get_CAN_CH0_ID_7EB_byte7_Sig(void); extern uint8_t Get_CAN_CH0_ID_7EB_byte7_Sig(void);
extern uint8_t Get_CAN_CH0_ID_68B_Fuel_Divisions_Sig(void); extern uint8_t Get_CAN_CH0_ID_68B_Fuel_Divisions_Sig(void);
extern uint8_t Get_CAN_CH0_ID_100_oilPressuret_Sig(void); extern uint8_t Get_CAN_CH0_ID_590_oilPressuret_Sig(void);
extern uint8_t Get_CAN_CH0_ID_590_low_fuel_level_Sig(void); extern uint8_t Get_CAN_CH0_ID_590_low_fuel_level_Sig(void);
extern uint8_t Get_CAN_CH0_ID_590_High_TELL_Sig(void); extern uint8_t Get_CAN_CH0_ID_590_High_TELL_Sig(void);
extern uint8_t Get_CAN_CH0_ID_590_Engine_Fault_Sig(void); extern uint8_t Get_CAN_CH0_ID_590_Engine_Fault_Sig(void);
......
...@@ -69,7 +69,7 @@ void Function_Check_Ctrl(uint32_t cmd); ...@@ -69,7 +69,7 @@ void Function_Check_Ctrl(uint32_t cmd);
void MENU_CHECK_STEP_ADD(void) void MENU_CHECK_STEP_ADD(void)
{ {
if(MENU_CHECK_STEP > 10) if(MENU_CHECK_STEP > 9)
{ {
MENU_CHECK_STEP = 0; MENU_CHECK_STEP = 0;
} }
......
...@@ -5590,7 +5590,7 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -5590,7 +5590,7 @@ void Display_Send_Vspead(uint8_t menu)
fuel_divisions = Get_CAN_CH0_ID_68B_Fuel_Divisions_Sig(); fuel_divisions = Get_CAN_CH0_ID_68B_Fuel_Divisions_Sig();
highlamp_output = Get_CAN_CH0_ID_590_High_TELL_Sig(); highlamp_output = Get_CAN_CH0_ID_590_High_TELL_Sig();
engine_fault_output = Get_CAN_CH0_ID_590_Engine_Fault_Sig(); engine_fault_output = Get_CAN_CH0_ID_590_Engine_Fault_Sig();
oilPressure = Get_CAN_CH0_ID_100_oilPressuret_Sig(); oilPressure = Get_CAN_CH0_ID_590_oilPressuret_Sig();
low_fuel_level = Get_CAN_CH0_ID_590_low_fuel_level_Sig(); low_fuel_level = Get_CAN_CH0_ID_590_low_fuel_level_Sig();
fuel_divisions_display[0] = fuel_divisions; fuel_divisions_display[0] = fuel_divisions;
......
...@@ -78,6 +78,7 @@ extern uint8_t rightkey; ...@@ -78,6 +78,7 @@ extern uint8_t rightkey;
extern uint8_t rightkeytime; extern uint8_t rightkeytime;
extern uint8_t middlekey; extern uint8_t middlekey;
extern uint8_t middlekeytime; extern uint8_t middlekeytime;
extern uint8_t clear_odo;
extern void Key_Init(void); extern void Key_Init(void);
extern void Key_Service(void); /*10ms*/ extern void Key_Service(void); /*10ms*/
......
...@@ -6,12 +6,16 @@ ...@@ -6,12 +6,16 @@
uint8_t rightkey; uint8_t rightkey;
uint8_t rightkeytime; uint8_t rightkeytime;
uint8_t clear_odo;
void Key_Operation_SW5(Key_Event_en_t enKeyEvent) void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
key_right = 1; if(clear_odo == 0)
rightkey = 1; {
key_right = 1;
rightkey = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -23,22 +27,25 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) ...@@ -23,22 +27,25 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
} }
else else
{ {
if(rightkey) if(clear_odo == 0)
{ {
if(rightkeytime < 10) if(rightkey)
{ {
; if(rightkeytime < 10)
{
;
}
else
{
rightkey = 0;
rightkeytime = 0;
}
} }
else else
{ {
rightkey = 0; key_right = 0;
rightkeytime = 0;
} }
} }
else
{
key_right = 0;
}
} }
} }
uint8_t leftkey; uint8_t leftkey;
...@@ -47,8 +54,11 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) ...@@ -47,8 +54,11 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
key_left = 1; if(clear_odo == 0)
leftkey = 1; {
key_left = 1;
leftkey = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -60,22 +70,25 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) ...@@ -60,22 +70,25 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
} }
else else
{ {
if(leftkey) if(clear_odo == 0)
{ {
if(leftkeytime < 10) if(leftkey)
{ {
; if(leftkeytime < 10)
{
;
}
else
{
leftkey = 0;
leftkeytime = 0;
}
} }
else else
{ {
leftkey = 0; key_left = 0;
leftkeytime = 0;
} }
} }
else
{
key_left = 0;
}
} }
} }
void Key_Operation_SW7(Key_Event_en_t enKeyEvent) void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
...@@ -94,12 +107,15 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent) ...@@ -94,12 +107,15 @@ 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 )
{ {
if(MENU_CHECK_STEP == 9)
{
clear_odo = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -118,8 +134,11 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -118,8 +134,11 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
key_middle = 1; if(clear_odo == 0)
middlekey = 1; {
key_middle = 1;
middlekey = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -131,22 +150,25 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -131,22 +150,25 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
} }
else else
{ {
if(middlekey) if(clear_odo == 0)
{ {
if(middlekeytime < 10) if(middlekey)
{ {
; if(middlekeytime < 10)
{
;
}
else
{
middlekey = 0;
middlekeytime = 0;
}
} }
else else
{ {
middlekey = 0; key_middle = 0;
middlekeytime = 0;
} }
} }
else
{
key_middle = 0;
}
} }
} }
void Key_Operation_SW1(Key_Event_en_t enKeyEvent) void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
......
...@@ -215,6 +215,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void) ...@@ -215,6 +215,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
uint16_t u16LJSText; uint16_t u16LJSText;
uint8_t time300ms; uint8_t time300ms;
uint8_t clear_odo_time;
void Sys_Run_Mode_100ms_Tasks_Group(void) void Sys_Run_Mode_100ms_Tasks_Group(void)
{ {
static uint32_t loc_timer = 0; static uint32_t loc_timer = 0;
...@@ -242,6 +243,22 @@ void Sys_Run_Mode_100ms_Tasks_Group(void) ...@@ -242,6 +243,22 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Buzzer_Start(); Buzzer_Start();
Total_Check( ); Total_Check( );
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH; //u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
if(clear_odo)
{
if(clear_odo_time < 52)
{
clear_odo_time++;
key_left = 1;
key_right = 1;
}
else
{
clear_odo = 0;
clear_odo_time = 0;
key_left = 0;
key_right = 0;
}
}
} }
/*=================================================================*/ /*=================================================================*/
......
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