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
e34f3caf
Commit
e34f3caf
authored
Jul 09, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加按键大小计,语言切换,蓝牙开关功能和接口函数
parent
4a8123c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
16 deletions
+46
-16
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+32
-12
Key_user.h
Firmware/Source/Component/Key/Key_user.h
+14
-4
No files found.
Firmware/Source/Component/Key/Key_user.c
View file @
e34f3caf
...
...
@@ -173,6 +173,11 @@ void Key_Auto_Save(void)
void
Key_Event_Short_Press_Left
(
void
)
//选择
{
if
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_MAIN_ITEM
)
//切换大小计
{
Menu_Service
(
MENU_KEY_FUNCTION_1_SHORT
);
}
if
((
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_DISPLAY_MODE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_SETTING
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_CONNECT
)
||
...
...
@@ -196,8 +201,7 @@ void Key_Event_Short_Press_Left(void)//选择
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_2
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_1
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_AUTO
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_OPEN
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_CLOSE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_OPEN_CLOSE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_SYNC
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_BACK
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_HOUR_TENB
)
||
...
...
@@ -205,6 +209,10 @@ void Key_Event_Short_Press_Left(void)//选择
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_TENB
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_BIT
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_BACK
)
||
(
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_Get_Current_Cursor_Information
()
==
MENU_ITEM_UNIT_KM
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_UNIT_MILE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_LANGUAGE_CHINESE
)
||
...
...
@@ -212,13 +220,6 @@ void Key_Event_Short_Press_Left(void)//选择
{
Menu_Service
(
MENU_KEY_DOWN_SHORT
);
}
else
{
if
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_MAIN_ITEM
)
//切换大小计
{
Menu_Service
(
MENU_KEY_FUNCTION_1_SHORT
);
}
}
}
}
...
...
@@ -243,8 +244,7 @@ void Key_Event_Short_Press_Right(void)//确认
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_2
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_1
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BACKLIGHT_AUTO
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_OPEN
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_CLOSE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_OPEN_CLOSE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_SYNC
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_BLUETOOTH_BACK
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_HOUR_TENB
)
||
...
...
@@ -252,11 +252,16 @@ void Key_Event_Short_Press_Right(void)//确认
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_TENB
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_MIN_BIT
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_CLOCK_BACK
)
||
(
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_Get_Current_Cursor_Information
()
==
MENU_ITEM_UNIT_KM
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_UNIT_MILE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_LANGUAGE_CHINESE
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_LANGUAGE_ENGLISH
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_PHONE_CONNECT_WIN
))
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_PHONE_CONNECT_SET
)
||
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_PHONE_CONNECT_APP
))
{
Menu_Service
(
MENU_KEY_CONFIRM_SHORT
);
}
...
...
@@ -334,3 +339,18 @@ uint8_t Get_Dis_Unit(void)
{
return
MenuData
.
Unit
;
//0km,1mile
}
uint8_t
Get_Dis_OdoAndTrip
(
void
)
{
return
MenuData
.
OdoAndTrip
;
//0Odo,1Trip
}
uint8_t
Get_Dis_Bluetooth_Open_Close
(
void
)
{
return
MenuData
.
Bluetooth_Open_Close
;
//0开,1关
}
uint8_t
Get_Dis_Language
(
void
)
{
return
MenuData
.
Language
;
//0中文,1英文
}
\ No newline at end of file
Firmware/Source/Component/Key/Key_user.h
View file @
e34f3caf
...
...
@@ -36,12 +36,15 @@ typedef struct
uint16_t
Back_Time_Right
;
uint8_t
Back_Time_Right_Flag
;
uint8_t
Back_Time_Left_Flag
;
uint8_t
Set_Hour
;
uint8_t
Set_Minute
;
uint8_t
Dis_
Hour
;
uint8_t
Dis_Minute
;
uint8_t
Dis_Hour_Tenb
;
uint8_t
Dis_Hour_Bit
;
uint8_t
Dis_
Minute_Tenb
;
uint8_t
Dis_Minute
_Bit
;
uint8_t
Unit
;
uint8_t
Language
;
uint8_t
OdoAndTrip
;
uint8_t
Bluetooth_Open_Close
;
uint8_t
Clock_Flash
;
}
_Menu_Data
;
extern
uint8_t
ClearODO_Flag
;
...
...
@@ -65,4 +68,11 @@ void TYW_RESET_ODO(void);
uint8_t
Get_Dis_Unit
(
void
);
void
Key_TimeOut_Service
(
void
);
void
Key_Clear_Time
(
void
);
uint8_t
Get_Dis_OdoAndTrip
(
void
);
uint8_t
Get_Dis_Bluetooth_Open_Close
(
void
);
uint8_t
Get_Dis_Language
(
void
);
#endif
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