Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
135bbb3b
Commit
135bbb3b
authored
Aug 13, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改按键时钟设置
parent
ad7950f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
Menu_Interface.c
Firmware/Source/Component/Menu/Menu_Interface.c
+10
-11
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+11
-10
No files found.
Firmware/Source/Component/Menu/Menu_Interface.c
View file @
135bbb3b
...
...
@@ -334,12 +334,15 @@ void Menu_Logic_Operation_Bluetooth_Back(Menu_Key_en_t enKeyType)
void
Menu_Logic_Operation_Clock_Hour_Tenb
(
Menu_Key_en_t
enKeyType
)
{
// counter_val.time.RTC_Hours = (MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit);
// counter_val.time.RTC_Minutes = (MenuData.Dis_Minute_Tenb*10 + MenuData.Dis_Minute_Bit);
// if(MENU_KEY_CONFIRM_SHORT == enKeyType)
// {
// RTC_SetTime(&counter_val.time);
// }
RTE_RTC_Get_CounterValue
(
&
counter_val
);
counter_val
.
time
.
RTC_Hours
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Hours
);
counter_val
.
time
.
RTC_Minutes
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Minutes
);
MenuData
.
Dis_Hour_Tenb
=
counter_val
.
time
.
RTC_Hours
/
10
;
MenuData
.
Dis_Hour_Bit
=
counter_val
.
time
.
RTC_Hours
%
10
;
MenuData
.
Dis_Minute_Tenb
=
counter_val
.
time
.
RTC_Minutes
/
10
;
MenuData
.
Dis_Minute_Bit
=
counter_val
.
time
.
RTC_Minutes
%
10
;
}
void
Menu_Logic_Operation_Clock_Hour_Bit
(
Menu_Key_en_t
enKeyType
)
...
...
@@ -379,11 +382,7 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
uint8_t
updataDir
=
0u
;
uint8_t
datmax
=
0u
;
uint8_t
datmin
=
0u
;
// RTE_RTC_Get_CounterValue(&counter_val);
// counter_val.time.RTC_Hours = RTC_Bcd2ToByte(counter_val.time.RTC_Hours);
// counter_val.time.RTC_Minutes = RTC_Bcd2ToByte(counter_val.time.RTC_Minutes);
// MenuData.Dis_Hour_Tenb = counter_val.time.RTC_Hours / 10;
if
(
enKeyType
==
MENU_KEY_DOWN_SHORT
)
{
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
135bbb3b
...
...
@@ -5,6 +5,7 @@
#include "RTE.h"
#include "UDS_ISO14229_Server.h"
#include "FaultCode.h"
extern
_Menu_Data
MenuData
;
void
Sys_Pseudo_Real_Time_Tasks
(
void
)
{
...
...
@@ -53,17 +54,17 @@ void Sys_50ms_Tasks(void)
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
//
if((MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit) > 23)
//
{
//
MenuData.Dis_Hour_Tenb = 2;
//
MenuData.Dis_Hour_Bit = 3;
//
}
if
((
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
)
>
23
)
{
MenuData
.
Dis_Hour_Tenb
=
2
;
MenuData
.
Dis_Hour_Bit
=
3
;
}
//
if((MenuData.Dis_Minute_Tenb*10 + MenuData.Dis_Minute_Bit) > 59)
//
{
//
MenuData.Dis_Minute_Tenb = 5;
//
MenuData.Dis_Minute_Bit = 9;
//
}
if
((
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
)
>
59
)
{
MenuData
.
Dis_Minute_Tenb
=
5
;
MenuData
.
Dis_Minute_Bit
=
9
;
}
}
uint32_t
ODOtest
=
0
;
...
...
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