DisplaySch_user.c 14.4 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6 7 8
#include "DisplaySch_user.h"
#include "Common_Interface.h"
#include "DispSch.h"
#include "Popup_Scheduler.h"
#include "Popup_List.h"
#include "Key.h"
#include "CAN_Lib.h"
#include "GUI.h"
hu's avatar
hu committed
9
#include "Services_ODO_User.h" /*清空总计里程函数*/
hu's avatar
hu committed
10
#include "Menu.h"
hu's avatar
hu committed
11
#include "jcua.h"
hu's avatar
hu committed
12
#include "kwp2000_service.h"
hu's avatar
hu committed
13

hu's avatar
hu committed
14 15
uint32_t EnterTimer[10];
uint8_t UE_EN[Display_MAX];
hu's avatar
hu committed
16 17
#pragma alignvar(8)
#pragma ghs section bss = default
hu's avatar
hu committed
18
uint8_t Mem[32];
hu's avatar
hu committed
19 20
#pragma ghs section bss = default

hu's avatar
hu committed
21
#pragma ghs section bss = ".myNonInitArea"
hu's avatar
hu committed
22
UE_CtrlInfo_Struct_t UE_CtrlInfo;
hu's avatar
hu committed
23
uint8_t BG_display_flag;
hu's avatar
hu committed
24
#pragma ghs section bss = default
hu's avatar
hu committed
25

hu's avatar
hu committed
26
uint16_t HMI_StartAnimationFrameCnt;
27
uint8_t backgroundOFFFlag;
hu's avatar
hu committed
28 29 30 31 32

static void switch_branch(void);

uint8_t Get_Pwr(void)
{
hu's avatar
hu committed
33
    return Common_Get_IG_Sts();
hu's avatar
hu committed
34 35 36
}
uint32_t Get_IG_ON(void)
{
hu's avatar
hu committed
37
    return Common_GetIgnOnTime();
hu's avatar
hu committed
38 39 40
}
uint32_t Get_IG_Off(void)
{
hu's avatar
hu committed
41
    return Common_GetIgnOffTime();
hu's avatar
hu committed
42 43
}

hu's avatar
hu committed
44
static const DispSch_Attr_st loc[] =
45
{
46 47 48 49
    {&UE_EN[Display_StartAnimation], UE_IGN_ON , Display_StartAnimation, ((void *)0), Display_StartAnimationEnter, Display_StartAnimationService, Display_StartAnimationExit},
    {&UE_EN[Display_Menu]          , UE_IGN_ON , Display_Menu          , ((void *)0), Display_MenuEnter          , Display_MenuService          , ((void *)0)},
    {&UE_EN[Display_Alarm]         , UE_IGN_ON , Display_Alarm         , ((void *)0), Display_AlarmEnter         , Display_AlarmService         , ((void *)0)},
    {&UE_EN[Display_Nothing]       , UE_IGN_OFF, Display_Nothing       , ((void *)0), Display_NothingEnter       , Display_NothingService       , ((void *)0)},
hu's avatar
hu committed
50 51 52 53
};

void DispSch_TotalInit(void)
{
hu's avatar
hu committed
54
    uint8_t i;
hu's avatar
hu committed
55
    DispSch_Ext_st m_st;
hu's avatar
hu committed
56 57
    m_st.Get_Power = Get_Pwr;
    m_st.Get_IG_ON_Timer = Get_IG_ON;
hu's avatar
hu committed
58 59
    m_st.Get_IG_OFF_Timer = Get_IG_Off;
    m_st.Get_IG_OFF_Timer = Get_IG_Off;
hu's avatar
hu committed
60
    m_st.TotalSize = Display_MAX;
hu's avatar
hu committed
61
    DispSch_Init(Mem, loc, &m_st, 0u);
hu's avatar
hu committed
62

hu's avatar
hu committed
63
    for (i = 0u; i < Display_MAX; i++)
hu's avatar
hu committed
64
    {
hu's avatar
hu committed
65
        UE_EN[i] = UE_Disable;
hu's avatar
hu committed
66
    }
hu's avatar
hu committed
67 68 69 70 71 72 73 74

    if (BG_display_flag == 0u)
    {
        BG_display_flag = 1u;
        MenuFlag.Menu_Popup_Flag = 0u ;

        MenuInit();
    }
hu's avatar
hu committed
75 76 77 78 79 80
}

