Commit c231857e authored by hu's avatar hu

调整三态逻辑

parent 921095a3
...@@ -6762,6 +6762,7 @@ void GUI_BG_FacDTCClear1_Display(uint8_t Mode) ...@@ -6762,6 +6762,7 @@ void GUI_BG_FacDTCClear1_Display(uint8_t Mode)
GUI_General_Display(MENU_Sprite, CN_fengexian, GUI_BLENDMODE_SRC_OVER); /*line*/ GUI_General_Display(MENU_Sprite, CN_fengexian, GUI_BLENDMODE_SRC_OVER); /*line*/
GUI_General_Display(MENU_Sprite, CN_Fty_Menu2_02_1, GUI_BLENDMODE_SRC_OVER); GUI_General_Display(MENU_Sprite, CN_Fty_Menu2_02_1, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(MENU_Sprite, CN_white_yes, GUI_BLENDMODE_SRC_OVER);
} }
else else
{ {
...@@ -6831,6 +6832,7 @@ void GUI_BG_FacDTCClear4_Display(uint8_t Mode) ...@@ -6831,6 +6832,7 @@ void GUI_BG_FacDTCClear4_Display(uint8_t Mode)
GUI_General_Display(MENU_Sprite, CN_fengexian, GUI_BLENDMODE_SRC_OVER); /*line*/ GUI_General_Display(MENU_Sprite, CN_fengexian, GUI_BLENDMODE_SRC_OVER); /*line*/
GUI_General_Display(MENU_Sprite, CN_Fty_Menu2_02_4, GUI_BLENDMODE_SRC_OVER); GUI_General_Display(MENU_Sprite, CN_Fty_Menu2_02_4, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(MENU_Sprite, CN_white_jieshu_1, GUI_BLENDMODE_SRC_OVER);
} }
else else
{ {
......
...@@ -79,14 +79,10 @@ void DisplayServices(void) ...@@ -79,14 +79,10 @@ void DisplayServices(void)
uint32_t PowerOFFTimer; uint32_t PowerOFFTimer;
uint8_t PowerStatus; uint8_t PowerStatus;
uint16_t popupID = 0xFFFFu; uint16_t popupID = 0xFFFFu;
uint16_t DispVSpeed = 0u;
uint16_t DispESpeed = 0u;
PowerStatus = Common_Get_IG_Sts(); PowerStatus = Common_Get_IG_Sts();
PowerOnTimer = Common_GetIgnOnTime(); PowerOnTimer = Common_GetIgnOnTime();
PowerOFFTimer = Common_GetIgnOffTime(); PowerOFFTimer = Common_GetIgnOffTime();
DispVSpeed = Common_Get_Disp_V_Speed();
DispESpeed = Common_Get_Act_E_Speed();
if ((PowerOnTimer <= StartAnimationEnd) && (PowerOnTimer >= StartAnimationStart)) if ((PowerOnTimer <= StartAnimationEnd) && (PowerOnTimer >= StartAnimationStart))
{ {
...@@ -96,6 +92,8 @@ void DisplayServices(void) ...@@ -96,6 +92,8 @@ void DisplayServices(void)
} }
else else
{ {
Meter_Mode_conversion();
if (K_Line_Set.K_Line_LID51 == 0x01u) if (K_Line_Set.K_Line_LID51 == 0x01u)
{ {
popupID = Popup_Get_Current_Message(); popupID = Popup_Get_Current_Message();
...@@ -137,93 +135,6 @@ void DisplayServices(void) ...@@ -137,93 +135,6 @@ void DisplayServices(void)
UE_EN[Display_Nothing] = UE_Enable; UE_EN[Display_Nothing] = UE_Enable;
} }
} }
/*通常模式*/
if (MenuFlag.Menu_Popup_Flag == 0u)
{
/*进入自检模式*/
//if ((MenuFlag.Key_MenuTest_Long == 1u) && (MenuFlag.Key_MenuTest_ShortNum >= 3u))
if (MenuFlag.Key_MenuTest_ShortNum >= 3u)
{
MenuFlag.Menu_Test = 1u;
MenuFlag.Key_MenuTest_Long = 0u;
MenuFlag.Key_MenuTest_ShortNum = 0u;
}
else if (K_Line_Set.K_Line_LID51 == 0x00u)
{
MenuFlag.Menu_Factory = 1u;
}
else if (K_Line_Set.K_Line_LID51 == 0x02u)
{
MenuFlag.Menu_Dealer = 1u;
}
else
{
if (DispVSpeed > 66u)
{
if ((bCurMenuIDX >= _MN_DSP_LEVEL2MENU_1) && (bCurMenuIDX <= _MN_DSP_MENU_MAX))
{
NextMenu(MenuFlag.Menu_Flag);
}
}
else
{
; /*Do Nothing!*/
}
}
}
/*工厂模式*/
else if (MenuFlag.Menu_Popup_Flag == 2u)
{
if (K_Line_Set.K_Line_LID51 == 0x01u)
{
MenuFlag.Menu_Popup_Flag = 1u;
}
else if (K_Line_Set.K_Line_LID51 == 0x02u)
{
MenuFlag.Menu_Dealer = 1u;
}
else
{
;/*Do Nothing!*/
}
}
/*经销商模式*/
else if (MenuFlag.Menu_Popup_Flag == 3u)
{
if (K_Line_Set.K_Line_LID51 == 0x01u)
{
MenuFlag.Menu_Popup_Flag = 1u;
}
else if (K_Line_Set.K_Line_LID51 == 0x00u)
{
MenuFlag.Menu_Factory = 1u;
}
else
{
;/*Do Nothing!*/
}
}
/*自检模式*/
else if (MenuFlag.Menu_Popup_Flag == 4u)
{
if ((DispVSpeed >= 66u) || (DispESpeed >= 330u))
{
MenuFlag.Menu_Popup_Flag = 1u;
}
else if (K_Line_Set.K_Line_LID51 == 0x02u)
{
MenuFlag.Menu_Dealer = 1u;
}
else
{
;/*Do Nothing!*/
}
}
else
{
;/*Do Nothing!*/
}
} }
DispSch_xxxMs_Logic(10u); DispSch_xxxMs_Logic(10u);
...@@ -388,27 +299,23 @@ void GUI_DisplayServices(void) ...@@ -388,27 +299,23 @@ void GUI_DisplayServices(void)
if (MenuFlag.Menu_Popup_Flag == 0u) if (MenuFlag.Menu_Popup_Flag == 0u)
{ {
MenuFlag.Menu_Popup_Flag = 1u; MenuFlag.Menu_Popup_Flag = 1u;
MenuFlag.MenuNum = bCurMenuIDX; //MenuFlag.MenuNum = bCurMenuIDX;
NextMenu(_MN_DSP_LEVEPOPUP); NextMenu(_MN_DSP_LEVEPOPUP);
bCurMenuIDX = _MN_DSP_LEVEPOPUP;
} }
} }
else if ((HMI_MENU_Sta == Display_Menu) || (HMI_MENU_Sta == Display_Nothing)) else if ((HMI_MENU_Sta == Display_Menu) || (HMI_MENU_Sta == Display_Nothing))
{ {
if (PowerStatus == COMMON_POWER_ON) if (PowerStatus == COMMON_POWER_ON)
{ {
if (MenuFlag.Menu_Popup_Flag == 1u) if (MenuFlag.Menu_Factory == 1u)
{
MenuFlag.Menu_Popup_Flag = 0u;
NextMenu( MenuFlag.MenuNum );
}
else if (MenuFlag.Menu_Factory == 1u)
{ {
MenuFlag.Menu_Factory = 0u; MenuFlag.Menu_Factory = 0u;
MenuFlag.Menu_Popup_Flag = 2u; MenuFlag.Menu_Popup_Flag = 2u;
NextMenu( _FAC_DSP_LEVEL1MENU_1 ); NextMenu( _FAC_DSP_LEVEL1MENU_1 );
bCurMenuIDX = _FAC_DSP_LEVEL1MENU_1;
} }
else if (MenuFlag.Menu_Dealer == 1u) else if (MenuFlag.Menu_Dealer == 1u)
{ {
...@@ -416,6 +323,7 @@ void GUI_DisplayServices(void) ...@@ -416,6 +323,7 @@ void GUI_DisplayServices(void)
MenuFlag.Menu_Popup_Flag = 3u; MenuFlag.Menu_Popup_Flag = 3u;
NextMenu( _DEA_DSP_LEVEL1MENU_1 ); NextMenu( _DEA_DSP_LEVEL1MENU_1 );
bCurMenuIDX = _DEA_DSP_LEVEL1MENU_1;
} }
else if (MenuFlag.Menu_Test == 1u) else if (MenuFlag.Menu_Test == 1u)
{ {
...@@ -423,6 +331,14 @@ void GUI_DisplayServices(void) ...@@ -423,6 +331,14 @@ void GUI_DisplayServices(void)
MenuFlag.Menu_Popup_Flag = 4u; MenuFlag.Menu_Popup_Flag = 4u;
NextMenu( _MN_DSP_Menu_Test ); NextMenu( _MN_DSP_Menu_Test );
bCurMenuIDX = _MN_DSP_Menu_Test;
}
else if (MenuFlag.Menu_Popup_Flag == 1u)
{
MenuFlag.Menu_Popup_Flag = 0u;
NextMenu( MenuFlag.Menu_Flag);
bCurMenuIDX = MenuFlag.Menu_Flag;
} }
if (((bCurMenuIDX > _MN_DSP_LEVEPOPUP) && (bCurMenuIDX < _MN_DSP_LEVEL3_5_MENU_1)) || if (((bCurMenuIDX > _MN_DSP_LEVEPOPUP) && (bCurMenuIDX < _MN_DSP_LEVEL3_5_MENU_1)) ||
...@@ -511,3 +427,120 @@ void HMI_Clear_KEY_ODOTRIP(void) ...@@ -511,3 +427,120 @@ void HMI_Clear_KEY_ODOTRIP(void)
{ {
UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP = 0u; UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP = 0u;
} }
void Meter_Mode_conversion(void)
{
uint16_t popupID = 0xFFFFu;
uint16_t DispVSpeed = 0u;
uint16_t DispESpeed = 0u;
DispVSpeed = Common_Get_Disp_V_Speed();
DispESpeed = Common_Get_Act_E_Speed();
/*工厂模式*/
if (MenuFlag.Menu_Popup_Flag == 2u)
{
if (K_Line_Set.K_Line_LID51 == 0x01u)
{
popupID = Popup_Get_Current_Message();
if (popupID != 0xFFFFU)
{
MenuFlag.Menu_Popup_Flag = 0u;
}
else
{
MenuFlag.Menu_Popup_Flag = 1u;
}
}
else if (K_Line_Set.K_Line_LID51 == 0x02u)
{
MenuFlag.Menu_Dealer = 1u;
}
else
{
;/*Do Nothing!*/
}
}
/*经销商模式*/
else if (MenuFlag.Menu_Popup_Flag == 3u)
{
if (K_Line_Set.K_Line_LID51 == 0x01u)
{
popupID = Popup_Get_Current_Message();
if (popupID != 0xFFFFU)
{
MenuFlag.Menu_Popup_Flag = 0u;
}
else
{
MenuFlag.Menu_Popup_Flag = 1u;
}
}
else if (K_Line_Set.K_Line_LID51 == 0x00u)
{
MenuFlag.Menu_Factory = 1u;
}
else
{
;/*Do Nothing!*/
}
}
/*自检模式*/
else if (MenuFlag.Menu_Popup_Flag == 4u)
{
if ((DispVSpeed >= 66u) || (DispESpeed >= 330u))
{
popupID = Popup_Get_Current_Message();
if (popupID != 0xFFFFU)
{
MenuFlag.Menu_Popup_Flag = 0u;
}
else
{
MenuFlag.Menu_Popup_Flag = 1u;
}
}
else if (K_Line_Set.K_Line_LID51 == 0x02u)
{
MenuFlag.Menu_Dealer = 1u;
}
else
{
;/*Do Nothing!*/
}
}
/*通常模式*/
else
{
/*进入自检模式*/
//if ((MenuFlag.Key_MenuTest_Long == 1u) && (MenuFlag.Key_MenuTest_ShortNum >= 3u))
if (MenuFlag.Key_MenuTest_ShortNum >= 3u)
{
MenuFlag.Menu_Test = 1u;
MenuFlag.Key_MenuTest_Long = 0u;
MenuFlag.Key_MenuTest_ShortNum = 0u;
}
else if (K_Line_Set.K_Line_LID51 == 0x00u)
{
MenuFlag.Menu_Factory = 1u;
}
else if (K_Line_Set.K_Line_LID51 == 0x02u)
{
MenuFlag.Menu_Dealer = 1u;
}
else
{
if (DispVSpeed > 66u)
{
if ((bCurMenuIDX >= _MN_DSP_LEVEL2MENU_1) && (bCurMenuIDX <= _MN_DSP_MENU_MAX))
{
NextMenu(MenuFlag.Menu_Flag);
}
}
else
{
; /*Do Nothing!*/
}
}
}
}
\ No newline at end of file
...@@ -86,6 +86,7 @@ void HMI_Clear_KEY_CONFIRM(void); ...@@ -86,6 +86,7 @@ void HMI_Clear_KEY_CONFIRM(void);
void HMI_Clear_KEY_CANCEL(void); void HMI_Clear_KEY_CANCEL(void);
void HMI_Clear_KEY_MENU(void); void HMI_Clear_KEY_MENU(void);
void HMI_Clear_KEY_ODOTRIP(void); void HMI_Clear_KEY_ODOTRIP(void);
void Meter_Mode_conversion(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