Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
b519e533
Commit
b519e533
authored
May 30, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:44686 【天鹰TY100】【时间设置】时间设置有问题,修改不设置秒针不归零,设置时间则秒针归零的问题
parent
f10d7cfb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+31
-6
No files found.
Firmware/Source/Component/Key/Key_user.c
View file @
b519e533
...
...
@@ -9,7 +9,8 @@ _Menu_Infor MenuInfor;
_Menu_Data
MenuData
;
uint8_t
PageType
=
0
;
uint8_t
PageMenu
=
0
;
uint8_t
Hour_Set
=
0
;
uint8_t
Minute_Set
=
0
;
RTC_TimeTypeDef
RTC_TimeStruct
;
RTC_DateTypeDef
RTC_DateStruct
;
...
...
@@ -247,6 +248,7 @@ void Key_Left_Short_Press(void)
datmax
=
23u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
counter_val
.
time
.
RTC_Hours
));
Hour_Set
=
1
;
//RTC_SetTime(&counter_val.time);
}
else
if
(
PageType
==
Page_Time_Minute
)
...
...
@@ -256,7 +258,7 @@ void Key_Left_Short_Press(void)
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
counter_val
.
time
.
RTC_Minutes
));
//RTC_SetTime(&counter_val.time);
Minute_Set
=
1
;
}
else
if
(
PageType
==
Page_Km_Unit
)
{
...
...
@@ -295,12 +297,23 @@ void Key_Auto_Save(void)
{
if
(
PageType
==
Page_Time_Hour
)
{
if
(
Hour_Set
==
1
)
{
counter_val
.
time
.
RTC_Seconds
=
0
;
RTC_SetTime
(
&
counter_val
.
time
);
Hour_Set
=
0
;
}
}
if
(
PageType
==
Page_Time_Minute
)
{
if
(
Minute_Set
==
1
)
{
counter_val
.
time
.
RTC_Seconds
=
0
;
RTC_SetTime
(
&
counter_val
.
time
);
Minute_Set
=
0
;
}
}
PageType
=
Page_Menu
;
}
...
...
@@ -315,12 +328,22 @@ void Key_Left_Long_Press(void)
}
else
if
(
PageType
==
Page_Time_Hour
)
{
if
(
Hour_Set
==
1
)
{
counter_val
.
time
.
RTC_Seconds
=
0
;
RTC_SetTime
(
&
counter_val
.
time
);
Hour_Set
=
0
;
}
PageType
=
Page_Time_Minute
;
}
else
if
(
PageType
==
Page_Time_Minute
)
{
if
(
Minute_Set
==
1
)
{
counter_val
.
time
.
RTC_Seconds
=
0
;
RTC_SetTime
(
&
counter_val
.
time
);
Minute_Set
=
0
;
}
PageType
=
Page_Km_Unit
;
}
else
if
(
PageType
==
Page_Km_Unit
)
...
...
@@ -396,6 +419,8 @@ void MenuData_TCS_Init(void)
{
MenuData
.
Tcs_Val
=
1
;
PageType
=
Page_Menu
;
Hour_Set
=
0
;
Minute_Set
=
0
;
}
uint8_t
ClearODO_Flag
=
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