Commit c1c69e63 authored by hu's avatar hu

增加界面显示,调整KEY逻辑

No preview for this file type
This diff is collapsed.
project .intvect 1536
project .text 290252
project .rodata 408703
project .text 292796
project .rodata 408719
project .secinfo 120
project .syscall 6
project .romdata 9029
......
This diff is collapsed.
......@@ -1095,5 +1095,4 @@ uint8_t Co_Can_ConvertSubID(uint32_t MsgID)
break;
}
return u8Result;
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -17,30 +17,37 @@ static const uint16_t GUI_DISP_Minutes[2] = {428, 406};
static const uint16_t GUI_DISP_Year[4] = {568, 552, 538, 522};
static const uint16_t GUI_DISP_Month[2] = {617, 604};
static const uint16_t GUI_DISP_Date[2] = {669, 653};
static const uint16_t GUI_DISP_TRIPA[5] = {676, 648, 629, 610, 591};/*TRIP*/
static const uint16_t GUI_DISP_ODO[7] = {676, 657, 638, 619, 600, 581, 562};/*ODO*/
static const uint16_t GUI_DISP_DrivingSupport[3] = {481, 459, 436};/*定速巡航*/
static const uint16_t GUI_DISP_TRIPA[5] = {676, 648, 629, 610, 591}; /*TRIP*/
static const uint16_t GUI_DISP_ODO[7] = {676, 657, 638, 619, 600, 581, 562}; /*ODO*/
static const uint16_t GUI_DISP_DrivingSupport[3] = {481, 459, 436}; /*定速巡航*/
static const uint16_t GUI_DISP_OILTEMP[7] = {729, 697, 676, 655, 634, 613, 592}; /*油温时间*/
extern void GUI_Display_KL15_ON_Init(void);
extern void GUI_Display_KL15_OFF_Init(void);
extern void GUI_Display_background(void); /*刷底图*/
extern void GUI_OftenShow_Display(void);/*常显界面*/
extern void GUI_OftenShow_Display(void); /*常显界面*/
extern void GUI_Dynamic_DIsplay(void);
void GUI_AC_Temp_Dispaly(uint8_t Mode);/*室外温度显示*/
void GUI_Time_Dispaly(uint8_t Mode);/*时间显示*/
void GUI_Data_Dispaly(uint8_t Mode);/*日历显示*/
void GUI_TFTTelltales_Display(uint8_t Mode);/*TFT指示灯*/
void GUI_WetGas_Dispaly(uint8_t Mode);/*wet气压*/
void GUI_AdBlue_Dispaly(uint8_t Mode);/**/
void GUI_AC_Temp_Dispaly(uint8_t Mode); /*室外温度显示*/
void GUI_Time_Dispaly(uint8_t Mode); /*时间显示*/
void GUI_Data_Dispaly(uint8_t Mode); /*日历显示*/
void GUI_TFTTelltales_Display(uint8_t Mode); /*TFT指示灯*/
void GUI_WetGas_Dispaly(uint8_t Mode); /*wet气压*/
void GUI_AdBlue_Dispaly(uint8_t Mode); /**/
void Gui_TRIPA_Display(uint8_t Mode);
void Gui_TRIPB_Display(uint8_t Mode);
void Gui_ODO_Display(uint8_t Mode);
void Gui_ADAS_Display(uint8_t Mode);
void Gui_DrivingSupport_Display(uint8_t Mode);/*定速巡航*/
void Gui_Gear_Display(uint8_t Mode);/*挡位*/
void Gui_DrivingSupport_Display(uint8_t Mode); /*定速巡航*/
void Gui_Gear_Display(uint8_t Mode); /*挡位*/
void GUI_AVG_FuelSpeed_Display(uint8_t Mode); /*平均车速,平均油耗*/
void GUI_Drive_Info_Avg_Speed_Display(uint8_t Valid, uint16_t Speed); /*平均车速*/
void GUI_Drive_Info_Avg_Fuel_Display(uint8_t Valid, uint16_t Fuel); /*平均油耗*/
void GUI_Battery_Display_Display(uint8_t Mode); /*电池电量*/
void GUI_DPD_Display_Display(uint8_t Mode); /*DPD*/
void GUI_Time_OilTemp_Display(uint8_t Mode); /*转速时间-油温*/
void GUI_Time_OilTemp_OFF_Display(uint8_t Mode);
void GUI_Year_Month_Data_Display(uint8_t Mode);
......
......@@ -140,6 +140,22 @@ typedef struct
void (*Exit)(void);
} _MenuOptTab;
typedef struct
{
uint8_t Menu_Flag ; /*主界面标记*/
uint8_t Menu_Time_Flag ; /*从Enter界面确认退出计时*/
uint8_t Menu_Enter_Return ; /*进入Enter之前界面*/
uint8_t Menu_Return ; /*Enter Return界面切换标记*/
uint8_t Menu_Key_Time ; /*按键长按时间记录*/
uint16_t Key_Menu_Popup_time ; /*上述状态持续时间*/
uint8_t Key_Menu_Popup_Flag ; /*报警界面menu按键长按 */
uint8_t Menu_Light_Time ;
uint8_t Menu_Light_Time_Flag ;
} _MenuFlag;
EXTERN_MEU_PROCESS _MenuFlag MenuFlag ;
EXTERN_MEU_PROCESS uint8_t bMenuSwFlag;
EXTERN_MEU_PROCESS uint8_t g_ClearWin1;
EXTERN_MEU_PROCESS uint8_t bNextMenuIDX; // the next index of menu .
......
......@@ -14,6 +14,8 @@ uint8_t bCurMenuIDX;
uint8_t bMainMenuIDX;
uint8_t bOldMenuIDX;
_MenuFlag MenuFlag ;
const _MenuOptTab MenuOptTab[] =
{
/*---------ENTER---------------------UP-----------------------DOWN----------------------EXIT------------------ENTER------------------DO-----------------EXIT------------*/
......@@ -212,6 +214,8 @@ void Level1Menu_1Enter(void)
void Level1Menu_1Do(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
GUI_AVG_FuelSpeed_Display(GUI_DISP_MODE_BLANK);
}
void Level1Menu_1Exit(void)
{}
......@@ -222,7 +226,9 @@ void Level1Menu_2Enter(void)
}
void Level1Menu_2Do(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
GUI_Battery_Display_Display(GUI_DISP_MODE_NORMAL);
}
void Level1Menu_2Exit(void)
{}
......@@ -233,6 +239,9 @@ void Level1Menu_3Enter(void)
}
void Level1Menu_3Do(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
GUI_DPD_Display_Display(GUI_DISP_MODE_NORMAL);
}
void Level1Menu_3Exit(void)
{}
......@@ -243,7 +252,9 @@ void Level1Menu_4Enter(void)
}
void Level1Menu_4Do(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
GUI_Time_OilTemp_Display(GUI_DISP_MODE_NORMAL);
}
void Level1Menu_4Exit(void)
{}
......@@ -254,7 +265,9 @@ void Level1Menu_5Enter(void)
}
void Level1Menu_5Do(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
GUI_Year_Month_Data_Display(GUI_DISP_MODE_NORMAL);
}
void Level1Menu_5Exit(void)
{}
......@@ -262,6 +275,8 @@ void Level1Menu_5Exit(void)
/*主界面6 空白*/
void Level1Menu_6Enter(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
}
void Level1Menu_6Do(void)
{
......@@ -273,6 +288,8 @@ void Level1Menu_6Exit(void)
/*主界面7 亮度调节*/
void Level1Menu_7Enter(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
}
void Level1Menu_7Do(void)
{
......@@ -283,9 +300,16 @@ void Level1Menu_7Exit(void)
/*主界面 报警界面*/
void LevelPopup_Enter(void)
{
GUI_OftenShow_Display();
GUI_Dynamic_DIsplay();
}
void LevelPopup_Do(void)
{
}
void LevelPopup_Exit(void)
{}
\ No newline at end of file
{}
......@@ -131,7 +131,68 @@ void Display_StartAnimationExit(void)
void Display_MenuService(void)
{
/*上短*/
if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP == KEY_EVENT_SHORT_PRESS )
{
HMI_Clear_KEY_UP();
}
/*上长*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP == KEY_EVENT_LONG_PRESS )
{
HMI_Clear_KEY_UP();
}
/*下短*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN == KEY_EVENT_SHORT_PRESS )
{
HMI_Clear_KEY_DOWN();
}
/*下长*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN == KEY_EVENT_LONG_PRESS )
{
HMI_Clear_KEY_DOWN();
}
/*确认短*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SHORT_PRESS )
{
HMI_Clear_KEY_CONFIRM();
}
/*确认长*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_LONG_PRESS )
{
HMI_Clear_KEY_CONFIRM();
}
/*确认超长 30 S*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SUPER_LONG_PRESS )
{
HMI_Clear_KEY_CONFIRM();
/*TYW总计清零*/
TYW_Data_ODO_Clear();
}
/*返回短*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_SHORT_PRESS )
{
HMI_Clear_KEY_CANCEL();
}
/*返回长*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_LONG_PRESS )
{
HMI_Clear_KEY_CANCEL();
}
/*MENU短*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_SHORT_PRESS )
{
HMI_Clear_KEY_MENU();
}
/*MENU长*/
else if ( UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_LONG_PRESS )
{
HMI_Clear_KEY_MENU();
}
else
{
;/*do nothing*/
}
}
void Display_AlarmService(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