void DisplayServices(void)
{
    uint32_t PowerOnTimer;
    uint32_t PowerOFFTimer;
hu's avatar
hu committed
81
    uint8_t PowerStatus;
82
    uint32_t Get_Menu_Off_Time = 0u;
hu's avatar
hu committed
83 84
    uint16_t popupID = 0xFFFFu;

hu's avatar
hu committed
85 86 87
    PowerStatus = Common_Get_IG_Sts();
    PowerOnTimer = Common_GetIgnOnTime();
    PowerOFFTimer = Common_GetIgnOffTime();
88
    Get_Menu_Off_Time = Coom_Get_Menu_Off_Time();
hu's avatar
hu committed
89

hu's avatar
hu committed
90
    if ((PowerOnTimer <= StartAnimationEnd) && (PowerOnTimer >= StartAnimationStart))
hu's avatar
hu committed
91
    {
hu's avatar
hu committed
92 93 94
        UE_EN[Display_StartAnimation] = UE_Enable;
        UE_EN[Display_Menu] = UE_Disable;
        UE_EN[Display_Alarm] = UE_Disable;
hu's avatar
hu committed
95
        UE_EN[Display_Nothing] = UE_Disable;
hu's avatar
hu committed
96 97 98
    }
    else
    {
hu's avatar
hu committed
99
        /*获取四种模式*/
hu's avatar
hu committed
100 101
        Meter_Mode_conversion();

hu's avatar
hu committed
102
        if ((K_Line_Set.K_Line_LID51 == 0x01u) && (MenuFlag.Menu_Test != 1u))
hu's avatar
hu committed
103 104 105
        {
            popupID = Popup_Get_Current_Message();
        }
106

hu's avatar
hu committed
107
        if ((popupID != 0xffffu) && (MenuFlag.Key_Menu_Popup_time == 0x00u))
hu's avatar
hu committed
108
        {
hu's avatar
hu committed
109
            UE_EN[Display_Alarm] = UE_Enable;
110 111 112 113 114 115 116 117 118

            if (PowerStatus == COMMON_POWER_ON)
            {
                ; /*不处理*/
            }
            else
            {
                UE_EN[Display_Nothing] = UE_Disable;
            }
hu's avatar
hu committed
119 120 121
        }
        else
        {
122 123
            if (MenuFlag.Key_Menu_Popup_time != 0x00u)
            {
hu's avatar
hu committed
124
                MenuFlag.Key_Menu_Popup_time--;
125 126 127
            }
            else
            {
hu's avatar
hu committed
128
                ; /*Do Nothing!*/
129 130
            }

hu's avatar
hu committed
131
            UE_EN[Display_Alarm] = UE_Disable;
hu's avatar
hu committed
132

hu's avatar
hu committed
133
            if (PowerStatus == COMMON_POWER_ON)
hu's avatar
hu committed
134
            {
hu's avatar
hu committed
135
                UE_EN[Display_Menu] = UE_Enable;
hu's avatar
hu committed
136 137 138
            }
            else
            {
139 140 141 142 143 144 145 146 147 148
                if ((State_Flag.Menu_Key_Static == 1u) && (Get_Menu_Off_Time < 150000))
                {
                    UE_EN[Display_Menu] = UE_Enable;
                    UE_EN[Display_Nothing] = UE_Disable;
                }
                else
                {
                    UE_EN[Display_Menu] = UE_Disable;
                    UE_EN[Display_Nothing] = UE_Enable;
                }
hu's avatar
hu committed
149 150
            }
        }
hu's avatar
hu committed
151 152
    }

153
    DispSch_xxxMs_Logic(10u);
hu's avatar
hu committed
154

155
    /*上短*/
hu's avatar
hu committed
156
    if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP == KEY_EVENT_SHORT_PRESS)
157 158 159 160
    {
        HMI_Clear_KEY_UP();
    }
    /*上长*/
hu's avatar
hu committed
161
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP == KEY_EVENT_LONG_PRESS)
162 163 164 165
    {
        HMI_Clear_KEY_UP();
    }
    /*下短*/
