Commit 44180cc4 authored by hu's avatar hu

修改BUG

parent 9520d132
......@@ -16,7 +16,7 @@ static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
{1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
},
/*转速*/
{ {0u, 1000, 1500, 2000, 2500, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ {0u, 900, 1400, 1900, 2400, 2900, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0u, 1000, 1500, 2000, 2500, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1u, 6, 11, 16, 21, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
},
......
......@@ -352,7 +352,108 @@ void Key_Operation_Up(Key_Event_en_t enKeyEvent)
}
else if (enKeyEvent == KEY_EVENT_LONG_PRESS)
{
; /*D0 Nothing!*/
MenuFlag.Menu_Key_Time++;
if (MenuFlag.Menu_Key_Time > 10)
{
MenuFlag.Menu_Key_Time = 0;
/*设置日期-年*/
if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_11)
{
User_set_Num.Year++;
if (User_set_Num.Year > 99u)
{
User_set_Num.Year = 0u;
}
}
/*设置日期-月*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_12)
{
User_set_Num.Month++;
if (User_set_Num.Month > 12u)
{
User_set_Num.Month = 1u;
}
}
/*设置日期-日*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_13)
{
User_set_Num.Date++;
switch (User_set_Num.Month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
if (User_set_Num.Date > 31u)
{
User_set_Num.Date = 1u;
}
break;
case 4:
case 6:
case 9:
case 11:
if (User_set_Num.Date > 30u)
{
User_set_Num.Date = 1u;
}
break;
case 2:
if (((User_set_Num.Year % 4u == 0u) && (User_set_Num.Year % 100 != 0u)) || (User_set_Num.Year % 400u == 0u))
{
User_set_Num.LeapYear = 1u;
}
else
{
User_set_Num.LeapYear = 0u;
}
if (User_set_Num.LeapYear)
{
if (User_set_Num.Date > 29u)
{
User_set_Num.Date = 1u;
}
}
else
{
if (User_set_Num.Date > 28u)
{
User_set_Num.Date = 1u;
}
}
break;
default:
break;
}
}
/*设置时间-时*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_21)
{
User_set_Num.Hour++;
if (User_set_Num.Hour > 23u)
{
User_set_Num.Hour = 0u;
}
}
/*设置时间-分*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_22)
{
User_set_Num.Minute++;
if (User_set_Num.Minute > 59u)
{
User_set_Num.Minute = 0u;
}
}
}
}
}
/*----无车速,有报警----*/
......@@ -745,7 +846,115 @@ void Key_Operation_Down(Key_Event_en_t enKeyEvent)
}
else if (enKeyEvent == KEY_EVENT_LONG_PRESS)
{
; /*D0 Nothing!*/
MenuFlag.Menu_Key_Time++;
if (MenuFlag.Menu_Key_Time > 10)
{
MenuFlag.Menu_Key_Time = 0;
/*设置日期-年*/
if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_11)
{
if (User_set_Num.Year > 0u)
{
User_set_Num.Year--;
}
else
{
User_set_Num.Year = 99u;
}
}
/*设置日期-月*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_12)
{
if (User_set_Num.Month > 1u)
{
User_set_Num.Month--;
}
else
{
User_set_Num.Month = 12u;
}
}
/*设置日期-日*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_13)
{
User_set_Num.Date--;
switch (User_set_Num.Month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
if (User_set_Num.Date < 1u)
{
User_set_Num.Date = 31u;
}
break;
case 4:
case 6:
case 9:
case 11:
if (User_set_Num.Date < 1u)
{
User_set_Num.Date = 30u;
}
break;
case 2:
if (((User_set_Num.Year % 4u == 0u) && (User_set_Num.Year % 100u != 0u)) || (User_set_Num.Year % 400u == 0u))
{
User_set_Num.LeapYear = 1u;
}
else
{
User_set_Num.LeapYear = 0u;
}
if (User_set_Num.LeapYear)
{
if (User_set_Num.Date < 1u)
{
User_set_Num.Date = 29u;
}
}
else
{
if (User_set_Num.Date < 1u)
{
User_set_Num.Date = 28u;
}
}
break;
default:
break;
}
}
/*设置时间-时*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_21)
{
if (User_set_Num.Hour > 0u)
{
User_set_Num.Hour--;
}
else
{
User_set_Num.Hour = 23u;
}
}
/*设置时间-分*/
else if (bCurMenuIDX == _MN_DSP_LEVEL3_4_MENU_22)
{
if (User_set_Num.Minute > 0u)
{
User_set_Num.Minute--;
}
else
{
User_set_Num.Minute = 59u;
}
}
}
}
}
else
......
......@@ -10,16 +10,16 @@
typedef enum
{
m_IGN_OFF_Init,
m_IGN_OFF,
m_IGN_Sleep_Init,
m_IGN_Sleep,
m_IGN_Wakeup,
m_IGN_ON_Init,
m_IGN_ON,
m_IGN_LVP,
m_IGN_OVP,
m_IGN_LIMIT,
/*0*/m_IGN_OFF_Init,
/*1*/m_IGN_OFF,
/*2*/m_IGN_Sleep_Init,
/*3*/m_IGN_Sleep,
/*4*/m_IGN_Wakeup,
/*5*/m_IGN_ON_Init,
/*6*/m_IGN_ON,
/*7*/m_IGN_LVP,
/*8*/m_IGN_OVP,
/*9*/m_IGN_LIMIT,
} Power_Status_t;
void Power_Management_Init ( uint8_t u8InitFlag );
......
......@@ -331,8 +331,13 @@ Power_Status_t Power_Stay_OFF(void)
Power_Status_t Power_Stay_Protect(void)
{
Power_Status_t u8PowerSts;
u8PowerSts = m_IGN_OFF_Init;
Power_Status_t u8PowerSts = m_IGN_LIMIT;
if (SYS_OPR_STAT_RUN)
{
u8PowerSts = m_IGN_ON;
}
return u8PowerSts;
}
......
......@@ -22,6 +22,9 @@
#include "Popups.h"
#include "DisplaySch_user.h"
#include "DispSch.h"
uint8_t TpmsMsg18033317SendFlag = 0;
uint8_t Msg_18021733[8];
......@@ -401,6 +404,10 @@ void Can_Set_Buff_18FF2A17(uint8_t CopyData[])
uint8_t Range_Air_Cut_Warning = 0u;
uint8_t IRIS_Warning_Lamp_Status = 0u;
UElib_uint16_t HMI_MENU_Sta = 0u;
HMI_MENU_Sta = Get_Cur_HMI();
/*手刹状态*/
if (Line_In_Get_Status(LINE_IN_PARK_BRAKE) == 1u)
SW_Parking = 1 ;
......@@ -419,9 +426,16 @@ void Can_Set_Buff_18FF2A17(uint8_t CopyData[])
}
else if ((Coolant_Get_CurSeg() >= 11) && (Coolant_Get_CurSeg() <= 12))
{
if (HMI_MENU_Sta == Display_StartAnimation)
{
Water_Temp_Level = 0 ;
}
else
{
Water_Temp_Level = 1 ;
}
}
if ((Common_Get_Water_Temp_Level_Flag() == 1) && (Common_Get_Disp_V_Speed() > 20))
{
......
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