Commit 14150bb6 authored by hu's avatar hu

Merge branch 'menutest' into withBoot_ENCN

parents 435ca6de 8ae325eb
......@@ -603,8 +603,15 @@ void GUI_Time_Dispaly(uint8_t Mode)
if (CanStatus == CAN_SIG_NORMAL)
{
Time_Minutes = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Minutes();
if (Time_Minutes > 59)
{
Time_Minutes = 0;
}
Time_Hours = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Hours();
if (Time_Hours > 23)
{
Time_Hours = 0;
}
GUI_Translate_Display(Time_Sprite, Nb_21_maohao, 396u, 45u, GUI_BLENDMODE_SRC_OVER); /*显示冒号*/
GUI_General_Digit_Display(Time_Sprite, Time_Minutes, CN_RC_Nb_21_0, 2u, 0u, GUI_DISP_Minutes, 37, GUI_BLENDMODE_SRC_OVER); /*显示分钟*/
......@@ -658,8 +665,58 @@ void GUI_Data_Dispaly(uint8_t Mode)
Year = (uint16_t)Get_ID_18FEE64A_Sig_TBOX_Year();
Year = (Year & 0xFF) + 1985u;
Month = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Month();
if (Month > 12)
{
Month = 12;
}
Date = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Day();
Date = Date / 4u;
switch (Month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
if (Date > 31)
{
Date = 31;
}
break;
case 4:
case 6:
case 9:
case 11:
if (Date > 30)
{
Date = 30;
}
break;
case 2:
if (((Year % 4 == 0) && (Year % 100 != 0)) || (Year % 400 == 0))
{
if (Date > 29)
{
Date = 29;
}
}
else
{
if (Date > 28)
{
Date = 28;
}
}
break;
default:
break;
}
Week = Cal_RTC_Week(Year, Month, Date);
if (CanStatus == CAN_SIG_NORMAL)
......@@ -2281,12 +2338,71 @@ void GUI_Year_Month_Data_Display(uint8_t Mode)
Year = (uint16_t)Get_ID_18FEE64A_Sig_TBOX_Year();
Year = (Year & 0xFF) + 1985u;
Month = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Month();
if (Month > 12)
{
Month = 12;
}
Date = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Day();
Date = Date / 4u;
switch (Month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
if (Date > 31)
{
Date = 31;
}
break;
case 4:
case 6:
case 9:
case 11:
if (Date > 30)
{
Date = 30;
}
break;
case 2:
if (((Year % 4 == 0) && (Year % 100 != 0)) || (Year % 400 == 0))
{
if (Date > 29)
{
Date = 29;
}
}
else
{
if (Date > 28)
{
Date = 28;
}
}
break;
default:
break;
}
Week = Cal_RTC_Week(Year, Month, Date);
Time_Hours = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Hours();
if (Time_Hours > 23)
{
Time_Hours = 0;
}
Time_Minutes = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Minutes();
if (Time_Minutes > 59)
{
Time_Minutes = 0;
}
CanStatus = CAN_MSG_Status(ID_CanMsg18FEE64A_Msg_Count);
......
......@@ -108,8 +108,8 @@ _RESET:
mov r0, r1
1:
st.dw r0, 0[r6]
addi 8, r6, r6
st.w r0, 0[r6]
addi 4, r6, r6
cmp r7, r6
bl 1b
......
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