hu's avatar
hu committed
166
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN == KEY_EVENT_SHORT_PRESS)
167 168 169 170
    {
        HMI_Clear_KEY_DOWN();
    }
    /*下长*/
hu's avatar
hu committed
171
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN == KEY_EVENT_LONG_PRESS)
172 173 174 175
    {
        HMI_Clear_KEY_DOWN();
    }
    /*确认短*/
hu's avatar
hu committed
176
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SHORT_PRESS)
177 178 179 180
    {
        HMI_Clear_KEY_CONFIRM();
    }
    /*确认长*/
hu's avatar
hu committed
181
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_LONG_PRESS)
182 183 184
    {
        HMI_Clear_KEY_CONFIRM();
    }
185
    /*确认超长 15 S*/
hu's avatar
hu committed
186
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SUPER_LONG_PRESS)
187 188
    {
        HMI_Clear_KEY_CONFIRM();
hu's avatar
hu committed
189

190 191 192 193
        /*TYW总计清零*/
        TYW_Data_ODO_Clear();
    }
    /*返回短*/
hu's avatar
hu committed
194
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_SHORT_PRESS)
195 196 197 198
    {
        HMI_Clear_KEY_CANCEL();
    }
    /*返回长*/
hu's avatar
hu committed
199
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_LONG_PRESS)
200 201 202 203
    {
        HMI_Clear_KEY_CANCEL();
    }
    /*MENU短*/
hu's avatar
hu committed
204
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_SHORT_PRESS)
205 206 207 208
    {
        HMI_Clear_KEY_MENU();
    }
    /*MENU长*/
hu's avatar
hu committed
209
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_LONG_PRESS)
210 211 212 213 214
    {
        HMI_Clear_KEY_MENU();
    }
    else
    {
hu's avatar
hu committed
215
        ; /*do nothing*/
216
    }
217

218 219 220 221 222 223 224 225 226 227
    /*ODOTrip短*/
    if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP == KEY_EVENT_SHORT_PRESS)
    {
        HMI_Clear_KEY_ODOTRIP();
    }
    /*ODOTrip长*/
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP == KEY_EVENT_LONG_PRESS)
    {
        HMI_Clear_KEY_ODOTRIP();
    }
228 229 230 231 232
    /*ODO off-to-on*/
    else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP == KEY_EVENT_OFF_TO_ON)
    {
        HMI_Clear_KEY_ODOTRIP();
    }
233 234 235 236
    else
    {
        ; /*do nothing*/
    }
hu's avatar
hu committed
237
}
238

239
/*----开机动画----*/
240 241
void Display_StartAnimationEnter(void)
{
hu's avatar
hu committed
242
    HMI_StartAnimationFrameCnt = 0u;
243
    backgroundOFFFlag = 0;
244
    /*硬清空所有缓存数据*/
hu's avatar
hu committed
245
    loc_free_mem(MENU_Sprite, MENU_Sprite);
246

247 248 249
    /*使能底图窗口*/
    JCUA_Enable_window();
}
250 251 252 253 254 255
void Display_StartAnimationService(void)
{
    uint16_t m16_FrameCnt;

    HMI_StartAnimationFrameCnt++;
    m16_FrameCnt = HMI_StartAnimationFrameCnt;
hu's avatar
hu committed
256 257

    if ((m16_FrameCnt % 4) == 0u)
258
    {
hu's avatar
hu committed
259
        GUI_Display_Animation_Frame(m16_FrameCnt / 4u);
260 261 262 263 264 265
    }
}
void Display_StartAnimationExit(void)
{
}

hu's avatar
hu committed
266 267 268 269 270
uint16_t Common_GetHMI_StartAnimationFrameCnt(void)
{
    return HMI_StartAnimationFrameCnt;
}

271 272 273
/*----菜单----*/
void Display_MenuEnter (void)
{
274 275 276 277 278 279 280 281
    /*开机动画播放完毕使能底图窗口 二次使能窗口*/
    JCUA_Enable_window();

    /*使能PNG窗口*/
    loc_Enable_Window_App();

    /*刷底图*/
    GUI_Display_background();
282
}
283 284 285
void Display_MenuService(void)
{
}
286 287 288 289
/*----报警----*/
void Display_AlarmEnter (void)
{
}
hu's avatar
hu committed
290 291 292 293
void Display_AlarmService(void)
{
}

