Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISUZU
VC66_7C
Commits
bb6a922c
Commit
bb6a922c
authored
Oct 31, 2023
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整时间显示溢出问题。
parent
fa5f01c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
117 additions
and
1 deletion
+117
-1
GUI.c
source/Application/Graphic/GUI/GUI.c
+117
-1
No files found.
source/Application/Graphic/GUI/GUI.c
View file @
bb6a922c
...
@@ -603,8 +603,15 @@ void GUI_Time_Dispaly(uint8_t Mode)
...
@@ -603,8 +603,15 @@ void GUI_Time_Dispaly(uint8_t Mode)
if (CanStatus == CAN_SIG_NORMAL)
if (CanStatus == CAN_SIG_NORMAL)
{
{
Time_Minutes = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Minutes();
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();
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_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); /*显示分钟*/
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)
...
@@ -658,8 +665,58 @@ void GUI_Data_Dispaly(uint8_t Mode)
Year = (uint16_t)Get_ID_18FEE64A_Sig_TBOX_Year();
Year = (uint16_t)Get_ID_18FEE64A_Sig_TBOX_Year();
Year = (Year & 0xFF) + 1985u;
Year = (Year & 0xFF) + 1985u;
Month = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Month();
Month = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Month();
if (Month > 12)
{
Month = 12;
}
Date = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Day();
Date = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Day();
Date = Date / 4u;
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);
Week = Cal_RTC_Week(Year, Month, Date);
if (CanStatus == CAN_SIG_NORMAL)
if (CanStatus == CAN_SIG_NORMAL)
...
@@ -2281,12 +2338,71 @@ void GUI_Year_Month_Data_Display(uint8_t Mode)
...
@@ -2281,12 +2338,71 @@ void GUI_Year_Month_Data_Display(uint8_t Mode)
Year = (uint16_t)Get_ID_18FEE64A_Sig_TBOX_Year();
Year = (uint16_t)Get_ID_18FEE64A_Sig_TBOX_Year();
Year = (Year & 0xFF) + 1985u;
Year = (Year & 0xFF) + 1985u;
Month = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Month();
Month = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Month();
if (Month > 12)
{
Month = 12;
}
Date = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Day();
Date = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Day();
Date = Date / 4u;
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);
Week = Cal_RTC_Week(Year, Month, Date);
Time_Hours = (uint8_t)Get_ID_18FEE64A_Sig_TBOX_Hours();
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();
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);
CanStatus = CAN_MSG_Status(ID_CanMsg18FEE64A_Msg_Count);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment