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
f035c196
Commit
f035c196
authored
Aug 01, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改时间菜单设置
parent
669c991c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
5 deletions
+60
-5
Menu_Interface.c
Firmware/Source/Component/Menu/Menu_Interface.c
+60
-5
No files found.
Firmware/Source/Component/Menu/Menu_Interface.c
View file @
f035c196
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
/*-------------------Logic_Operation Call Back---------------------*/
/*-------------------Logic_Operation Call Back---------------------*/
uint8_t
g_u8Cursor_Posittion
;
uint8_t
g_u8Cursor_Posittion
;
extern
_Menu_Data
MenuData
;
extern
_Menu_Data
MenuData
;
extern
RTC_CounterTypeDef
counter_val
;
void
Menu_Logic_Operation_MAIN_ITEM
(
Menu_Key_en_t
enKeyType
);
void
Menu_Logic_Operation_MAIN_ITEM
(
Menu_Key_en_t
enKeyType
);
void
Menu_Logic_Operation_Display_Mode
(
Menu_Key_en_t
enKeyType
);
void
Menu_Logic_Operation_Display_Mode
(
Menu_Key_en_t
enKeyType
);
...
@@ -324,21 +326,38 @@ void Menu_Logic_Operation_Bluetooth_Back(Menu_Key_en_t enKeyType)
...
@@ -324,21 +326,38 @@ void Menu_Logic_Operation_Bluetooth_Back(Menu_Key_en_t enKeyType)
void
Menu_Logic_Operation_Clock_Hour_Tenb
(
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);
// }
}
}
void
Menu_Logic_Operation_Clock_Hour_Bit
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Hour_Bit
(
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);
// }
}
}
void
Menu_Logic_Operation_Clock_Min_Tenb
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Min_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);
// }
}
}
void
Menu_Logic_Operation_Clock_Min_Bit
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Min_Bit
(
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);
}
}
...
@@ -352,6 +371,12 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
...
@@ -352,6 +371,12 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
uint8_t
updataDir
=
0u
;
uint8_t
updataDir
=
0u
;
uint8_t
datmax
=
0u
;
uint8_t
datmax
=
0u
;
uint8_t
datmin
=
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
)
if
(
enKeyType
==
MENU_KEY_DOWN_SHORT
)
{
{
updataDir
=
1
;
updataDir
=
1
;
...
@@ -359,6 +384,13 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
...
@@ -359,6 +384,13 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
datmin
=
0u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Hour_Tenb
));
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Hour_Tenb
));
}
}
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
);
}
}
}
void
Menu_Logic_Operation_Clock_Hour_Bit_Set
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Hour_Bit_Set
(
Menu_Key_en_t
enKeyType
)
{
{
...
@@ -372,6 +404,13 @@ void Menu_Logic_Operation_Clock_Hour_Bit_Set(Menu_Key_en_t enKeyType)
...
@@ -372,6 +404,13 @@ void Menu_Logic_Operation_Clock_Hour_Bit_Set(Menu_Key_en_t enKeyType)
datmin
=
0u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Hour_Bit
));
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Hour_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
);
}
}
}
void
Menu_Logic_Operation_Clock_Min_Tenb_Set
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Min_Tenb_Set
(
Menu_Key_en_t
enKeyType
)
...
@@ -386,6 +425,13 @@ void Menu_Logic_Operation_Clock_Min_Tenb_Set(Menu_Key_en_t enKeyType)
...
@@ -386,6 +425,13 @@ void Menu_Logic_Operation_Clock_Min_Tenb_Set(Menu_Key_en_t enKeyType)
datmin
=
0u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Minute_Tenb
));
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Minute_Tenb
));
}
}
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
);
}
}
}
void
Menu_Logic_Operation_Clock_Min_Bit_Set
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Min_Bit_Set
(
Menu_Key_en_t
enKeyType
)
...
@@ -400,6 +446,13 @@ void Menu_Logic_Operation_Clock_Min_Bit_Set(Menu_Key_en_t enKeyType)
...
@@ -400,6 +446,13 @@ void Menu_Logic_Operation_Clock_Min_Bit_Set(Menu_Key_en_t enKeyType)
datmin
=
0u
;
datmin
=
0u
;
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
MenuData
.
Dis_Minute_Bit
));
Menu_u8Data_Updata_Process
(
updataDir
,
datmax
,
datmin
,
1u
,
(
uint8_t
*
)
&
(
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
);
}
}
}
void
Menu_Logic_Operation_Backlight_Setting
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Backlight_Setting
(
Menu_Key_en_t
enKeyType
)
...
@@ -414,7 +467,9 @@ void Menu_Logic_Operation_Bluetooth_Connect(Menu_Key_en_t enKeyType)
...
@@ -414,7 +467,9 @@ void Menu_Logic_Operation_Bluetooth_Connect(Menu_Key_en_t enKeyType)
void
Menu_Logic_Operation_Clock_Setting
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Clock_Setting
(
Menu_Key_en_t
enKeyType
)
{
{
//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);
}
}
void
Menu_Logic_Operation_Unit_Setting
(
Menu_Key_en_t
enKeyType
)
void
Menu_Logic_Operation_Unit_Setting
(
Menu_Key_en_t
enKeyType
)
...
...
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