294
/*----Nothing----*/
295 296 297
void Display_NothingEnter(void)
{
    JCUA_Disable_window();
298 299
    loc_Disable_Window_App( );
    loc_free_mem(WET_Sprite, MENU_Sprite);
300 301 302 303 304 305
}
void Display_NothingService(void)
{

}

hu's avatar
hu committed
306 307
void GUI_DisplayServices(void)
{
308
    uint32_t PowerStatus = 0u;
hu's avatar
hu committed
309
    UElib_uint16_t HMI_MENU_Sta = 0u;
hu's avatar
hu committed
310 311

    HMI_MENU_Sta = Get_Cur_HMI();
312
    PowerStatus = Common_Get_IG_Sts();
hu's avatar
hu committed
313

hu's avatar
hu committed
314
    if (HMI_MENU_Sta == Display_Alarm)
hu's avatar
hu committed
315
    {
hu's avatar
hu committed
316
        loc_Del_Sprite(MENU_Sprite, MENU_Sprite);
hu's avatar
hu committed
317

hu's avatar
hu committed
318 319 320 321 322 323 324 325 326 327
        if (Common_Get_window_Sta() != 1u)
        {
            JCUA_Enable_window();
        }

        if (MenuFlag.Menu_Popup_Flag == 0u)
        {
            MenuFlag.Menu_Popup_Flag = 1u;

            NextMenu(_MN_DSP_LEVEPOPUP);
hu's avatar
hu committed
328
            bCurMenuIDX = _MN_DSP_LEVEPOPUP;
hu's avatar
hu committed
329
        }
hu's avatar
hu committed
330
    }
hu's avatar
hu committed
331
    else if ((HMI_MENU_Sta == Display_Menu) || (HMI_MENU_Sta == Display_Nothing))
hu's avatar
hu committed
332
    {
hu's avatar
hu committed
333
        if (PowerStatus == COMMON_POWER_ON)
hu's avatar
hu committed
334
        {
hu's avatar
hu committed
335
            if (MenuFlag.Menu_Factory == 1u)
hu's avatar
hu committed
336 337 338 339
            {
                MenuFlag.Menu_Factory = 0u;
                MenuFlag.Menu_Popup_Flag = 2u;

hu's avatar
hu committed
340 341
                NextMenu( _FAC_DSP_LEVEL0MENU_1 );
                bCurMenuIDX = _FAC_DSP_LEVEL0MENU_1;
hu's avatar
hu committed
342 343 344 345 346 347
            }
            else if (MenuFlag.Menu_Dealer == 1u)
            {
                MenuFlag.Menu_Dealer = 0u;
                MenuFlag.Menu_Popup_Flag = 3u;

hu's avatar
hu committed
348 349
                NextMenu( _DEA_DSP_LEVEL0MENU_1 );
                bCurMenuIDX = _DEA_DSP_LEVEL0MENU_1;
hu's avatar
hu committed
350 351 352 353 354 355 356
            }
            else if (MenuFlag.Menu_Test == 1u)
            {
                MenuFlag.Menu_Test = 0;
                MenuFlag.Menu_Popup_Flag = 4u;

                NextMenu( _MN_DSP_Menu_Test );
hu's avatar
hu committed
357 358 359 360 361 362 363 364
                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;
hu's avatar
hu committed
365
            }
hu's avatar
hu committed
366

hu's avatar
hu committed
367
            if (((bCurMenuIDX > _MN_DSP_LEVEPOPUP) && (bCurMenuIDX < _MN_DSP_LEVEL3_5_MENU_1)) ||
hu's avatar
hu committed
368
                    (bCurMenuIDX >= _FAC_DSP_LEVEL0MENU_1))
hu's avatar
hu committed
369
            {
hu's avatar
hu committed
370
                loc_Del_Sprite(ADAS_Sprite, Gear_Sprite);
371
                loc_Del_Sprite(MENU_Sprite, MENU_Sprite);
hu's avatar
hu committed
372
                if (Common_Get_window_Sta() != 0u)
373
                {
hu's avatar
hu committed
374
                    JCUA_Disable_window();
375
                }
hu's avatar
hu committed
376 377 378
            }
            else
            {
hu's avatar
hu committed
379 380 381 382 383
                loc_Del_Sprite(MENU_Sprite, MENU_Sprite);
                if (Common_Get_window_Sta() != 1u)
                {
                    JCUA_Enable_window();
                }
hu's avatar
hu committed
384
            }
hu's avatar
hu committed
385
        }
hu's avatar
hu committed
386 387 388 389 390 391 392
        else
        {
            ;/*Do Nothing!*/
            //BG_display_flag = 0u;
            //NextMenu(_MN_DSP_Menu_OFF);
        }
    }
hu's avatar
hu committed
393
    if (HMI_MENU_Sta != Display_StartAnimation)
hu's avatar
hu committed
394
    {
hu's avatar
hu committed
395 396 397 398 399 400
        if (PowerStatus == COMMON_POWER_ON)
        {
            MenuManage();
        }
        else
        {
401 402 403
            if (backgroundOFFFlag == 0u)
            {
                loc_Enable_Window_App();
hu's avatar
hu committed
404 405
                GUI_Display_backgroundOFF();

406 407 408
                loc_Del_Sprite(MENU_Sprite, MENU_Sprite);
                backgroundOFFFlag = 1u;
            }
hu's avatar
hu committed
409

hu's avatar
hu committed
410 411 412
            GUI_Time_OilTemp_OFF_Display(GUI_DISP_MODE_NORMAL);
            BG_display_flag = 0u;
        }
hu's avatar
hu committed
413 414 415
    }
    else
    {
hu's avatar
hu committed
416
        ; /*Do  Nothing!*/
hu's avatar
hu committed
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
    }
}

