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
72efb25c
Commit
72efb25c
authored
Aug 23, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wjl_devlop' into 'dev'
合并请求-修改禅道bug-240823 See merge request
!59
parents
daf8ac08
f5222f90
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
63 deletions
+108
-63
BackLight.c
Firmware/Source/Application/BackLight.c
+48
-41
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+29
-8
Key_user.h
Firmware/Source/Component/Key/Key_user.h
+2
-0
Menu_Interface.c
Firmware/Source/Component/Menu/Menu_Interface.c
+28
-13
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-1
No files found.
Firmware/Source/Application/BackLight.c
View file @
72efb25c
...
...
@@ -138,6 +138,8 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
}
}
timeCount
+=
deltaTime
;
if
(
SYS_OPR_STAT_IGN_ON
)
{
if
(
Menu_Item_Select_Get
(
MENU_ITEM_SELECT_AUTO
))
{
if
(
LightADCompleteFlg
)
...
...
@@ -197,6 +199,11 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
{
BackLight_Process
();
}
}
else
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
}
}
...
...
Firmware/Source/Component/Key/Key_user.c
View file @
72efb25c
...
...
@@ -50,6 +50,18 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
switch
(
enKeyEvent
)
{
case
KEY_EVENT_SHORT_PRESS_1
:
/* 在数字闪烁界面的时候,按确认键保存时间 */
if
((
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_HOUR_TENB_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_HOUR_BIT_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_TENB_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_BIT_SET
)
)
{
// Menu_Logic_Operation_Clock_Hour_Tenb_Set(MENU_KEY_CONFIRM_SHORT);
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
);
counter_val
.
time
.
RTC_Seconds
=
0U
;
RTC_SetTime
(
&
counter_val
.
time
);
}
Key_Event_Short_Press_Right
();
break
;
case
KEY_EVENT_SHORT_PRESS_2
:
...
...
@@ -347,23 +359,32 @@ void TYW_RESET_ODO(void)
void
Get_DisTime_Service
(
void
)
{
if
(
1
)
if
((
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_HOUR_TENB_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_HOUR_BIT_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_TENB_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_BIT_SET
)
)
{
}
else
{
/* 由于需要不保存时间,需要另外一套计时的方式 */
RTE_RTC_Get_CounterValue
(
&
counter_val
);
counter_val
.
time
.
RTC_Hours
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Hours
);
MenuData
.
u8Dis_Hour
=
counter_val
.
time
.
RTC_Hours
;
counter_val
.
time
.
RTC_Minutes
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Minutes
);
MenuData
.
u8Dis_Minute
=
counter_val
.
time
.
RTC_Minutes
;
}
}
uint8_t
Get_Dis_Hour_Time
(
void
)
{
return
counter_val
.
time
.
RTC_Hours
;
return
MenuData
.
u8Dis_Hour
;
}
uint8_t
Get_Dis_Minute_Time
(
void
)
{
return
counter_val
.
time
.
RTC_Minutes
;
return
MenuData
.
u8Dis_Minute
;
}
uint8_t
Get_Dis_Unit
(
void
)
...
...
Firmware/Source/Component/Key/Key_user.h
View file @
72efb25c
...
...
@@ -45,6 +45,8 @@ typedef struct
uint8_t
OdoAndTrip
;
uint8_t
Bluetooth_Open_Close
;
uint8_t
Clock_Flash
;
uint8_t
u8Dis_Hour
;
uint8_t
u8Dis_Minute
;
}
_Menu_Data
;
extern
uint8_t
OTA_Update_Flag
;
...
...
Firmware/Source/Component/Menu/Menu_Interface.c
View file @
72efb25c
...
...
@@ -395,13 +395,15 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
datmax
=
2u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Hour_Tenb
));
MenuData
.
u8Dis_Hour
=
(
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
);
MenuData
.
u8Dis_Minute
=
(
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
);
}
if
(
MENU_KEY_CONFIRM_SHORT
==
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
);
RTC_SetTime
(
&
counter_val
.
time
);
//
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);
//
RTC_SetTime(&counter_val.time);
}
}
void
Menu_Logic_Operation_Clock_Hour_Bit_Set
(
Menu_Key_en_t
enKeyType
)
...
...
@@ -412,16 +414,25 @@ void Menu_Logic_Operation_Clock_Hour_Bit_Set(Menu_Key_en_t enKeyType)
if
(
enKeyType
==
MENU_KEY_DOWN_SHORT
)
{
updataDir
=
1
;
if
(
MenuData
.
Dis_Hour_Tenb
==
2
)
{
datmax
=
3u
;
}
else
{
datmax
=
9u
;
}
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Hour_Bit
));
MenuData
.
u8Dis_Hour
=
(
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
);
MenuData
.
u8Dis_Minute
=
(
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
);
}
if
(
MENU_KEY_CONFIRM_SHORT
==
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
);
RTC_SetTime
(
&
counter_val
.
time
);
// MenuData.Dis_Hour
= (MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit);
// MenuData.Dis_Minute
= (MenuData.Dis_Minute_Tenb*10 + MenuData.Dis_Minute_Bit);
//
RTC_SetTime(&counter_val.time);
}
}
...
...
@@ -436,13 +447,15 @@ void Menu_Logic_Operation_Clock_Min_Tenb_Set(Menu_Key_en_t enKeyType)
datmax
=
5u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Minute_Tenb
));
MenuData
.
u8Dis_Hour
=
(
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
);
MenuData
.
u8Dis_Minute
=
(
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
);
}
if
(
MENU_KEY_CONFIRM_SHORT
==
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
);
RTC_SetTime
(
&
counter_val
.
time
);
//
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);
//
RTC_SetTime(&counter_val.time);
}
}
...
...
@@ -457,13 +470,15 @@ void Menu_Logic_Operation_Clock_Min_Bit_Set(Menu_Key_en_t enKeyType)
datmax
=
9u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Minute_Bit
));
MenuData
.
u8Dis_Hour
=
(
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
);
MenuData
.
u8Dis_Minute
=
(
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
);
}
if
(
MENU_KEY_CONFIRM_SHORT
==
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
);
RTC_SetTime
(
&
counter_val
.
time
);
//
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);
//
RTC_SetTime(&counter_val.time);
}
}
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
72efb25c
...
...
@@ -62,7 +62,7 @@ void Sys_50ms_Tasks(void)
if
((
MenuData
.
Dis_Hour_Tenb
*
10
+
MenuData
.
Dis_Hour_Bit
)
>
23
)
{
MenuData
.
Dis_Hour_Tenb
=
2
;
MenuData
.
Dis_Hour_Bit
=
3
;
MenuData
.
Dis_Hour_Bit
=
0
;
}
if
((
MenuData
.
Dis_Minute_Tenb
*
10
+
MenuData
.
Dis_Minute_Bit
)
>
59
)
...
...
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