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

🐞 fix:检测台终版

parent 772d0fe1
......@@ -1072,7 +1072,7 @@ void can_submit(void)
data2[4] = 0x13;
init_CAN_Frame(&m_msg2, 0x600, 8, 1, data2);
data3[0] = 0x2E; //手机电量
data3[1] = 0xF4; //未接指示灯,音乐
data3[1] = 0xF6; //未接指示灯,音乐
data3[3] = 0x12; //加热手柄指示灯
init_CAN_Frame(&m_msg3, 0x687, 8, 1, data3);
......
......@@ -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));
}
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)
......
......@@ -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_byte7_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_High_TELL_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);
void MENU_CHECK_STEP_ADD(void)
{
if(MENU_CHECK_STEP > 10)
if(MENU_CHECK_STEP > 9)
{
MENU_CHECK_STEP = 0;
}
......
......@@ -5590,7 +5590,7 @@ void Display_Send_Vspead(uint8_t menu)
fuel_divisions = Get_CAN_CH0_ID_68B_Fuel_Divisions_Sig();
highlamp_output = Get_CAN_CH0_ID_590_High_TELL_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();
fuel_divisions_display[0] = fuel_divisions;
......
......@@ -78,6 +78,7 @@ extern uint8_t rightkey;
extern uint8_t rightkeytime;
extern uint8_t middlekey;
extern uint8_t middlekeytime;
extern uint8_t clear_odo;
extern void Key_Init(void);
extern void Key_Service(void); /*10ms*/
......
......@@ -6,13 +6,17 @@
uint8_t rightkey;
uint8_t rightkeytime;
uint8_t clear_odo;
void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if(clear_odo == 0)
{
key_right = 1;
rightkey = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -22,6 +26,8 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
}
else
{
if(clear_odo == 0)
{
if(rightkey)
{
......@@ -40,16 +46,20 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
key_right = 0;
}
}
}
}
uint8_t leftkey;
uint8_t leftkeytime;
void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if(clear_odo == 0)
{
key_left = 1;
leftkey = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -59,6 +69,8 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
}
else
{
if(clear_odo == 0)
{
if(leftkey)
{
......@@ -77,6 +89,7 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
key_left = 0;
}
}
}
}
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)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if(MENU_CHECK_STEP == 9)
{
clear_odo = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -117,10 +133,13 @@ uint8_t middlekeytime;
void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if(clear_odo == 0)
{
key_middle = 1;
middlekey = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -130,6 +149,8 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
}
else
{
if(clear_odo == 0)
{
if(middlekey)
{
......@@ -148,6 +169,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
key_middle = 0;
}
}
}
}
void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{
......
......@@ -215,6 +215,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
------------------------------------------------------------------------------*/
uint16_t u16LJSText;
uint8_t time300ms;
uint8_t clear_odo_time;
void Sys_Run_Mode_100ms_Tasks_Group(void)
{
static uint32_t loc_timer = 0;
......@@ -242,6 +243,22 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Buzzer_Start();
Total_Check( );
//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