void HMI_Set_KEY_UP(uint8_t u8KeyVal)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP = u8KeyVal;
}
void HMI_Set_KEY_DOWN(uint8_t u8KeyVal)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN = u8KeyVal;
}
void HMI_Set_KEY_CONFIRM(uint8_t u8KeyVal)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM = u8KeyVal;
}
void HMI_Set_KEY_CANCEL(uint8_t u8KeyVal)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL = u8KeyVal;
}
void HMI_Set_KEY_MENU(uint8_t u8KeyVal)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU = u8KeyVal;
}
440 441 442 443
void HMI_Set_KEY_ODOTRIP(uint8_t u8KeyVal)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP = u8KeyVal;
}
hu's avatar
hu committed
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464

void HMI_Clear_KEY_UP(void)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP = 0u;
}
void HMI_Clear_KEY_DOWN(void)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN = 0u;
}
void HMI_Clear_KEY_CONFIRM(void)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM = 0u;
}
void HMI_Clear_KEY_CANCEL(void)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL = 0u;
}
void HMI_Clear_KEY_MENU(void)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU = 0u;
}
465 466 467 468
void HMI_Clear_KEY_ODOTRIP(void)
{
    UE_CtrlInfo.HMI_KEYInfo.u8KEY_ODOTRIP = 0u;
}
hu's avatar
hu committed
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484

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();
hu's avatar
hu committed
485
            if ((popupID != 0xffffu) && (MenuFlag.Key_Menu_Popup_time == 0x00u))
hu's avatar
hu committed
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
            {
                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();
hu's avatar
hu committed
509
            if ((popupID != 0xffffu) && (MenuFlag.Key_Menu_Popup_time == 0x00u))
hu's avatar
hu committed
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
            {
                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();
hu's avatar
hu committed
533
            if ((popupID != 0xffffu) && (MenuFlag.Key_Menu_Popup_time == 0x00u))
hu's avatar
hu committed
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554
            {
                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
    {
        /*进入自检模式*/
555 556
        if ((MenuFlag.Key_MenuTest_Long == 1u) && (MenuFlag.Key_MenuTest_ShortNum >= 3u))
            //if (MenuFlag.Key_MenuTest_ShortNum >= 3u)
hu's avatar
hu committed
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585
        {
            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!*/
            }
        }
    }
}