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
fd9d1a69
Commit
fd9d1a69
authored
Jul 31, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:根据光标显示各个菜单项
parent
22c0a344
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
162 additions
and
58 deletions
+162
-58
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+158
-49
AMT630H_Datas.h
Firmware/Source/Component/AMT630H/AMT630H_Datas.h
+4
-9
No files found.
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
fd9d1a69
#include "Components.h"
uint8_t
Pic_mode
=
PIC_DAYTIME_
Main_
CH
;
uint8_t
Pic_mode
=
PIC_DAYTIME_CH
;
uint8_t
MENU_MODE
=
MAIN_MENU
;
// 菜单背景,菜单前必带
void
AMT630H_GUI_BACKGRAND
(
void
);
...
...
@@ -23,30 +23,16 @@ void AMT630H_GUI_Bluetooth_Connect_Setting(uint8_t select, uint8_t sync_contacts
void
AMT630H_GUI_Unit_Setting
(
uint8_t
select
);
/*单位设置*/
void
AMT630H_GUI_Language_Setting
(
uint8_t
select
);
/*语言设置*/
void
AMT630H_GUI_Phone_Connect_Win
(
void
);
/*手机互联*/
void
AMT630H_GUI_ReadPosittion_Display
(
void
);
void
AMT630H_GUI_Background
()
{
if
(
SYS_OPR_STAT_IGN_ON
)
{
if
(
MENU_MODE
==
SETTING_MENU
)
{
AMT630H_GUI_SETTING
();
/*设置菜单*/
}
else
if
(
MENU_MODE
==
MAIN_MENU
)
{
AMT630H_GUI_BACKGRAND
();
/*主界面*/
}
AMT630H_GUI_ReadPosittion_Display
();
}
else
{
// SetPagePic(GRAPHICS_PAGE_0, Pic_0001_0_0);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0013_0_57);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0012_0_95);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0047_264_95);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0048_610_229);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0052_44_95);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0053_49_229);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0057_376_336);
}
}
...
...
@@ -2111,7 +2097,7 @@ static const uint16_t PICList_Fuel[] = {
/*时间显示函数*/
static
void
AMT630H_GUI_TIME
(
uint16_t
Hour
,
uint16_t
Minute
)
{
if
((
Pic_mode
==
PIC_DAYTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main
_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_
CH
)
||
(
Pic_mode
==
PIC_DAYTIME
_EN
))
{
/*外部接收小时和分钟*/
if
(
FLASH_SYNC_1Hz
)
...
...
@@ -2140,7 +2126,7 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
MinuteNumber
);
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main
_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME
_EN
))
{
/*外部接收小时和分钟*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0634_916_503
);
...
...
@@ -2198,7 +2184,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
static
uint8_t
s_FuelLowTime
=
0U
;
if
((
Pic_mode
==
PIC_DAYTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main
_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_
CH
)
||
(
Pic_mode
==
PIC_DAYTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0553_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
...
...
@@ -2229,7 +2215,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
s_FuelLowTime
=
0
;
}
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main
_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
...
...
@@ -2282,7 +2268,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
/*电压显示函数*/
static
void
AMT630H_GUI_Voltage
(
uint16_t
Voltage
)
{
if
((
Pic_mode
==
PIC_DAYTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main
_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_
CH
)
||
(
Pic_mode
==
PIC_DAYTIME
_EN
))
{
DISPLAY_NUM_ST
DisplayNumPara
;
...
...
@@ -2343,7 +2329,7 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
;
}
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main
_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0563_923_407
);
/*电压图标*/
...
...
@@ -2407,7 +2393,7 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
/*大计里程显示函数*/
static
void
AMT630H_GUI_ODO
(
uint32_t
ODO
,
uint8_t
mode
)
{
if
((
Pic_mode
==
PIC_DAYTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main
_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_
CH
)
||
(
Pic_mode
==
PIC_DAYTIME
_EN
))
{
/*ODO位数不同 KM位置不同*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0577_48_272
);
...
...
@@ -2427,7 +2413,7 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main
_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME
_EN
))
{
/*ODO位数不同 KM位置不同*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0685_48_272
);
...
...
@@ -2456,7 +2442,7 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
/*车速显示函数*/
static
void
AMT630H_GUI_VSpeed
(
uint16_t
VSpeed
)
{
if
((
Pic_mode
==
PIC_DAYTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main
_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_
CH
)
||
(
Pic_mode
==
PIC_DAYTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0592_617_271
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0593_889_310
);
...
...
@@ -2508,7 +2494,7 @@ static void AMT630H_GUI_VSpeed(uint16_t VSpeed)
;
}
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main
_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0700_617_271
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0701_889_310
);
...
...
@@ -2571,7 +2557,7 @@ static void AMT630H_GUI_VSpeed(uint16_t VSpeed)
static
void
AMT630H_GUI_ESpeed
(
uint16_t
ESpeed
)
{
uint8_t
PIC
=
0
;
if
((
Pic_mode
==
PIC_DAYTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main
_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_
CH
)
||
(
Pic_mode
==
PIC_DAYTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0606_834_199
);
/* 1000r/min */
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0607_94_110
);
/* 底 */
...
...
@@ -2608,7 +2594,7 @@ static void AMT630H_GUI_ESpeed(uint16_t ESpeed)
}
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main
_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_
CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME
_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0714_834_199
);
/* 1000r/min */
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0715_94_110
);
/* 底 */
...
...
@@ -2657,7 +2643,7 @@ static void AMT630H_GUI_ESpeed(uint16_t ESpeed)
*/
void
AMT630H_GUI_BACKGRAND
()
{
if
(
Pic_mode
==
PIC_DAYTIME_
Main_
CH
)
if
(
Pic_mode
==
PIC_DAYTIME_CH
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0382_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0753_109_331
);
...
...
@@ -2667,12 +2653,12 @@ void AMT630H_GUI_BACKGRAND()
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0001_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0754_109_347
);
}
else
if
(
Pic_mode
==
PIC_DAYTIME_
Main_
EN
)
else
if
(
Pic_mode
==
PIC_DAYTIME_EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0382_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0753_109_331
);
}
else
if
(
Pic_mode
==
PIC_NIGHTTIME_
Main_
EN
)
else
if
(
Pic_mode
==
PIC_NIGHTTIME_EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0001_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0754_109_347
);
...
...
@@ -2680,7 +2666,7 @@ void AMT630H_GUI_BACKGRAND()
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
/* AMT630H_GUI_Telephone(Telephone); */
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
{
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
}
...
...
@@ -2735,21 +2721,6 @@ void AMT630H_GUI_SETTING()
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0004_336_140
);
}
AMT630H_GUI_Clock_Setting
(
12
,
13
,
3
);
AMT630H_GUI_Backlight_Setting
(
3
);
AMT630H_GUI_Display_Mode_Setting
(
0
);
AMT630H_GUI_Bluetooth_Connect_Setting
(
0
,
8
,
1
);
AMT630H_GUI_Unit_Setting
(
0
);
AMT630H_GUI_Language_Setting
(
0
);
AMT630H_GUI_Phone_Connect_Win
();
// AMT630H_GUI_Clock_Setting(Clock_Hour, Clock_Min, Clock_BIT);
// AMT630H_GUI_Backlight_Setting( back_mode);
// AMT630H_GUI_Display_Mode_Setting( Display_mode);
// AMT630H_GUI_Bluetooth_Connect_Setting( select, sync_contacts, Connect_ON);
// AMT630H_GUI_Unit_Setting( select);
// AMT630H_GUI_Language_Setting( select)
// AMT630H_GUI_Phone_Connect_Win();
}
void
AMT630H_GUI_DisplayProc
(
void
)
...
...
@@ -2759,4 +2730,142 @@ void AMT630H_GUI_DisplayProc(void)
AMT630H_GUI_Background
();
PackedTransfer_Page
();
}
void
AMT630H_GUI_ReadPosittion_Display
(
void
)
{
switch
(
g_u8Cursor_Posittion
)
{
case
MENU_ITEM_MAIN_ITEM
:
/*主界面*/
AMT630H_GUI_BACKGRAND
();
/*主界面*/
break
;
case
MENU_ITEM_DISPLAY_MODE
:
/*00 显示模式*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Display_Mode_Information
();
break
;
case
MENU_ITEM_SELECT_DAYTIME
:
/*01 选中日间*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Display_Mode_Setting
(
0
);
break
;
case
MENU_ITEM_SELECT_NIGHTTIME
:
/*02 选中夜间*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Display_Mode_Setting
(
1
);
break
;
case
MENU_ITEM_SELECT_AUTO
:
/*03 选中自动*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Display_Mode_Setting
(
2
);
break
;
case
MENU_ITEM_BACKLIGHT_SETTING
:
/*04 背光设置*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Information
();
break
;
case
MENU_ITEM_BACKLIGHT_5
:
/*10 背光_5*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Setting
(
5
);
break
;
case
MENU_ITEM_BACKLIGHT_4
:
/*09 背光_4*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Setting
(
4
);
break
;
case
MENU_ITEM_BACKLIGHT_3
:
/*08 背光_3*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Setting
(
3
);
break
;
case
MENU_ITEM_BACKLIGHT_2
:
/*07 背光_2*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Setting
(
2
);
break
;
case
MENU_ITEM_BACKLIGHT_1
:
/*06 背光_1*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Setting
(
1
);
break
;
case
MENU_ITEM_BACKLIGHT_AUTO
:
/*05 背光自动*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Backlight_Setting
(
0
);
break
;
case
MENU_ITEM_BLUETOOTH_CONNECT
:
/*11 蓝牙连接*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Bluetooth_Information
(
8
,
1
);
break
;
case
MENU_ITEM_BLUETOOTH_OPEN_CLOSE
:
/*12 蓝牙_开*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Bluetooth_Connect_Setting
(
0
,
8
,
1
);
break
;
case
MENU_ITEM_BLUETOOTH_SYNC
:
/*13 蓝牙同步联系人*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Bluetooth_Connect_Setting
(
1
,
8
,
1
);
break
;
case
MENU_ITEM_BLUETOOTH_BACK
:
/*14 蓝牙返回*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Bluetooth_Connect_Setting
(
2
,
8
,
1
);
break
;
case
MENU_ITEM_CLOCK_SETTING
:
/*15 时钟设置*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Clock_Information
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
break
;
case
MENU_ITEM_CLOCK_HOUR_TENB
:
/*20 时钟小时十位*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Clock_Setting
(
12
,
13
,
1
);
break
;
case
MENU_ITEM_CLOCK_HOUR_BIT
:
/*19 时钟小时个位*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Clock_Setting
(
12
,
13
,
2
);
break
;
case
MENU_ITEM_CLOCK_MIN_TENB
:
/*18 时钟分钟十位*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Clock_Setting
(
12
,
13
,
3
);
break
;
case
MENU_ITEM_CLOCK_MIN_BIT
:
/*17 时钟分钟个位*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Clock_Setting
(
12
,
13
,
4
);
break
;
case
MENU_ITEM_CLOCK_BACK
:
/*16 时钟返回*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Clock_Setting
(
12
,
13
,
5
);
break
;
case
MENU_ITEM_UNIT_SETTING
:
/*21 单位设置*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Unit_Information
();
break
;
case
MENU_ITEM_UNIT_KM
:
/*22 选中公制*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Unit_Setting
(
0
);
break
;
case
MENU_ITEM_UNIT_MILE
:
/*23 选中英制*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Unit_Setting
(
1
);
break
;
case
MENU_ITEM_LANGUAGE_SETTING
:
/*24 语言设置*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Language_Information
();
break
;
case
MENU_ITEM_LANGUAGE_CHINESE
:
/*25 选中中文*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Language_Setting
(
0
);
break
;
case
MENU_ITEM_LANGUAGE_ENGLISH
:
/*26 选中英文*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Language_Setting
(
0
);
break
;
case
MENU_ITEM_FAULT_INFORMATION
:
/*27 故障信息*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Fault_Information
();
break
;
case
MENU_ITEM_PHONE_CONNECT
:
/*28 手机互联*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Phone_Connect
();
break
;
case
MENU_ITEM_QUIT
:
/*29 退出*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Quit
();
break
;
case
MENU_ITEM_PHONE_CONNECT_SET
:
case
MENU_ITEM_PHONE_CONNECT_APP
:
/*28 手机互联成功*/
AMT630H_GUI_SETTING
();
AMT630H_GUI_Phone_Connect_Win
();
break
;
default:
break
;
}
}
\ No newline at end of file
Firmware/Source/Component/AMT630H/AMT630H_Datas.h
View file @
fd9d1a69
...
...
@@ -3,15 +3,10 @@
typedef
enum
{
PIC_DAYTIME_Main_CH
=
0
,
//日间中文主界面
PIC_NIGHTTIME_Main_CH
,
//夜间中文主界面
PIC_DAYTIME_Main_EN
,
//日间英文主界面
PIC_NIGHTTIME_Main_EN
,
//夜间英文主界面
PIC_DAYTIME_CH
,
//日间中文
PIC_NIGHTTIME_CH
,
//夜间中文
PIC_DAYTIME_EN
,
//日间英文
PIC_NIGHTTIME_EN
,
//夜间英文
PIC_DAYTIME_CH
=
0
,
//日间中文
PIC_NIGHTTIME_CH
,
//夜间中文
PIC_DAYTIME_EN
,
//日间英文
PIC_NIGHTTIME_EN
,
//夜间英文
PIC_Max
,
}
_Picture_Mode
;
...
...
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