Commit 0126f2a2 authored by 张金硕's avatar 张金硕

🐞 fix:屏蔽导航界面机油压力指示灯,优化按键逻辑

parent d1086d26
...@@ -3056,10 +3056,10 @@ static void AMT630H_GUI_PhoneConnect_Light() ...@@ -3056,10 +3056,10 @@ static void AMT630H_GUI_PhoneConnect_Light()
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0472_251_485); SetPagePic(GRAPHICS_PAGE_0, Pic_0472_251_485);
} }
if(Get_TelltalesLedSts(em_LED_Oil_Pressure_Alert)) // if(Get_TelltalesLedSts(em_LED_Oil_Pressure_Alert))
{ // {
SetPagePic(GRAPHICS_PAGE_0, Pic_0466_874_488); // SetPagePic(GRAPHICS_PAGE_0, Pic_0466_874_488);
} // }
if(Get_TelltalesLedSts(em_LED_TCS)) if(Get_TelltalesLedSts(em_LED_TCS))
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0473_172_490); SetPagePic(GRAPHICS_PAGE_0, Pic_0473_172_490);
......
...@@ -51,10 +51,10 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认 ...@@ -51,10 +51,10 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
{ {
case KEY_EVENT_SHORT_PRESS_1: case KEY_EVENT_SHORT_PRESS_1:
/* 在数字闪烁界面的时候,按确认键保存时间 */ /* 在数字闪烁界面的时候,按确认键保存时间 */
if ((Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB_SET) || if (((Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB_SET) ||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_BIT_SET ) || (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_BIT_SET ) ||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB_SET ) || (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB_SET ) ||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT_SET ) ) (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT_SET ) ) && (Get_ActualVechileSpeed() == 0))
{ {
// Menu_Logic_Operation_Clock_Hour_Tenb_Set(MENU_KEY_CONFIRM_SHORT); // Menu_Logic_Operation_Clock_Hour_Tenb_Set(MENU_KEY_CONFIRM_SHORT);
counter_val.time.RTC_Hours = (MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit); counter_val.time.RTC_Hours = (MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit);
...@@ -65,9 +65,9 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认 ...@@ -65,9 +65,9 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
Key_Event_Short_Press_Right(); Key_Event_Short_Press_Right();
break; break;
case KEY_EVENT_SHORT_PRESS_2: case KEY_EVENT_SHORT_PRESS_2:
Key_Event_SHORT_PRESS_2_Right();
break; break;
case KEY_EVENT_LONG_PRESS_1: //2s case KEY_EVENT_LONG_PRESS_1: //2s
Key_Event_SHORT_PRESS_2_Right();
break; break;
case KEY_EVENT_LONG_PRESS_2: //3s case KEY_EVENT_LONG_PRESS_2: //3s
break; break;
...@@ -178,31 +178,36 @@ void Key_TimeOut_Service(void) ...@@ -178,31 +178,36 @@ void Key_TimeOut_Service(void)
{ {
Menu_Service(MENU_KEY_TIMEOUT); Menu_Service(MENU_KEY_TIMEOUT);
} }
else
{
;
}
} }
else else
{ {
;
} }
} }
void Key_Auto_Save(void) void Key_Auto_Save(void)
{ {
{ // {
//RTC_SetTime(&counter_val.time); // RTC_SetTime(&counter_val.time);
} // }
{ // {
//RTC_SetTime(&counter_val.time); // RTC_SetTime(&counter_val.time);
} // }
} }
void Key_Event_Short_Press_Left(void)//选择 void Key_Event_Short_Press_Left(void)//选择
{ {
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)//切换大小计 if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)//接电话,切换大小计
{ {
if ((BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking)) if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming)
{ {
PackedTransfer_BlueTooth_DataSet(Phone_Pick_Up); PackedTransfer_BlueTooth_DataSet(Phone_Pick_Up);
} }
...@@ -217,10 +222,14 @@ void Key_Event_Short_Press_Left(void)//选择 ...@@ -217,10 +222,14 @@ void Key_Event_Short_Press_Left(void)//选择
} }
else if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_PHONE_CONNECT_APP) else if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_PHONE_CONNECT_APP)
{ {
if ((BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking)) if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming)
{ {
PackedTransfer_BlueTooth_DataSet(Phone_Pick_Up); PackedTransfer_BlueTooth_DataSet(Phone_Pick_Up);
} }
else
{
;
}
} }
if(((Menu_Get_Current_Cursor_Information() == MENU_ITEM_DISPLAY_MODE)|| if(((Menu_Get_Current_Cursor_Information() == MENU_ITEM_DISPLAY_MODE)||
...@@ -333,9 +342,20 @@ void Key_Event_Short_Press_Right(void)//确认 ...@@ -333,9 +342,20 @@ void Key_Event_Short_Press_Right(void)//确认
void Key_Event_SHORT_PRESS_2_Right(void) void Key_Event_SHORT_PRESS_2_Right(void)
{ {
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM) if((Get_DispVechileSpeed() >= 1990)&&(Get_DispEngineSpeed() >= 12000))
{ {
Menu_Change_Branch_To_Item(MENU_BRANCH_ANIMATION,MENU_ITEM_PHONE_CONNECT_APP); ;
}
else
{
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)
{
Menu_Change_Branch_To_Item(MENU_BRANCH_ANIMATION,MENU_ITEM_PHONE_CONNECT_APP);
}
else
{
;
}
} }
} }
...@@ -401,7 +421,7 @@ void Key_Event_BackLight_Press_Left(void) ...@@ -401,7 +421,7 @@ void Key_Event_BackLight_Press_Left(void)
uint8_t OTA_Update_Flag = 0; uint8_t OTA_Update_Flag = 0;
void Get_Into_OTA_Update_Mode(void) void Get_Into_OTA_Update_Mode(void)
{ {
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_FAULT_INFORMATION) if((Menu_Get_Current_Cursor_Information() == MENU_ITEM_FAULT_INFORMATION) && (Get_ActualVechileSpeed() == 0))
{ {
OTA_Update_Flag = 1U; OTA_Update_Flag = 1U;
} }
...@@ -449,7 +469,7 @@ void TYW_RESET_ODO(void) ...@@ -449,7 +469,7 @@ void TYW_RESET_ODO(void)
{ {
if(ClearODO_Flag < 1) if(ClearODO_Flag < 1)
{ {
if((Get_DispVechileSpeed() >= 1990)&&(Get_DispEngineSpeed() >= 12000)) if((Get_DispVechileSpeed() >= 1990)&&(Get_DispEngineSpeed() >= 12000)&&((Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)))
{ {
ClearODO_Flag = 1; ClearODO_Flag = 1;
Data_Mileage_Clear(); Data_Mileage_Clear();
...@@ -487,14 +507,12 @@ void My_Key_Service(void) ...@@ -487,14 +507,12 @@ void My_Key_Service(void)
/* 自检和OTA界面时不可操作按键 */ /* 自检和OTA界面时不可操作按键 */
if((g_u8SelfCheck) && (OTA_Update_Flag == 0)) if((g_u8SelfCheck) && (OTA_Update_Flag == 0))
{ {
if((Get_ActualVechileSpeed() == 0) ||
((Get_DispVechileSpeed() >= 1990) && (Get_DispEngineSpeed() >= 12000)) ||
(BlueToothPhoneData.BlueToothPhoneSate >= Phone_Outgoing) && (BlueToothPhoneData.BlueToothPhoneSate <= Phone_Talking) ||
((Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)))
{
Key_Service(); Key_Service();
}
} }
else
{
;
}
} }
uint8_t Get_Dis_Hour_Time(void) uint8_t Get_Dis_Hour_Time(void)
......
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